Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Opening FlowCharter MainWindow in TabControl (Read 1455 times)
ashar11
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Jun 29th, 2017
Opening FlowCharter MainWindow in TabControl
Nov 28th, 2017 at 7:54am
Print Post  
Hi,
   We are using FlowCharter example for WPF in our main application, we have an application that open tabItems in tabControl and we want to open flowcharter MainWindow in that tab item. Before we were doing it in Winform easily by using tabPage and adding flowcharter MainForm as a control in tabPage.
    Here TabItem is not allowing to add whole flowcharter MainWindow in wpf as a content, so is there any alternate way to open flowcharter MainWndow in tabControl.

  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Opening FlowCharter MainWindow in TabControl
Reply #1 - Nov 28th, 2017 at 8:53am
Print Post  
Hi,

The WPF Window must be the top-level control of a visual tree and therefore cannot be added as a child of a TabControl item. However, you can extract all of the content of the MainWindow and add it to a UserControl. Then add an instance of this UserControl to your tab item. The  attached modified version of the FlowCharter sample illustrates this.

https://mindfusion.eu/_samples/_sample_FlowCharter.zip

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
ashar11
Junior Member
**
Offline


I Love MindFusion!

Posts: 56
Joined: Jun 29th, 2017
Re: Opening FlowCharter MainWindow in TabControl
Reply #2 - Nov 28th, 2017 at 9:17am
Print Post  
Thanks it worked. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint