I would to use the RagDocking control as container of the views of my application as described in you documentation at the page
http://docs.telerik.com/devtools/wpf/controls/raddocking/features/panes/panesource.html .
In my main windows xaml file I added the following lines:
<
telerik:RadDocking
PanesSource
=
"{Binding Views}"
>
<
telerik:RadDocking.DockingPanesFactory
>
<
telerik:DockingPanesFactory
/>
</
telerik:RadDocking.DockingPanesFactory
>
</
telerik:RadDocking
>
In my mainViewModel I added this code to add a new view using this code all works fine:
RadDocumentPane view =
new
RadDocumentPane() { Header =
"Customer"
};
_views.Add(view);
RaisePropertyChanged(() => Views);
Now, I would to define the vews of my application in separated xaml files. I added a new UserControl to my project named view1 and I changed the view1.xaml file in this way
<
telerik:RadDocumentPane
x:Class
=
"MyApp.Views.TestView"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"300" Header="Test"
>
<
Grid
>
<
TextBlock
>Test</
TextBlock
>
</
Grid
>
</
telerik:RadDocumentPane
>
and the view1.cs file in this way
namespace
MyApp.Views
{
public
partial
class
TestView : RadDocumentPane
{
public
TestView()
{
InitializeComponent();
}
}
}
Then I changed the code to add a new in this way:
//RadDocumentPane view = new RadDocumentPane() { Header = "Customer" };
TestView view =
new
TestView();
_views.Add(view);
RaisePropertyChanged(() => Views);
With this changes, the new pane is added to the docking view but unfortunately without the header tab.
Is it possible to define de panes in separated xaml file as I done? Or have I to use the RadDocumentPane class and place my view in the Content property of the RadDocumentPane?
Thanks in advance