We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to reference a contentControl (Frame)

Thread ID:





127175 Oct 31,2016 08:34 PM UTC Nov 1,2016 12:02 PM UTC WPF 2
Tags: DockingManager
Dwayne Etchison
Asked On October 31, 2016 08:34 PM UTC

I am creating a new tab and document (Frame) upon a button click. In order to prevent multiple of the same window I am trying to check and see if this window already exists by attempting to find it by name, however it can't seem to find it, although it is listed as a Child at runtime.

        private void NewWeighButton_Click(object sender, RoutedEventArgs e)
            //Check if the window is already open, if it is focus it, if not create it.
            if (SyncDockingManager.FindName("NewWeigh") == null)
                Frame newWeighFrame = new Frame();
                newWeighFrame.Content = new SelectACPage(new SelectAircraftViewModel(Context));
                newWeighFrame.Name = "NewWeigh";
                DockingManager.SetHeader(newWeighFrame, "New Weigh");
                DockingManager.SetState(newWeighFrame, DockState.Document);
                DockingManager.SetIsSelectedTab(newWeighFrame, true);

Dwayne Etchison
Replied On October 31, 2016 09:08 PM UTC

Disregard, but just to clarify i had to register the name.

Durga Rajan [Syncfusion]
Replied On November 1, 2016 12:02 PM UTC

Hi Dwayne,

We can find the child element from DockingManager by iterating the children collection of DockingManager instead of using FindName method which comes from FrameworkElement. We have prepared the sample to find the existing element by name. In this sample we have FindChild method which returns the child element corresponding to the name of that child. Please download the sample from the below link.


Please let us know more details about the requirement if we have misunderstood your query.

Durga S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon