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
1280
Visibility of ContentPanes MVVM
posted

Hello,

I am using XamDockManager this way:

<igDm:XamDockManager Name="DockManager" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="Loaded">
                <i:InvokeCommandAction Command="{Binding Path=LoadLayoutSettingsCommand}"
                                CommandParameter="{Binding ElementName=DockManager}" />
            </i:EventTrigger>
            <i:EventTrigger EventName="LayoutUpdated">
                <i:InvokeCommandAction Command="{Binding Path=SaveLayoutSettingsCommand}"
                                CommandParameter="{Binding ElementName=DockManager}" />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <igDm:SplitPane>
            <igDm:ContentPane Header="MainContent" SaveInLayout="False" TabHeader="{x:Null}" Style="{StaticResource ContentPaneStyle}">
                <!-- CONTENT -->
            </igDm:ContentPane>
        </igDm:SplitPane>
        <igDm:XamDockManager.Panes>
            <igDm:SplitPane igDm:XamDockManager.InitialLocation="DockedRight" SplitterOrientation="Vertical" Width="300">
                <igDm:TabGroupPane TabStripPlacement="Bottom">
                    <igDm:ContentPane x:Name="ToolsPane" Header="Tools" SaveInLayout="True" Visibility="{Binding Path=ToolsPaneVisibility}" Style="{StaticResource ContentPaneStyle}">
                        <Binding Path="ActiveToolsPaneView"/>
                    </igDm:ContentPane>
                    <igDm:ContentPane x:Name="PropertiesPane" Header="Properties" SaveInLayout="True" Visibility="{Binding Path=PropertiesPaneVisibility}" Style="{StaticResource ContentPaneStyle}">
                        <Binding Path="ActivePropertiesPaneView"/>
                    </igDm:ContentPane>
                </igDm:TabGroupPane>
            </igDm:SplitPane>
        </igDm:XamDockManager.Panes>
    </igDm:XamDockManager>

I thought  <igDm:ContentPane x:Name="PropertiesPane" Header="Properties" SaveInLayout="True" Visibility="{Binding Path=PropertiesPaneVisibility}" Style="{StaticResource ContentPaneStyle}"> would set the visibility, but obviously the visibility is set somewhere else when you click the close button.

so the question is: How can I bind the visibility of contectpanes in MVVM ??