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
195
Bringing ContentPane to Front
posted

How do you bring the newly added ContentPane to front ( Make visible ) in DockManager.  The code below adds to group, but I have to click the tab in order to see.

 Also, not sure if this is the most appropriate way to add content to new panes?

// Setup Frame for UI navigation.

Frame frameTest = new Frame();

frameTest.NavigationUIVisibility = NavigationUIVisibility.Hidden;

// Page to add.

Page myPage = new Page();

frameTest.NavigationService.Navigate(myPage);

 

// Setup Content Pane to add.

ContentPane contentPaneTest = new ContentPane();

contentPaneTest.Header = "My Test Pane";

contentPaneTest.Content = frameTest;

tabgrouppaneTest.Items.Add(contentPaneTest);

contentPaneTest.Name = "cpTest";

 

Parents
  • 54937
    Suggested Answer
    Offline posted

    shaggygi said:
    How do you bring the newly added ContentPane to front ( Make visible ) in DockManager.  The code below adds to group, but I have to click the tab in order to see.

    If you want the pane to have keyboard focus then you should call its Activate method. If you just want to make sure its in view then you can use the BringIntoView method defined on the FrameworkElement class.

    shaggygi said:
    Also, not sure if this is the most appropriate way to add content to new panes?

    The way you're creating the pane seems fine.

Reply Children
No Data