Hi,
I am using XamDockManager in a userControl which is loaded into Shell region in my Prism/CAL Application.I am attaching the code below for your reference
<UserControl x:Class="SREMonitor.Views.SREMonitorLayout"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="MonitorLayout"
xmlns:ig="http://infragistics.com/DockManager">
<DockPanel>
<ig:XamDockManager Background="{x:Null}" x:Name="xamDockManager">
<ig:XamDockManager.Panes>
<ig:SplitPane MinWidth="300">
<ig:ContentPane Header="Sidebar Region" Style="{StaticResource JdaSidebarPaneStyle}" Background="#FF86BEEC">
<ItemsControl x:Name="sidebarRegion"/>
</ig:ContentPane>
</ig:SplitPane>
<ig:SplitPane Width="6000" MinWidth="300" SplitterOrientation="Vertical" x:Name="splitPane">
<ig:SplitPane SplitterOrientation="Horizontal">
<ig:TabGroupPane x:Name="MyRegion1"/>
<ig:TabGroupPane x:Name="MyRegion2"/>
</ig:XamDockManager.Panes>
</ig:XamDockManager>
</DockPanel>
</UserControl>
My problem here is i want to Hide/Dock the MyRegion2 Dynamically. how can i do this,Please suggest me some way..........Thanks in Advance
ramk_chirra said:My problem here is i want to Hide/Dock the MyRegion2 Dynamically.
In xamDockManager, TabGroupPanes are never moved/docked; they are just a custom container for ContentPane instances that display those panes as tab items. So to hide a TabGroupPane, you would have to hide all of the ContentPanes within it. Also, since the end user may drag panes to other locations, unpin panes, float them, etc. the ContentPane instances that you initially put into the TabGroupPane may be moved elsewhere. Now if you want to manipulate a ContentPane's location, you may want to look at the ContentPaneCommands class which has a number of RoutedCommands that can be executed (e.g. using the ContentPane's ExecuteCommand method) that will affect where the pane is positioned.
Hi Andrew,
Thanks for the reply, if we have sample code as below in our application
<xamDockManager>
<xamDockManager.Panes>
<SplitPane x:Name="MySplitPane">
<ContentPane x:Name="MyContentPane" Header="SampleContent">
<ItemsControl />
</ContentPane>
</SplitPane>
</xamDockManager.Panes>
</xamDockManager>
This UserControl is resolved by a region in PRISM Application and is to the right side of the screen,let us say that the ContentPane is unPinned and the ContentPane is docked to the left side of the screen with header "SampleContent". Now i want to undock this ContentPane Dynamically when an event fires lets say in Button1_Click. Iam trying this by setting the "IsPinned" property to true but the ContentPane is not being Pinned even though the IsPinned Property is set to true.Please suggest me a way to do this....
Thanks,
Ram
Taking Prism out of this for a moment, if you are setting IsPinned to true on a ContentPane instance that is unpinned in a xamDockManager then it should be pinned. If that's not happening then can you provide a sample that demonstrates the problem?