Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
add several items to Content Pane through code-behind
posted

Hello,

i'm trying to add a xamChart and a ComboBox and a Label to a Content Pane.

I managed to create the SplitPane, add it to the xamDockManager, create the ContentPane and add the xamChart to it.

But now I also want to add other controls, but i don't know how, or even if it's possible.

I've something like this:

//-----------------------

 SplitPane sp1 = new SplitPane();

 

 

this.xamDockManager1.Panes.Add(sp1);

 

 

XamChart xamChart1 = new XamChart();

 

 

ContentPane CP1 = new ContentPane();

 

sp1.Panes.Add(CP1);

CP1.Content = xamChart1;~

//--------------------

 

Thank you

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    A ContentControl can only have 1 thng as its content but that could be something that itself can contain multiple thngs. So for example, you could create a Panel (Grid, StackPanel, DockPanel, etc.) and add the controls to that positioning them as needed based on the panel type you choose and then you would add that panel as the Content. Normally though I think people tend to create a UserControl, add their controls into that (again using panels, etc.) and then just create the UserControl and add that to the Content.

Children
No Data