Hello,
I have a docking manager that contains a list and several contentcontrols with State=document acting as tabs.
I want to disable (to stop the possibility to enter) other tabs when i am in tab 1 for example.
Here is my code:
<syncfusion:DockingManager x:Name="dockingManager" IsVS2010DraggingEnabled="False" IsEnableHotTracking="False" DisabledCloseButtonsBehavior="Hide" DocumentCloseButtonType="Hide" IsContextMenuVisible="False" IsContextMenuButtonVisible="False" ShowTabItemContextMenu="False" ShowTabListContextMenu="False" IsTDIDragDropEnabled="False" Loaded="dockingManager_Loaded" MouseDown="dockingManager_MouseDown" EnableMouseHoverBackground="False" IsTabPreviewEnabled="False" UseDocumentContainer="True">
<syncfusion:DockingManager.Icon>
<ImageBrush ImageSource="Images\icon.PNG"/>
</syncfusion:DockingManager.Icon>
<syncfusion:DockingManager.DocumentTabControlStyle>
<Style TargetType="{x:Type syncfusion:DocumentTabControl}">
<Setter Property="TabItemSelectedBackground" Value="Green" />
</Style>
</syncfusion:DockingManager.DocumentTabControlStyle>
<!-- Sample Window -->
<ListBox Name="lst" BorderThickness="0" syncfusion:DockingManager.CanClose="False" syncfusion:DockingManager.CanDockonFloat="False"
syncfusion:DockingManager.CanDrag="False" SelectionChanged="lstCars_SelectionChanged"
syncfusion:DockingManager.CanResizeInDockedState="False"
syncfusion:DockingManager.CanResizeWidthInDockedState="False"
syncfusion:DockingManager.SideInDockedMode="Left"
syncfusion:DockingManager.State="Dock"
syncfusion:DockingManager.DesiredWidthInDockedMode="220"
syncfusion:DocumentContainer.MDIBounds="30,30,300,300"
syncfusion:DockingManager.DesiredHeightInFloatingMode="200"
syncfusion:DockingManager.Header="Cars"
Style="{DynamicResource ResourceKey=styleListBox}"
>
</ListBox>
<ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_1" Name="tab1" syncfusion:DockingManager.DocumentTabOrderIndex="1" >
<Grid x:Name="grdBelt" Background="Transparent">
<Button Content="Disable other tabs" Name="btnDisable" Click="btnDisable_Click"/>
<Button Content="Enable other tabs" Name="btnEnable"/>
</Grid>
</ContentControl>
<ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_2" Name="tab2" syncfusion:DockingManager.DocumentTabOrderIndex="2" >
<ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_3" Name="tab3" syncfusion:DockingManager.DocumentTabOrderIndex="3" >
</syncfusion:DockingManager>
I tried on btnDisable click event:
private void btnDisable_Click(object sender, RoutedEventArgs e)
{
////this is not ok because it disables everyting, including current tab (tab 1)
//dockingManager.IsEnabled = false;
//// and here i want to disable (stop the user to enter, to click the headers of the other tabs (tab2 and tab3)
tab2.IsEnabled = false;
tab3.IsEnabled = false;
//// but the user can still click the headers of tab2 and tab3 and enter
}
Thank you,
Bogdan