Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148600 | Oct 26,2019 06:48 PM UTC | Nov 4,2019 05:35 AM UTC | WPF | 6 |
![]() |
Tags: DockingManager |
View:
<syncfusion:DockingManager x:Name="SyncDockingManager" Grid.Row="1" >
<interaction:Interaction.Behaviors>
<local:ViewModel/>
</interaction:Interaction.Behaviors>
<ContentControl x:Name="SolutionExplorer" syncfusion:DockingManager.Header="Solution Explorer" />
<ContentControl x:Name="ToolBox" syncfusion:DockingManager.Header="Toolbox" />
<ContentControl x:Name="Properties" syncfusion:DockingManager.Header="Properties" />
<ContentControl x:Name="Output" syncfusion:DockingManager.Header="Output"/>
<ContentControl x:Name="StartPage" syncfusion:DockingManager.Header="Start Page" />
</syncfusion:DockingManager>
ViewModel:
public class ViewModel : Behavior<UIElement>
{
protected override void OnAttached()
{
Window parent = Application.Current.MainWindow;
AssociatedObject.PreviewKeyDown += (sender, e) =>
{
if (e.Key == Key.S && (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)))
{
(AssociatedObject as DockingManager).SaveDockState();
}
if (e.Key == Key.L && (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)))
{
(AssociatedObject as DockingManager).LoadDockState();
}
};
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.