Browse Source

V3.4.0 Released

pull/1359/merge
BoucherS 8 years ago
parent
commit
24ecc09cf3
  1. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs
  2. 47
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml
  3. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Brushes.baml
  4. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/GeneratedInternalTypeHelper.g.cs
  5. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Theme.baml
  6. 23
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero.csproj.FileListAbsolute.txt
  7. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero.g.resources
  8. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.i.lref
  9. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref
  10. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Brushes.baml
  11. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Theme.baml
  12. 46
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero.csproj.FileListAbsolute.txt
  13. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero.g.resources
  14. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.i.lref
  15. 6
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref
  16. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs
  17. 62
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml
  18. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Brushes.baml
  19. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Theme.baml
  20. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro.csproj.FileListAbsolute.txt
  21. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro.g.resources
  22. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.i.lref
  23. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref
  24. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Theme.baml
  25. 44
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro.csproj.FileListAbsolute.txt
  26. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro.g.resources
  27. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.i.lref
  28. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref
  29. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs
  30. 62
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml
  31. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Brushes.baml
  32. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Theme.baml
  33. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj.FileListAbsolute.txt
  34. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources
  35. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.i.lref
  36. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref
  37. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Theme.baml
  38. 44
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj.FileListAbsolute.txt
  39. BIN
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources
  40. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.i.lref
  41. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref
  42. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs
  43. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Commands/RelayCommand.cs
  44. 15
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneControlOverlayArea.cs
  45. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneDropTarget.cs
  46. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs
  47. 83
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs
  48. 30
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AutoHideWindowManager.cs
  49. 9
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/BindingHelper.cs
  50. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ContextMenuEx.cs
  51. 21
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerDropTarget.cs
  52. 15
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerOverlayArea.cs
  53. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs
  54. 22
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropAsAnchorableTarget.cs
  55. 26
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropTarget.cs
  56. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneGroupDropTarget.cs
  57. 13
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneTabPanel.cs
  58. 49
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs
  59. 46
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropArea.cs
  60. 55
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs
  61. 49
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownControlArea.cs
  62. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs
  63. 11
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetBase.cs
  64. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetType.cs
  65. 4
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs
  66. 108
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FocusElementManager.cs
  67. 24
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FullWeakDictionary.cs
  68. 19
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IDropTarget.cs
  69. 3
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindow.cs
  70. 9
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowArea.cs
  71. 14
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowDropTarget.cs
  72. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowHost.cs
  73. 130
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs
  74. 51
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorGroupControl.cs
  75. 158
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorSideControl.cs
  76. 21
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs
  77. 243
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs
  78. 272
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs
  79. 34
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs
  80. 18
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneGroupControl.cs
  81. 35
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs
  82. 378
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs
  83. 27
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs
  84. 80
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentFloatingWindowControl.cs
  85. 100
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs
  86. 58
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs
  87. 17
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneGroupControl.cs
  88. 119
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs
  89. 584
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs
  90. 111
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs
  91. 37
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridResizerControl.cs
  92. 475
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs
  93. 16
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs
  94. 60
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/MenuItemEx.cs
  95. 448
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs
  96. 36
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayArea.cs
  97. 446
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs
  98. 29
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTarget.cs
  99. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTargetType.cs
  100. 49
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ReentrantFlag.cs

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.3"; public const string BaseVersion = "3.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

47
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/Theme.xaml

@ -1161,8 +1161,9 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
@ -1172,8 +1173,7 @@
Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="1" Grid.Column="2"
Margin="5,0,0,0"
Padding="-1" Padding="-1"
Visibility="Hidden" Visibility="Hidden"
Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}"
@ -1186,24 +1186,30 @@
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected}" <MultiDataTrigger>
Value="true"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsSelected}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
</DataTrigger> </MultiDataTrigger>
<DataTrigger Binding="{Binding Path=IsActive}" <DataTrigger Binding="{Binding Path=IsActive}"
Value="true"> Value="true">
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
</DataTrigger> </DataTrigger>
<Trigger Property="IsMouseOver" <MultiDataTrigger>
Value="True"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
</Trigger> </MultiDataTrigger>
<DataTrigger Binding="{Binding Path=CanClose}" <DataTrigger Binding="{Binding Path=CanClose}"
Value="false"> Value="false">
<Setter Property="Visibility" <Setter Property="Visibility"
@ -1847,7 +1853,8 @@
Stretch="None" Stretch="None"
Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" > Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" >
</Image> </Image>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Title}" <TextBlock x:Name="selectedElementTitle"
Text="{Binding SelectedDocument.LayoutElement.Title}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -1855,7 +1862,8 @@
Margin="4,0,0,0" > Margin="4,0,0,0" >
</TextBlock> </TextBlock>
</Grid> </Grid>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Description}" <TextBlock x:Name="selectedElementDescription"
Text="{Binding SelectedDocument.LayoutElement.Description}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" > VerticalAlignment="Center" >
</TextBlock> </TextBlock>
@ -1880,7 +1888,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4" > Margin="0,3,0,4" >
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_AnchorableListBox"
Grid.Row="1"
ItemsSource="{Binding Anchorables}" ItemsSource="{Binding Anchorables}"
SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}" SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeAero_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeAero_NavigatorWindowListBoxItemStyle}"
@ -1917,7 +1926,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4" > Margin="0,3,0,4" >
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_DocumentListBox"
Grid.Row="1"
ItemsSource="{Binding Documents}" ItemsSource="{Binding Documents}"
SelectedItem="{Binding SelectedDocument, Mode=TwoWay}" SelectedItem="{Binding SelectedDocument, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeAero_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeAero_NavigatorWindowListBoxItemStyle}"
@ -1961,6 +1971,17 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
<ControlTemplate.Triggers>
<Trigger Property="SelectedDocument"
Value="{x:Null}">
<Setter Property="Text"
Value="{Binding SelectedAnchorable.LayoutElement.Title}"
TargetName="selectedElementTitle" />
<Setter Property="Text"
Value="{x:Null}"
TargetName="selectedElementDescription" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Brushes.baml

Binary file not shown.

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/GeneratedInternalTypeHelper.g.cs

@ -1,2 +0,0 @@


BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Theme.baml

Binary file not shown.

23
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero.csproj.FileListAbsolute.txt

@ -1,23 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\GeneratedInternalTypeHelper.g.cs
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero.g.resources

Binary file not shown.

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.i.lref

@ -1,5 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\GeneratedInternalTypeHelper.g.i.cs
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Brushes.xaml;;
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml;;

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref

@ -1,5 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Debug\GeneratedInternalTypeHelper.g.cs
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Brushes.xaml;;
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml;;

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Brushes.baml

Binary file not shown.

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Theme.baml

Binary file not shown.

46
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero.csproj.FileListAbsolute.txt

@ -1,23 +1,23 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.Themes.Aero.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.Themes.Aero.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.Themes.Aero.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.Themes.Aero.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.csprojResolveAssemblyReference.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\GeneratedInternalTypeHelper.g.cs D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\GeneratedInternalTypeHelper.g.cs
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Brushes.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Theme.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.g.resources D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\Xceed.Wpf.AvalonDock.Themes.Aero.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero.g.resources

Binary file not shown.

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.i.lref

@ -1,5 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\GeneratedInternalTypeHelper.g.i.cs
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Brushes.xaml;;
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml;;

6
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Aero/obj/Release/Xceed.Wpf.AvalonDock.Themes.Aero_MarkupCompile.lref

@ -1,5 +1,5 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\GeneratedInternalTypeHelper.g.cs D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\obj\Release\GeneratedInternalTypeHelper.g.cs
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Brushes.xaml;; FD:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Brushes.xaml;;
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml;; FD:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml;;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.3"; public const string BaseVersion = "3.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

62
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/Theme.xaml

@ -1185,8 +1185,9 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
@ -1196,8 +1197,7 @@
Style="{StaticResource AvalonDock_ThemeMetro_ButtonStyle}" Style="{StaticResource AvalonDock_ThemeMetro_ButtonStyle}"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="1" Grid.Column="2"
Margin="5,0,0,0"
Visibility="Hidden" Visibility="Hidden"
Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}"
ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}"> ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}">
@ -1209,12 +1209,24 @@
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected}" <MultiDataTrigger>
Value="true"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsSelected}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
</DataTrigger> </MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility"
Value="Visible"
TargetName="DocumentCloseButton" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding Path=IsLastFocusedDocument}" <DataTrigger Binding="{Binding Path=IsLastFocusedDocument}"
Value="true"> Value="true">
<Setter Property="Visibility" <Setter Property="Visibility"
@ -1224,21 +1236,18 @@
Value="Images/PinClose_Dark.png" Value="Images/PinClose_Dark.png"
TargetName="PART_ImgPinClose" /> TargetName="PART_ImgPinClose" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding Path=IsActive}" <MultiDataTrigger>
Value="true"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsActive}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
<Setter Property="Source" <Setter Property="Source"
Value="Images/PinClose_Dark.png" Value="Images/PinClose_Dark.png"
TargetName="PART_ImgPinClose" /> TargetName="PART_ImgPinClose" />
</DataTrigger> </MultiDataTrigger>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Visibility"
Value="Visible"
TargetName="DocumentCloseButton" />
</Trigger>
<DataTrigger Binding="{Binding Path=CanClose}" <DataTrigger Binding="{Binding Path=CanClose}"
Value="false"> Value="false">
<Setter Property="Visibility" <Setter Property="Visibility"
@ -1912,7 +1921,8 @@
Stretch="None" Stretch="None"
Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" > Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" >
</Image> </Image>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Title}" <TextBlock x:Name="selectedElementTitle"
Text="{Binding SelectedDocument.LayoutElement.Title}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -1920,7 +1930,8 @@
Margin="4,0,0,0" > Margin="4,0,0,0" >
</TextBlock> </TextBlock>
</Grid> </Grid>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Description}" <TextBlock x:Name="selectedElementDescription"
Text="{Binding SelectedDocument.LayoutElement.Description}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" > VerticalAlignment="Center" >
</TextBlock> </TextBlock>
@ -1944,7 +1955,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4" > Margin="0,3,0,4" >
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_AnchorableListBox"
Grid.Row="1"
ItemsSource="{Binding Anchorables}" ItemsSource="{Binding Anchorables}"
SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}" SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeMetro_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeMetro_NavigatorWindowListBoxItemStyle}"
@ -1981,7 +1993,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4" > Margin="0,3,0,4" >
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_DocumentListBox"
Grid.Row="1"
ItemsSource="{Binding Documents}" ItemsSource="{Binding Documents}"
SelectedItem="{Binding SelectedDocument, Mode=TwoWay}" SelectedItem="{Binding SelectedDocument, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeMetro_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeMetro_NavigatorWindowListBoxItemStyle}"
@ -2025,6 +2038,17 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
<ControlTemplate.Triggers>
<Trigger Property="SelectedDocument"
Value="{x:Null}">
<Setter Property="Text"
Value="{Binding SelectedAnchorable.LayoutElement.Title}"
TargetName="selectedElementTitle" />
<Setter Property="Text"
Value="{x:Null}"
TargetName="selectedElementDescription" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Brushes.baml

Binary file not shown.

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Theme.baml

Binary file not shown.

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro.csproj.FileListAbsolute.txt

@ -1,22 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro.g.resources

Binary file not shown.

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.i.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml;;

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Debug/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml;;

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Theme.baml

Binary file not shown.

44
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro.csproj.FileListAbsolute.txt

@ -1,22 +1,22 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.Themes.Metro.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.Themes.Metro.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.Themes.Metro.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.Themes.Metro.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.csprojResolveAssemblyReference.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Brushes.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Theme.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.g.resources D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\obj\Release\Xceed.Wpf.AvalonDock.Themes.Metro.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro.g.resources

Binary file not shown.

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.i.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml;;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.Metro/obj/Release/Xceed.Wpf.AvalonDock.Themes.Metro_MarkupCompile.lref

@ -1,4 +1,4 @@
 
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml;; FD:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml;;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.3"; public const string BaseVersion = "3.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

62
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/Theme.xaml

@ -1279,8 +1279,9 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" <Border Grid.ColumnSpan="3"
Background="Transparent" /> Background="Transparent" />
<ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}" <ContentPresenter Content="{Binding Model, RelativeSource={RelativeSource TemplatedParent}}"
ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}" ContentTemplate="{Binding DocumentHeaderTemplate, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type avalonDock:DockingManager}, Mode=FindAncestor}}"
@ -1290,8 +1291,7 @@
Style="{StaticResource AvalonDock_ThemeVS2010_ButtonStyle}" Style="{StaticResource AvalonDock_ThemeVS2010_ButtonStyle}"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="1" Grid.Column="2"
Margin="5,0,0,0"
Visibility="Hidden" Visibility="Hidden"
Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding Path=LayoutItem.CloseCommand, RelativeSource={RelativeSource TemplatedParent}}"
ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}"> ToolTip="{x:Static avalonDockProperties:Resources.Document_Close}">
@ -1303,12 +1303,24 @@
</Border> </Border>
</avalonDockControls:DropDownControlArea> </avalonDockControls:DropDownControlArea>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected}" <MultiDataTrigger>
Value="true"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsSelected}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
</DataTrigger> </MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility"
Value="Visible"
TargetName="DocumentCloseButton" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding Path=IsLastFocusedDocument}" <DataTrigger Binding="{Binding Path=IsLastFocusedDocument}"
Value="true"> Value="true">
<Setter Property="Visibility" <Setter Property="Visibility"
@ -1318,21 +1330,18 @@
Value="Images/PinClose_Dark.png" Value="Images/PinClose_Dark.png"
TargetName="PART_ImgPinClose" /> TargetName="PART_ImgPinClose" />
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding Path=IsActive}" <MultiDataTrigger>
Value="true"> <MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsActive}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Visible" Value="Visible"
TargetName="DocumentCloseButton" /> TargetName="DocumentCloseButton" />
<Setter Property="Source" <Setter Property="Source"
Value="Images/PinClose_Dark.png" Value="Images/PinClose_Dark.png"
TargetName="PART_ImgPinClose" /> TargetName="PART_ImgPinClose" />
</DataTrigger> </MultiDataTrigger>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Visibility"
Value="Visible"
TargetName="DocumentCloseButton" />
</Trigger>
<DataTrigger Binding="{Binding Path=CanClose}" <DataTrigger Binding="{Binding Path=CanClose}"
Value="false"> Value="false">
<Setter Property="Visibility" <Setter Property="Visibility"
@ -2051,7 +2060,8 @@
Stretch="None" Stretch="None"
Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" > Visibility="{Binding SelectedDocument.LayoutElement.IconSource, Converter={StaticResource BoolToVisibilityConverter} }" >
</Image> </Image>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Title}" <TextBlock x:Name="selectedElementTitle"
Text="{Binding SelectedDocument.LayoutElement.Title}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -2059,7 +2069,8 @@
Margin="4,0,0,0" > Margin="4,0,0,0" >
</TextBlock> </TextBlock>
</Grid> </Grid>
<TextBlock Text="{Binding SelectedDocument.LayoutElement.Description}" <TextBlock x:Name="selectedElementDescription"
Text="{Binding SelectedDocument.LayoutElement.Description}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" > VerticalAlignment="Center" >
</TextBlock> </TextBlock>
@ -2084,7 +2095,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4" > Margin="0,3,0,4" >
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_AnchorableListBox"
Grid.Row="1"
ItemsSource="{Binding Anchorables}" ItemsSource="{Binding Anchorables}"
SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}" SelectedItem="{Binding SelectedAnchorable, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeVS2010_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeVS2010_NavigatorWindowListBoxItemStyle}"
@ -2121,7 +2133,8 @@
FontWeight="Bold" FontWeight="Bold"
Margin="0,3,0,4"> Margin="0,3,0,4">
</TextBlock> </TextBlock>
<ListBox Grid.Row="1" <ListBox x:Name="PART_DocumentListBox"
Grid.Row="1"
ItemsSource="{Binding Documents}" ItemsSource="{Binding Documents}"
SelectedItem="{Binding SelectedDocument, Mode=TwoWay}" SelectedItem="{Binding SelectedDocument, Mode=TwoWay}"
ItemContainerStyle="{StaticResource AvalonDock_ThemeVS2010_NavigatorWindowListBoxItemStyle}" ItemContainerStyle="{StaticResource AvalonDock_ThemeVS2010_NavigatorWindowListBoxItemStyle}"
@ -2165,6 +2178,17 @@
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
<ControlTemplate.Triggers>
<Trigger Property="SelectedDocument"
Value="{x:Null}">
<Setter Property="Text"
Value="{Binding SelectedAnchorable.LayoutElement.Title}"
TargetName="selectedElementTitle" />
<Setter Property="Text"
Value="{x:Null}"
TargetName="selectedElementDescription" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Brushes.baml

Binary file not shown.

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Theme.baml

Binary file not shown.

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj.FileListAbsolute.txt

@ -1,22 +0,0 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources

Binary file not shown.

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.i.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml;;

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Debug/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml;;

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Theme.baml

Binary file not shown.

44
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010.csproj.FileListAbsolute.txt

@ -1,22 +1,22 @@
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\Xceed.Wpf.AvalonDock.pdb
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\de\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\es\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\fr\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\hu\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\it\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\pt-BR\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\ro\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\ru\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\sv\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Release\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.csprojResolveAssemblyReference.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.csprojResolveAssemblyReference.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Brushes.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Brushes.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.cache D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.cache
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Theme.baml D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Theme.baml
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.dll D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
D:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb D:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\obj\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.pdb

BIN
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010.g.resources

Binary file not shown.

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.i.lref

@ -1,4 +0,0 @@

FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml;;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock.Themes.VS2010/obj/Release/Xceed.Wpf.AvalonDock.Themes.VS2010_MarkupCompile.lref

@ -1,4 +1,4 @@
 
FD:\Dev\ExtendedWPFToolkit\Release\3.3.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml;; FD:\Dev\ExtendedWPFToolkit\Release\3.4.0\OpenSource\Generated\Src\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml;;

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/AssemblyVersionInfo.cs

@ -21,7 +21,7 @@
internal static class _XceedVersionInfo internal static class _XceedVersionInfo
{ {
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string BaseVersion = "3.3"; public const string BaseVersion = "3.4";
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )] [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields" )]
public const string Version = BaseVersion + public const string Version = BaseVersion +
".0.0"; ".0.0";

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Commands/RelayCommand.cs

@ -15,9 +15,6 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input; using System.Windows.Input;
namespace Xceed.Wpf.AvalonDock.Commands namespace Xceed.Wpf.AvalonDock.Commands
@ -26,8 +23,8 @@ namespace Xceed.Wpf.AvalonDock.Commands
{ {
#region Fields #region Fields
readonly Action<object> _execute; private readonly Action<object> _execute;
readonly Predicate<object> _canExecute; private readonly Predicate<object> _canExecute;
#endregion // Fields #endregion // Fields
@ -57,8 +54,14 @@ namespace Xceed.Wpf.AvalonDock.Commands
public event EventHandler CanExecuteChanged public event EventHandler CanExecuteChanged
{ {
add { CommandManager.RequerySuggested += value; } add
remove { CommandManager.RequerySuggested -= value; } {
CommandManager.RequerySuggested += value;
}
remove
{
CommandManager.RequerySuggested -= value;
}
} }
public void Execute( object parameter ) public void Execute( object parameter )

15
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneControlOverlayArea.cs

@ -14,17 +14,20 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class AnchorablePaneControlOverlayArea : OverlayArea public class AnchorablePaneControlOverlayArea : OverlayArea
{ {
#region Members
private LayoutAnchorablePaneControl _anchorablePaneControl;
#endregion
#region constructors
internal AnchorablePaneControlOverlayArea( internal AnchorablePaneControlOverlayArea(
IOverlayWindow overlayWindow, IOverlayWindow overlayWindow,
LayoutAnchorablePaneControl anchorablePaneControl ) LayoutAnchorablePaneControl anchorablePaneControl )
@ -38,6 +41,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
LayoutAnchorablePaneControl _anchorablePaneControl; #endregion
} }
} }

19
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneDropTarget.cs

@ -14,10 +14,7 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,6 +23,15 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal class AnchorablePaneDropTarget : DropTarget<LayoutAnchorablePaneControl> internal class AnchorablePaneDropTarget : DropTarget<LayoutAnchorablePaneControl>
{ {
#region Members
private LayoutAnchorablePaneControl _targetPane;
int _tabIndex = -1;
#endregion
#region Constructors
internal AnchorablePaneDropTarget( LayoutAnchorablePaneControl paneControl, Rect detectionRect, DropTargetType type ) internal AnchorablePaneDropTarget( LayoutAnchorablePaneControl paneControl, Rect detectionRect, DropTargetType type )
: base( paneControl, detectionRect, type ) : base( paneControl, detectionRect, type )
{ {
@ -39,10 +45,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
_tabIndex = tabIndex; _tabIndex = tabIndex;
} }
#endregion
LayoutAnchorablePaneControl _targetPane; #region Overrides
int _tabIndex = -1;
protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow ) protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow )
{ {
@ -332,5 +337,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
return null; return null;
} }
#endregion
} }
} }

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTabPanel.cs

@ -15,9 +15,7 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,11 +24,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class AnchorablePaneTabPanel : Panel public class AnchorablePaneTabPanel : Panel
{ {
#region Constructors
public AnchorablePaneTabPanel() public AnchorablePaneTabPanel()
{ {
FlowDirection = System.Windows.FlowDirection.LeftToRight; this.FlowDirection = System.Windows.FlowDirection.LeftToRight;
} }
#endregion
#region Overrides
protected override Size MeasureOverride( Size availableSize ) protected override Size MeasureOverride( Size availableSize )
{ {
@ -103,5 +106,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnMouseLeave( e ); base.OnMouseLeave( e );
} }
#endregion
} }
} }

83
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AnchorablePaneTitle.cs

@ -14,10 +14,7 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
@ -25,9 +22,16 @@ using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class AnchorablePaneTitle : Control public class AnchorablePaneTitle : Control
{ {
#region Members
private bool _isMouseDown = false;
#endregion
#region Constructors
static AnchorablePaneTitle() static AnchorablePaneTitle()
{ {
IsHitTestVisibleProperty.OverrideMetadata( typeof( AnchorablePaneTitle ), new FrameworkPropertyMetadata( true ) ); IsHitTestVisibleProperty.OverrideMetadata( typeof( AnchorablePaneTitle ), new FrameworkPropertyMetadata( true ) );
@ -35,19 +39,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
DefaultStyleKeyProperty.OverrideMetadata( typeof( AnchorablePaneTitle ), new FrameworkPropertyMetadata( typeof( AnchorablePaneTitle ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( AnchorablePaneTitle ), new FrameworkPropertyMetadata( typeof( AnchorablePaneTitle ) ) );
} }
public AnchorablePaneTitle() public AnchorablePaneTitle()
{ {
} }
#endregion
#region Properties
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( AnchorablePaneTitle ),
DependencyProperty.Register("Model", typeof(LayoutAnchorable), typeof(AnchorablePaneTitle),
new FrameworkPropertyMetadata( ( LayoutAnchorable )null, new PropertyChangedCallback( _OnModelChanged ) ) ); new FrameworkPropertyMetadata( ( LayoutAnchorable )null, new PropertyChangedCallback( _OnModelChanged ) ) );
/// <summary> /// <summary>
@ -56,11 +61,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutAnchorable Model public LayoutAnchorable Model
{ {
get { return (LayoutAnchorable)GetValue(ModelProperty); } get
set { SetValue(ModelProperty, value); } {
return ( LayoutAnchorable )GetValue( ModelProperty );
}
set
{
SetValue( ModelProperty, value );
}
} }
static void _OnModelChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) private static void _OnModelChanged( DependencyObject sender, DependencyPropertyChangedEventArgs e )
{ {
( ( AnchorablePaneTitle )sender ).OnModelChanged( e ); ( ( AnchorablePaneTitle )sender ).OnModelChanged( e );
} }
@ -71,25 +82,26 @@ namespace Xceed.Wpf.AvalonDock.Controls
protected virtual void OnModelChanged( DependencyPropertyChangedEventArgs e ) protected virtual void OnModelChanged( DependencyPropertyChangedEventArgs e )
{ {
if( Model != null ) if( Model != null )
SetLayoutItem(Model.Root.Manager.GetLayoutItemFromModel(Model)); {
this.SetLayoutItem( Model.Root.Manager.GetLayoutItemFromModel( Model ) );
}
else else
SetLayoutItem(null); {
this.SetLayoutItem( null );
}
} }
#endregion #endregion
#region LayoutItem #region LayoutItem
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( AnchorablePaneTitle ),
= DependencyProperty.RegisterReadOnly("LayoutItem", typeof(LayoutItem), typeof(AnchorablePaneTitle),
new FrameworkPropertyMetadata( ( LayoutItem )null ) ); new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
= LayoutItemPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the LayoutItem property. This dependency property /// Gets the LayoutItem property. This dependency property
@ -97,7 +109,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutItem LayoutItem public LayoutItem LayoutItem
{ {
get { return (LayoutItem)GetValue(LayoutItemProperty); } get
{
return ( LayoutItem )GetValue( LayoutItemProperty );
}
} }
/// <summary> /// <summary>
@ -107,21 +122,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <param name="value">The new value for the property.</param> /// <param name="value">The new value for the property.</param>
protected void SetLayoutItem( LayoutItem value ) protected void SetLayoutItem( LayoutItem value )
{ {
SetValue(LayoutItemPropertyKey, value); this.SetValue( LayoutItemPropertyKey, value );
} }
#endregion #endregion
#endregion
private void OnHide() #region Overrides
{
Model.Hide();
}
private void OnToggleAutoHide()
{
Model.ToggleAutoHide();
}
protected override void OnMouseMove( System.Windows.Input.MouseEventArgs e ) protected override void OnMouseMove( System.Windows.Input.MouseEventArgs e )
{ {
@ -152,7 +160,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_isMouseDown = false; _isMouseDown = false;
} }
bool _isMouseDown = false;
protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
base.OnMouseLeftButtonDown( e ); base.OnMouseLeftButtonDown( e );
@ -185,5 +192,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( Model != null ) if( Model != null )
Model.IsActive = true;//FocusElementManager.SetFocusOnLastElement(Model); Model.IsActive = true;//FocusElementManager.SetFocusOnLastElement(Model);
} }
#endregion
#region Private Methods
private void OnHide()
{
this.Model.Hide();
}
private void OnToggleAutoHide()
{
this.Model.ToggleAutoHide();
}
#endregion
} }
} }

30
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/AutoHideWindowManager.cs

@ -15,26 +15,32 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Threading; using System.Windows.Threading;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
class AutoHideWindowManager internal class AutoHideWindowManager
{ {
DockingManager _manager; #region Members
private DockingManager _manager;
private WeakReference _currentAutohiddenAnchor = null;
private DispatcherTimer _closeTimer = null;
#endregion
#region Constructors
internal AutoHideWindowManager( DockingManager manager ) internal AutoHideWindowManager( DockingManager manager )
{ {
_manager = manager; _manager = manager;
SetupCloseTimer(); this.SetupCloseTimer();
} }
#endregion
WeakReference _currentAutohiddenAnchor = null; #region Private Methods
public void ShowAutoHideWindow( LayoutAnchorControl anchor ) public void ShowAutoHideWindow( LayoutAnchorControl anchor )
{ {
@ -58,8 +64,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
System.Diagnostics.Debug.Assert( false ); System.Diagnostics.Debug.Assert( false );
} }
DispatcherTimer _closeTimer = null; private void SetupCloseTimer()
void SetupCloseTimer()
{ {
_closeTimer = new DispatcherTimer( DispatcherPriority.Background ); _closeTimer = new DispatcherTimer( DispatcherPriority.Background );
_closeTimer.Interval = TimeSpan.FromMilliseconds( 1500 ); _closeTimer.Interval = TimeSpan.FromMilliseconds( 1500 );
@ -74,17 +79,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
}; };
} }
void StartCloseTimer() private void StartCloseTimer()
{ {
_closeTimer.Start(); _closeTimer.Start();
} }
void StopCloseTimer() private void StopCloseTimer()
{ {
_closeTimer.Stop(); _closeTimer.Stop();
_manager.AutoHideWindow.Hide(); _manager.AutoHideWindow.Hide();
_currentAutohiddenAnchor = null; _currentAutohiddenAnchor = null;
} }
#endregion
} }
} }

9
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/BindingHelper.cs

@ -15,9 +15,6 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.ComponentModel; using System.ComponentModel;
using System.Windows.Data; using System.Windows.Data;
@ -25,8 +22,10 @@ using System.Windows.Threading;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
class BindingHelper internal class BindingHelper
{ {
#region Methods
public static void RebindInactiveBindings( DependencyObject dependencyObject ) public static void RebindInactiveBindings( DependencyObject dependencyObject )
{ {
foreach( PropertyDescriptor property in TypeDescriptor.GetProperties( dependencyObject.GetType() ) ) foreach( PropertyDescriptor property in TypeDescriptor.GetProperties( dependencyObject.GetType() ) )
@ -51,5 +50,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
} }
#endregion
} }
} }

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ContextMenuEx.cs

@ -14,27 +14,27 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class ContextMenuEx : ContextMenu public class ContextMenuEx : ContextMenu
{ {
#region Constructors
static ContextMenuEx() static ContextMenuEx()
{ {
} }
public ContextMenuEx() public ContextMenuEx()
{ {
} }
#endregion
#region Overrides
protected override System.Windows.DependencyObject GetContainerForItemOverride() protected override System.Windows.DependencyObject GetContainerForItemOverride()
{ {
return new MenuItemEx(); return new MenuItemEx();
@ -47,6 +47,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnOpened( e ); base.OnOpened( e );
} }
#endregion
} }
} }

21
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerDropTarget.cs

@ -15,9 +15,7 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,13 +24,23 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal class DockingManagerDropTarget : DropTarget<DockingManager> internal class DockingManagerDropTarget : DropTarget<DockingManager>
{ {
#region Members
private DockingManager _manager;
#endregion
#region Constructors
internal DockingManagerDropTarget( DockingManager manager, Rect detectionRect, DropTargetType type ) internal DockingManagerDropTarget( DockingManager manager, Rect detectionRect, DropTargetType type )
: base( manager, detectionRect, type ) : base( manager, detectionRect, type )
{ {
_manager = manager; _manager = manager;
} }
DockingManager _manager; #endregion
#region Overrides
protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow ) protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow )
{ {
@ -100,8 +108,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Horizontal Orientation = System.Windows.Controls.Orientation.Horizontal
}; };
newOrientedPanel.Children.Add(_manager.Layout.RootPanel);
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel );
_manager.Layout.RootPanel = newOrientedPanel; _manager.Layout.RootPanel = newOrientedPanel;
} }
@ -171,8 +180,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
Orientation = System.Windows.Controls.Orientation.Vertical Orientation = System.Windows.Controls.Orientation.Vertical
}; };
newOrientedPanel.Children.Add(_manager.Layout.RootPanel);
newOrientedPanel.Children.Add( floatingWindow.RootPanel ); newOrientedPanel.Children.Add( floatingWindow.RootPanel );
newOrientedPanel.Children.Insert( 0, _manager.Layout.RootPanel );
_manager.Layout.RootPanel = newOrientedPanel; _manager.Layout.RootPanel = newOrientedPanel;
} }
@ -244,5 +253,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
throw new InvalidOperationException(); throw new InvalidOperationException();
} }
#endregion
} }
} }

15
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DockingManagerOverlayArea.cs

@ -14,16 +14,20 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class DockingManagerOverlayArea : OverlayArea public class DockingManagerOverlayArea : OverlayArea
{ {
#region Members
private DockingManager _manager;
#endregion
#region Constructors
internal DockingManagerOverlayArea( IOverlayWindow overlayWindow, DockingManager manager ) internal DockingManagerOverlayArea( IOverlayWindow overlayWindow, DockingManager manager )
: base( overlayWindow ) : base( overlayWindow )
{ {
@ -34,7 +38,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_manager.TransformActualSizeToAncestor() ) ); _manager.TransformActualSizeToAncestor() ) );
} }
DockingManager _manager; #endregion
} }
} }

18
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneControlOverlayArea.cs

@ -14,17 +14,19 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class DocumentPaneControlOverlayArea : OverlayArea public class DocumentPaneControlOverlayArea : OverlayArea
{ {
#region Members
private LayoutDocumentPaneControl _documentPaneControl;
#endregion
#region Constructors
internal DocumentPaneControlOverlayArea( internal DocumentPaneControlOverlayArea(
IOverlayWindow overlayWindow, IOverlayWindow overlayWindow,
@ -32,13 +34,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
: base( overlayWindow ) : base( overlayWindow )
{ {
_documentPaneControl = documentPaneControl; _documentPaneControl = documentPaneControl;
base.SetScreenDetectionArea(new Rect( base.SetScreenDetectionArea( new Rect( _documentPaneControl.PointToScreenDPI( new Point() ), _documentPaneControl.TransformActualSizeToAncestor() ) );
_documentPaneControl.PointToScreenDPI(new Point()),
_documentPaneControl.TransformActualSizeToAncestor()));
} }
LayoutDocumentPaneControl _documentPaneControl; #endregion
} }
} }

22
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropAsAnchorableTarget.cs

@ -15,18 +15,24 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using System.Diagnostics;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal class DocumentPaneDropAsAnchorableTarget : DropTarget<LayoutDocumentPaneControl> internal class DocumentPaneDropAsAnchorableTarget : DropTarget<LayoutDocumentPaneControl>
{ {
#region Members
private LayoutDocumentPaneControl _targetPane;
int _tabIndex = -1;
#endregion
#region Constructors
internal DocumentPaneDropAsAnchorableTarget( LayoutDocumentPaneControl paneControl, Rect detectionRect, DropTargetType type ) internal DocumentPaneDropAsAnchorableTarget( LayoutDocumentPaneControl paneControl, Rect detectionRect, DropTargetType type )
: base( paneControl, detectionRect, type ) : base( paneControl, detectionRect, type )
{ {
@ -40,10 +46,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
_tabIndex = tabIndex; _tabIndex = tabIndex;
} }
#endregion
LayoutDocumentPaneControl _targetPane; #region Overrides
int _tabIndex = -1;
protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow ) protected override void Drop( LayoutAnchorableFloatingWindow floatingWindow )
{ {
@ -235,9 +240,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
return null; return null;
} }
#endregion
#region Private Methods
bool FindParentLayoutDocumentPane(ILayoutDocumentPane documentPane, out LayoutDocumentPaneGroup containerPaneGroup, out LayoutPanel containerPanel) private bool FindParentLayoutDocumentPane( ILayoutDocumentPane documentPane, out LayoutDocumentPaneGroup containerPaneGroup, out LayoutPanel containerPanel )
{ {
containerPaneGroup = null; containerPaneGroup = null;
containerPanel = null; containerPanel = null;
@ -273,5 +280,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion
} }
} }

26
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneDropTarget.cs

@ -14,19 +14,24 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using System.Diagnostics;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal class DocumentPaneDropTarget : DropTarget<LayoutDocumentPaneControl> internal class DocumentPaneDropTarget : DropTarget<LayoutDocumentPaneControl>
{ {
#region Members
private LayoutDocumentPaneControl _targetPane;
private int _tabIndex = -1;
#endregion
#region Constructors
internal DocumentPaneDropTarget( LayoutDocumentPaneControl paneControl, Rect detectionRect, DropTargetType type ) internal DocumentPaneDropTarget( LayoutDocumentPaneControl paneControl, Rect detectionRect, DropTargetType type )
: base( paneControl, detectionRect, type ) : base( paneControl, detectionRect, type )
{ {
@ -40,10 +45,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
_tabIndex = tabIndex; _tabIndex = tabIndex;
} }
#endregion
LayoutDocumentPaneControl _targetPane; #region Overrides
int _tabIndex = -1;
protected override void Drop( LayoutDocumentFloatingWindow floatingWindow ) protected override void Drop( LayoutDocumentFloatingWindow floatingWindow )
{ {
@ -208,11 +212,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
else else
{ {
var previousIndex = 0;
var previousContainer = ( ( ILayoutPreviousContainer )sourceModel ).PreviousContainer; var previousContainer = ( ( ILayoutPreviousContainer )sourceModel ).PreviousContainer;
if( object.ReferenceEquals( previousContainer, targetModel ) && ( sourceModel.PreviousContainerIndex != -1 ) ) if( object.ReferenceEquals( previousContainer, targetModel ) && ( sourceModel.PreviousContainerIndex != -1 ) )
{ {
i = sourceModel.PreviousContainerIndex; previousIndex = sourceModel.PreviousContainerIndex;
} }
i = previousIndex;
} }
sourceModel.IsActive = false; sourceModel.IsActive = false;
paneModel.Children.Insert( i, sourceModel ); paneModel.Children.Insert( i, sourceModel );
@ -417,6 +424,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
checkPreviousContainer = false; checkPreviousContainer = false;
} }
anchorableToImport.SetCanCloseInternal( true );
paneModel.Children.Insert( i, anchorableToImport ); paneModel.Children.Insert( i, anchorableToImport );
i++; i++;
anchorableToActivate = anchorableToImport; anchorableToActivate = anchorableToImport;
@ -499,5 +508,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return null; return null;
} }
#endregion
} }
} }

19
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneGroupDropTarget.cs

@ -14,26 +14,32 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using System.Diagnostics;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal class DocumentPaneGroupDropTarget : DropTarget<LayoutDocumentPaneGroupControl> internal class DocumentPaneGroupDropTarget : DropTarget<LayoutDocumentPaneGroupControl>
{ {
#region Constructors
internal DocumentPaneGroupDropTarget( LayoutDocumentPaneGroupControl paneControl, Rect detectionRect, DropTargetType type ) internal DocumentPaneGroupDropTarget( LayoutDocumentPaneGroupControl paneControl, Rect detectionRect, DropTargetType type )
: base( paneControl, detectionRect, type ) : base( paneControl, detectionRect, type )
{ {
_targetPane = paneControl; _targetPane = paneControl;
} }
LayoutDocumentPaneGroupControl _targetPane; #endregion
#region Members
private LayoutDocumentPaneGroupControl _targetPane;
#endregion
#region Overrides
protected override void Drop( LayoutDocumentFloatingWindow floatingWindow ) protected override void Drop( LayoutDocumentFloatingWindow floatingWindow )
{ {
@ -72,6 +78,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
int i = 0; int i = 0;
foreach( var anchorableToImport in layoutAnchorablePaneGroup.Descendents().OfType<LayoutAnchorable>().ToArray() ) foreach( var anchorableToImport in layoutAnchorablePaneGroup.Descendents().OfType<LayoutAnchorable>().ToArray() )
{ {
anchorableToImport.SetCanCloseInternal( true );
paneModel.Children.Insert( i, anchorableToImport ); paneModel.Children.Insert( i, anchorableToImport );
i++; i++;
} }
@ -101,5 +109,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return null; return null;
} }
#endregion
} }
} }

13
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DocumentPaneTabPanel.cs

@ -15,9 +15,7 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,11 +24,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class DocumentPaneTabPanel : Panel public class DocumentPaneTabPanel : Panel
{ {
#region Constructors
public DocumentPaneTabPanel() public DocumentPaneTabPanel()
{ {
FlowDirection = System.Windows.FlowDirection.LeftToRight; this.FlowDirection = System.Windows.FlowDirection.LeftToRight;
} }
#endregion
#region Overrides
protected override Size MeasureOverride( Size availableSize ) protected override Size MeasureOverride( Size availableSize )
{ {
var visibleChildren = Children.Cast<UIElement>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed ); var visibleChildren = Children.Cast<UIElement>().Where( ch => ch.Visibility != System.Windows.Visibility.Collapsed );
@ -85,7 +89,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e ) protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e )
{ {
//if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed && //if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed &&
@ -102,5 +105,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnMouseLeave( e ); base.OnMouseLeave( e );
} }
#endregion
} }
} }

49
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DragService.cs

@ -14,21 +14,28 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Windows; using System.Windows;
using System.Diagnostics;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
class DragService internal class DragService
{ {
DockingManager _manager; #region Members
LayoutFloatingWindowControl _floatingWindow;
private DockingManager _manager;
private LayoutFloatingWindowControl _floatingWindow;
private List<IOverlayWindowHost> _overlayWindowHosts = new List<IOverlayWindowHost>();
private IOverlayWindowHost _currentHost;
private IOverlayWindow _currentWindow;
private List<IDropArea> _currentWindowAreas = new List<IDropArea>();
private IDropTarget _currentDropTarget;
#endregion
#region Public Methods
public DragService( LayoutFloatingWindowControl floatingWindow ) public DragService( LayoutFloatingWindowControl floatingWindow )
{ {
@ -39,18 +46,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
GetOverlayWindowHosts(); GetOverlayWindowHosts();
} }
List<IOverlayWindowHost> _overlayWindowHosts = new List<IOverlayWindowHost>();
void GetOverlayWindowHosts()
{
_overlayWindowHosts.AddRange(_manager.GetFloatingWindowsByZOrder().OfType<LayoutAnchorableFloatingWindowControl>().Where(fw => fw != _floatingWindow && fw.IsVisible));
_overlayWindowHosts.Add(_manager);
}
IOverlayWindowHost _currentHost;
IOverlayWindow _currentWindow;
List<IDropArea> _currentWindowAreas = new List<IDropArea>();
IDropTarget _currentDropTarget;
public void UpdateMouseLocation( Point dragPosition ) public void UpdateMouseLocation( Point dragPosition )
{ {
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow; var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
@ -171,6 +166,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
_currentHost = null; _currentHost = null;
} }
#endregion
#region Internal Methods
internal void Abort() internal void Abort()
{ {
var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow; var floatingWindowModel = _floatingWindow.Model as LayoutFloatingWindow;
@ -186,5 +185,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
_currentHost.HideOverlayWindow(); _currentHost.HideOverlayWindow();
_currentHost = null; _currentHost = null;
} }
#endregion
#region Private Methods
private void GetOverlayWindowHosts()
{
_overlayWindowHosts.AddRange( _manager.GetFloatingWindowsByZOrder().OfType<LayoutAnchorableFloatingWindowControl>().Where( fw => fw != _floatingWindow && fw.IsVisible ) );
_overlayWindowHosts.Add( _manager );
}
#endregion
} }
} }

46
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropArea.cs

@ -14,10 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
@ -25,24 +21,36 @@ namespace Xceed.Wpf.AvalonDock.Controls
public enum DropAreaType public enum DropAreaType
{ {
DockingManager, DockingManager,
DocumentPane, DocumentPane,
DocumentPaneGroup, DocumentPaneGroup,
AnchorablePane, AnchorablePane,
} }
public interface IDropArea public interface IDropArea
{ {
Rect DetectionRect { get; } Rect DetectionRect
DropAreaType Type { get; } {
get;
}
DropAreaType Type
{
get;
}
} }
public class DropArea<T> : IDropArea where T : FrameworkElement public class DropArea<T> : IDropArea where T : FrameworkElement
{ {
#region Members
private Rect _detectionRect;
private DropAreaType _type;
private T _element;
#endregion
#region Constructors
internal DropArea( T areaElement, DropAreaType type ) internal DropArea( T areaElement, DropAreaType type )
{ {
_element = areaElement; _element = areaElement;
@ -50,21 +58,26 @@ namespace Xceed.Wpf.AvalonDock.Controls
_type = type; _type = type;
} }
Rect _detectionRect; #endregion
#region Properties
public Rect DetectionRect public Rect DetectionRect
{ {
get { return _detectionRect; } get
{
return _detectionRect;
}
} }
DropAreaType _type;
public DropAreaType Type public DropAreaType Type
{ {
get { return _type; } get
{
return _type;
}
} }
T _element;
public T AreaElement public T AreaElement
{ {
get get
@ -73,5 +86,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
} }
} }

55
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownButton.cs

@ -14,34 +14,32 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data;
using System.Diagnostics;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class DropDownButton : ToggleButton public class DropDownButton : ToggleButton
{ {
#region Constructors
public DropDownButton() public DropDownButton()
{ {
this.Unloaded += new RoutedEventHandler( DropDownButton_Unloaded ); this.Unloaded += new RoutedEventHandler( DropDownButton_Unloaded );
} }
#endregion
#region Properties
#region DropDownContextMenu #region DropDownContextMenu
/// <summary> /// <summary>
/// DropDownContextMenu Dependency Property /// DropDownContextMenu Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DropDownContextMenuProperty = public static readonly DependencyProperty DropDownContextMenuProperty = DependencyProperty.Register( "DropDownContextMenu", typeof( ContextMenu ), typeof( DropDownButton ),
DependencyProperty.Register("DropDownContextMenu", typeof(ContextMenu), typeof(DropDownButton), new FrameworkPropertyMetadata( ( ContextMenu )null, new PropertyChangedCallback( OnDropDownContextMenuChanged ) ) );
new FrameworkPropertyMetadata((ContextMenu)null,
new PropertyChangedCallback(OnDropDownContextMenuChanged)));
/// <summary> /// <summary>
/// Gets or sets the DropDownContextMenu property. This dependency property /// Gets or sets the DropDownContextMenu property. This dependency property
@ -49,8 +47,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public ContextMenu DropDownContextMenu public ContextMenu DropDownContextMenu
{ {
get { return (ContextMenu)GetValue(DropDownContextMenuProperty); } get
set { SetValue(DropDownContextMenuProperty, value); } {
return ( ContextMenu )GetValue( DropDownContextMenuProperty );
}
set
{
SetValue( DropDownContextMenuProperty, value );
}
} }
/// <summary> /// <summary>
@ -78,8 +82,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// DropDownContextMenuDataContext Dependency Property /// DropDownContextMenuDataContext Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DropDownContextMenuDataContextProperty = public static readonly DependencyProperty DropDownContextMenuDataContextProperty = DependencyProperty.Register( "DropDownContextMenuDataContext", typeof( object ), typeof( DropDownButton ),
DependencyProperty.Register("DropDownContextMenuDataContext", typeof(object), typeof(DropDownButton),
new FrameworkPropertyMetadata( ( object )null ) ); new FrameworkPropertyMetadata( ( object )null ) );
/// <summary> /// <summary>
@ -88,12 +91,22 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public object DropDownContextMenuDataContext public object DropDownContextMenuDataContext
{ {
get { return (object)GetValue(DropDownContextMenuDataContextProperty); } get
set { SetValue(DropDownContextMenuDataContextProperty, value); } {
return ( object )GetValue( DropDownContextMenuDataContextProperty );
}
set
{
SetValue( DropDownContextMenuDataContextProperty, value );
}
} }
#endregion #endregion
#endregion
#region Overrides
protected override void OnClick() protected override void OnClick()
{ {
if( DropDownContextMenu != null ) if( DropDownContextMenu != null )
@ -109,7 +122,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnClick(); base.OnClick();
} }
void OnContextMenuClosed(object sender, RoutedEventArgs e) #endregion
#region Private Methods
private void OnContextMenuClosed( object sender, RoutedEventArgs e )
{ {
//Debug.Assert(IsChecked.GetValueOrDefault()); //Debug.Assert(IsChecked.GetValueOrDefault());
var ctxMenu = sender as ContextMenu; var ctxMenu = sender as ContextMenu;
@ -117,7 +134,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
IsChecked = false; IsChecked = false;
} }
void DropDownButton_Unloaded(object sender, RoutedEventArgs e) private void DropDownButton_Unloaded( object sender, RoutedEventArgs e )
{ {
// When changing theme, Unloaded event is called, erasing the DropDownContextMenu. // When changing theme, Unloaded event is called, erasing the DropDownContextMenu.
// Prevent this on theme changes. // Prevent this on theme changes.
@ -127,6 +144,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
} }
} }

49
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropDownControlArea.cs

@ -14,21 +14,16 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Input;
using System.Diagnostics;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class DropDownControlArea : UserControl public class DropDownControlArea : UserControl
{ {
#region Constructors
//static DropDownControlArea() //static DropDownControlArea()
//{ //{
// //IsHitTestVisibleProperty.OverrideMetadata(typeof(DropDownControlArea), new FrameworkPropertyMetadata(true)); // //IsHitTestVisibleProperty.OverrideMetadata(typeof(DropDownControlArea), new FrameworkPropertyMetadata(true));
@ -36,16 +31,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
public DropDownControlArea() public DropDownControlArea()
{ {
} }
#endregion
#region Properties
#region DropDownContextMenu #region DropDownContextMenu
/// <summary> /// <summary>
/// DropDownContextMenu Dependency Property /// DropDownContextMenu Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DropDownContextMenuProperty = public static readonly DependencyProperty DropDownContextMenuProperty = DependencyProperty.Register( "DropDownContextMenu", typeof( ContextMenu ), typeof( DropDownControlArea ),
DependencyProperty.Register("DropDownContextMenu", typeof(ContextMenu), typeof(DropDownControlArea),
new FrameworkPropertyMetadata( ( ContextMenu )null ) ); new FrameworkPropertyMetadata( ( ContextMenu )null ) );
/// <summary> /// <summary>
@ -54,8 +51,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public ContextMenu DropDownContextMenu public ContextMenu DropDownContextMenu
{ {
get { return (ContextMenu)GetValue(DropDownContextMenuProperty); } get
set { SetValue(DropDownContextMenuProperty, value); } {
return ( ContextMenu )GetValue( DropDownContextMenuProperty );
}
set
{
SetValue( DropDownContextMenuProperty, value );
}
} }
#endregion #endregion
@ -65,8 +68,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// DropDownContextMenuDataContext Dependency Property /// DropDownContextMenuDataContext Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DropDownContextMenuDataContextProperty = public static readonly DependencyProperty DropDownContextMenuDataContextProperty = DependencyProperty.Register( "DropDownContextMenuDataContext", typeof( object ), typeof( DropDownControlArea ),
DependencyProperty.Register("DropDownContextMenuDataContext", typeof(object), typeof(DropDownControlArea),
new FrameworkPropertyMetadata( ( object )null ) ); new FrameworkPropertyMetadata( ( object )null ) );
/// <summary> /// <summary>
@ -75,17 +77,25 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public object DropDownContextMenuDataContext public object DropDownContextMenuDataContext
{ {
get { return (object)GetValue(DropDownContextMenuDataContextProperty); } get
set { SetValue(DropDownContextMenuDataContextProperty, value); } {
return ( object )GetValue( DropDownContextMenuDataContextProperty );
}
set
{
SetValue( DropDownContextMenuDataContextProperty, value );
}
} }
#endregion #endregion
#endregion
#region Overrides
protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseRightButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
base.OnMouseRightButtonDown( e ); base.OnMouseRightButtonDown( e );
} }
protected override void OnPreviewMouseRightButtonUp( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnPreviewMouseRightButtonUp( System.Windows.Input.MouseButtonEventArgs e )
@ -105,7 +115,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
//protected override System.Windows.Media.HitTestResult HitTestCore(System.Windows.Media.PointHitTestParameters hitTestParameters) //protected override System.Windows.Media.HitTestResult HitTestCore(System.Windows.Media.PointHitTestParameters hitTestParameters)
//{ //{
// var hitResult = base.HitTestCore(hitTestParameters); // var hitResult = base.HitTestCore(hitTestParameters);
@ -114,5 +123,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
// return hitResult; // return hitResult;
//} //}
#endregion
} }
} }

51
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTarget.cs

@ -17,7 +17,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -27,6 +26,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal abstract class DropTarget<T> : DropTargetBase, IDropTarget where T : FrameworkElement internal abstract class DropTarget<T> : DropTargetBase, IDropTarget where T : FrameworkElement
{ {
#region Members
private Rect[] _detectionRect;
private T _targetElement;
private DropTargetType _type;
#endregion
#region Constructors
protected DropTarget( T targetElement, Rect detectionRect, DropTargetType type ) protected DropTarget( T targetElement, Rect detectionRect, DropTargetType type )
{ {
_targetElement = targetElement; _targetElement = targetElement;
@ -41,33 +50,49 @@ namespace Xceed.Wpf.AvalonDock.Controls
_type = type; _type = type;
} }
Rect[] _detectionRect; #endregion
#region Properties
public Rect[] DetectionRects public Rect[] DetectionRects
{ {
get { return _detectionRect; } get
{
return _detectionRect;
}
} }
T _targetElement;
public T TargetElement public T TargetElement
{ {
get { return _targetElement; } get
{
return _targetElement;
}
} }
DropTargetType _type;
public DropTargetType Type public DropTargetType Type
{ {
get { return _type; } get
{
return _type;
} }
}
#endregion
#region Overrides
protected virtual void Drop( LayoutAnchorableFloatingWindow floatingWindow ) protected virtual void Drop( LayoutAnchorableFloatingWindow floatingWindow )
{ } {
}
protected virtual void Drop( LayoutDocumentFloatingWindow floatingWindow ) protected virtual void Drop( LayoutDocumentFloatingWindow floatingWindow )
{ } {
}
#endregion
#region Public Methods
public void Drop( LayoutFloatingWindow floatingWindow ) public void Drop( LayoutFloatingWindow floatingWindow )
{ {
@ -100,8 +125,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
public abstract Geometry GetPreviewPath( OverlayWindow overlayWindow, LayoutFloatingWindow floatingWindow ); public abstract Geometry GetPreviewPath( OverlayWindow overlayWindow, LayoutFloatingWindow floatingWindow );
public void DragEnter() public void DragEnter()
{ {
SetIsDraggingOver( TargetElement, true ); SetIsDraggingOver( TargetElement, true );
@ -111,5 +134,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
SetIsDraggingOver( TargetElement, false ); SetIsDraggingOver( TargetElement, false );
} }
#endregion
} }
} }

11
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetBase.cs

@ -14,23 +14,20 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
abstract class DropTargetBase : DependencyObject abstract class DropTargetBase : DependencyObject
{ {
#region Properties
#region IsDraggingOver #region IsDraggingOver
/// <summary> /// <summary>
/// IsDraggingOver Attached Dependency Property /// IsDraggingOver Attached Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IsDraggingOverProperty = public static readonly DependencyProperty IsDraggingOverProperty = DependencyProperty.RegisterAttached( "IsDraggingOver", typeof( bool ), typeof( DropTargetBase ),
DependencyProperty.RegisterAttached("IsDraggingOver", typeof(bool), typeof(DropTargetBase),
new FrameworkPropertyMetadata( ( bool )false ) ); new FrameworkPropertyMetadata( ( bool )false ) );
/// <summary> /// <summary>
@ -52,5 +49,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion #endregion
#endregion
} }
} }

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/DropTargetType.cs

@ -14,11 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public enum DropTargetType public enum DropTargetType

4
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/Extentions.cs

@ -14,14 +14,11 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Media3D; using System.Windows.Media.Media3D;
using System.Runtime.InteropServices;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -115,6 +112,5 @@ namespace Xceed.Wpf.AvalonDock.Controls
while( target != null && !( target is T ) ); while( target != null && !( target is T ) );
return target as T; return target as T;
} }
} }
} }

108
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FocusElementManager.cs

@ -17,7 +17,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows; using System.Windows;
@ -30,8 +29,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal static class FocusElementManager internal static class FocusElementManager
{ {
#region Focus Management #region Member
static List<DockingManager> _managers = new List<DockingManager>();
private static List<DockingManager> _managers = new List<DockingManager>();
private static FullWeakDictionary<ILayoutElement, IInputElement> _modelFocusedElement = new FullWeakDictionary<ILayoutElement, IInputElement>();
private static WeakDictionary<ILayoutElement, IntPtr> _modelFocusedWindowHandle = new WeakDictionary<ILayoutElement, IntPtr>();
private static WeakReference _lastFocusedElement;
private static WindowHookHandler _windowHandler = null;
private static DispatcherOperation _setFocusAsyncOperation;
private static WeakReference _lastFocusedElementBeforeEnterMenuMode = null;
#endregion
#region Internal Methods
internal static void SetupFocusManagement( DockingManager manager ) internal static void SetupFocusManagement( DockingManager manager )
{ {
if( _managers.Count == 0 ) if( _managers.Count == 0 )
@ -71,44 +82,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
private static void Current_Exit(object sender, ExitEventArgs e)
{
Application.Current.Exit -= new ExitEventHandler(Current_Exit);
if (_windowHandler != null)
{
_windowHandler.FocusChanged -= new EventHandler<FocusChangeEventArgs>(WindowFocusChanging);
//_windowHandler.Activate -= new EventHandler<WindowActivateEventArgs>(WindowActivating);
_windowHandler.Detach();
_windowHandler = null;
}
}
static void manager_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
{
var focusedElement = e.NewFocus as Visual;
if (focusedElement != null &&
!(focusedElement is LayoutAnchorableTabItem || focusedElement is LayoutDocumentTabItem))
//Avoid tracking focus for elements like this
{
var parentAnchorable = focusedElement.FindVisualAncestor<LayoutAnchorableControl>();
if (parentAnchorable != null)
{
_modelFocusedElement[parentAnchorable.Model] = e.NewFocus;
}
else
{
var parentDocument = focusedElement.FindVisualAncestor<LayoutDocumentControl>();
if (parentDocument != null)
{
_modelFocusedElement[parentDocument.Model] = e.NewFocus;
}
}
}
}
static FullWeakDictionary<ILayoutElement, IInputElement> _modelFocusedElement = new FullWeakDictionary<ILayoutElement, IInputElement>();
static WeakDictionary<ILayoutElement, IntPtr> _modelFocusedWindowHandle = new WeakDictionary<ILayoutElement, IntPtr>();
/// <summary> /// <summary>
/// Get the input element that was focused before user left the layout element /// Get the input element that was focused before user left the layout element
/// </summary> /// </summary>
@ -137,7 +110,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return IntPtr.Zero; return IntPtr.Zero;
} }
static WeakReference _lastFocusedElement;
/// <summary> /// <summary>
/// Given a layout element tries to set the focus of the keyword where it was before user moved to another element /// Given a layout element tries to set the focus of the keyword where it was before user moved to another element
@ -164,9 +136,46 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
static WindowHookHandler _windowHandler = null; #endregion
#region Private Methods
private static void Current_Exit( object sender, ExitEventArgs e )
{
Application.Current.Exit -= new ExitEventHandler( Current_Exit );
if( _windowHandler != null )
{
_windowHandler.FocusChanged -= new EventHandler<FocusChangeEventArgs>( WindowFocusChanging );
//_windowHandler.Activate -= new EventHandler<WindowActivateEventArgs>(WindowActivating);
_windowHandler.Detach();
_windowHandler = null;
}
}
static void WindowFocusChanging(object sender, FocusChangeEventArgs e) private static void manager_PreviewGotKeyboardFocus( object sender, KeyboardFocusChangedEventArgs e )
{
var focusedElement = e.NewFocus as Visual;
if( focusedElement != null &&
!( focusedElement is LayoutAnchorableTabItem || focusedElement is LayoutDocumentTabItem ) )
//Avoid tracking focus for elements like this
{
var parentAnchorable = focusedElement.FindVisualAncestor<LayoutAnchorableControl>();
if( parentAnchorable != null )
{
_modelFocusedElement[ parentAnchorable.Model ] = e.NewFocus;
}
else
{
var parentDocument = focusedElement.FindVisualAncestor<LayoutDocumentControl>();
if( parentDocument != null )
{
_modelFocusedElement[ parentDocument.Model ] = e.NewFocus;
}
}
}
}
private static void WindowFocusChanging( object sender, FocusChangeEventArgs e )
{ {
foreach( var manager in _managers ) foreach( var manager in _managers )
{ {
@ -195,9 +204,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
static DispatcherOperation _setFocusAsyncOperation; private static void WindowActivating( object sender, WindowActivateEventArgs e )
static void WindowActivating(object sender, WindowActivateEventArgs e)
{ {
if( Keyboard.FocusedElement == null && if( Keyboard.FocusedElement == null &&
_lastFocusedElement != null && _lastFocusedElement != null &&
@ -232,9 +239,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
private static void InputManager_EnterMenuMode( object sender, EventArgs e )
static WeakReference _lastFocusedElementBeforeEnterMenuMode = null;
static void InputManager_EnterMenuMode(object sender, EventArgs e)
{ {
if( Keyboard.FocusedElement == null ) if( Keyboard.FocusedElement == null )
return; return;
@ -248,7 +253,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_lastFocusedElementBeforeEnterMenuMode = new WeakReference( Keyboard.FocusedElement ); _lastFocusedElementBeforeEnterMenuMode = new WeakReference( Keyboard.FocusedElement );
} }
static void InputManager_LeaveMenuMode(object sender, EventArgs e) private static void InputManager_LeaveMenuMode( object sender, EventArgs e )
{ {
if( _lastFocusedElementBeforeEnterMenuMode != null && if( _lastFocusedElementBeforeEnterMenuMode != null &&
_lastFocusedElementBeforeEnterMenuMode.IsAlive ) _lastFocusedElementBeforeEnterMenuMode.IsAlive )
@ -263,6 +268,5 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion #endregion
} }
} }

24
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/FullWeakDictionary.cs

@ -16,18 +16,27 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
class FullWeakDictionary<K,V> where K : class internal class FullWeakDictionary<K, V> where K : class
{ {
#region Members
private List<WeakReference> _keys = new List<WeakReference>();
private List<WeakReference> _values = new List<WeakReference>();
#endregion
#region Constructors
public FullWeakDictionary() public FullWeakDictionary()
{} {
}
#endregion
List<WeakReference> _keys = new List<WeakReference>(); #region Public Methods
List<WeakReference> _values = new List<WeakReference>();
public V this[ K key ] public V this[ K key ]
{ {
@ -74,7 +83,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return true; return true;
} }
void CollectGarbage() void CollectGarbage()
{ {
int vIndex = 0; int vIndex = 0;
@ -102,5 +110,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
while( vIndex >= 0 ); while( vIndex >= 0 );
} }
#endregion
} }
} }

19
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IDropTarget.cs

@ -14,10 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,16 +22,27 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal interface IDropTarget internal interface IDropTarget
{ {
#region Properties
DropTargetType Type
{
get;
}
#endregion
#region Methods
Geometry GetPreviewPath( OverlayWindow overlayWindow, LayoutFloatingWindow floatingWindow ); Geometry GetPreviewPath( OverlayWindow overlayWindow, LayoutFloatingWindow floatingWindow );
bool HitTest( Point dragPoint ); bool HitTest( Point dragPoint );
DropTargetType Type { get; }
void Drop( LayoutFloatingWindow floatingWindow ); void Drop( LayoutFloatingWindow floatingWindow );
void DragEnter(); void DragEnter();
void DragLeave(); void DragLeave();
#endregion
} }
} }

3
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindow.cs

@ -14,10 +14,7 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {

9
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowArea.cs

@ -14,16 +14,15 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal interface IOverlayWindowArea internal interface IOverlayWindowArea
{ {
Rect ScreenDetectionArea { get; } Rect ScreenDetectionArea
{
get;
}
} }
} }

14
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowDropTarget.cs

@ -14,18 +14,20 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
interface IOverlayWindowDropTarget interface IOverlayWindowDropTarget
{ {
Rect ScreenDetectionArea { get; } Rect ScreenDetectionArea
{
get;
}
OverlayWindowDropTargetType Type { get; } OverlayWindowDropTargetType Type
{
get;
}
} }
} }

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/IOverlayWindowHost.cs

@ -14,16 +14,24 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
internal interface IOverlayWindowHost internal interface IOverlayWindowHost
{ {
#region Properties
DockingManager Manager
{
get;
}
#endregion
#region Methods
bool HitTest( Point dragPoint ); bool HitTest( Point dragPoint );
IOverlayWindow ShowOverlayWindow( LayoutFloatingWindowControl draggingWindow ); IOverlayWindow ShowOverlayWindow( LayoutFloatingWindowControl draggingWindow );
@ -32,6 +40,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
IEnumerable<IDropArea> GetDropAreas( LayoutFloatingWindowControl draggingWindow ); IEnumerable<IDropArea> GetDropAreas( LayoutFloatingWindowControl draggingWindow );
DockingManager Manager { get; } #endregion
} }
} }

130
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorControl.cs

@ -24,13 +24,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorControl : Control, ILayoutControl public class LayoutAnchorControl : Control, ILayoutControl
{ {
#region Members
private LayoutAnchorable _model;
private DispatcherTimer _openUpTimer = null;
#endregion
#region Constructors
static LayoutAnchorControl() static LayoutAnchorControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorControl ) ) );
Control.IsHitTestVisibleProperty.AddOwner( typeof( LayoutAnchorControl ), new FrameworkPropertyMetadata( true ) ); Control.IsHitTestVisibleProperty.AddOwner( typeof( LayoutAnchorControl ), new FrameworkPropertyMetadata( true ) );
} }
internal LayoutAnchorControl( LayoutAnchorable model ) internal LayoutAnchorControl( LayoutAnchorable model )
{ {
_model = model; _model = model;
@ -40,7 +48,61 @@ namespace Xceed.Wpf.AvalonDock.Controls
SetSide( _model.FindParent<LayoutAnchorSide>().Side ); SetSide( _model.FindParent<LayoutAnchorSide>().Side );
} }
void _model_IsSelectedChanged( object sender, EventArgs e ) #endregion
#region Properties
#region Model
public ILayoutElement Model
{
get
{
return _model;
}
}
#endregion
#region Side
/// <summary>
/// Side Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey SidePropertyKey = DependencyProperty.RegisterReadOnly( "Side", typeof( AnchorSide ), typeof( LayoutAnchorControl ),
new FrameworkPropertyMetadata( ( AnchorSide )AnchorSide.Left ) );
public static readonly DependencyProperty SideProperty = SidePropertyKey.DependencyProperty;
/// <summary>
/// Gets the Side property. This dependency property
/// indicates the anchor side of the control.
/// </summary>
public AnchorSide Side
{
get
{
return ( AnchorSide )GetValue( SideProperty );
}
}
/// <summary>
/// Provides a secure method for setting the Side property.
/// This dependency property indicates the anchor side of the control.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetSide( AnchorSide value )
{
SetValue( SidePropertyKey, value );
}
#endregion
#endregion
#region Private Methods
private void _model_IsSelectedChanged( object sender, EventArgs e )
{ {
if( !_model.IsAutoHidden ) if( !_model.IsAutoHidden )
_model.IsSelectedChanged -= new EventHandler( _model_IsSelectedChanged ); _model.IsSelectedChanged -= new EventHandler( _model_IsSelectedChanged );
@ -51,7 +113,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void _model_IsActiveChanged( object sender, EventArgs e ) private void _model_IsActiveChanged( object sender, EventArgs e )
{ {
if( !_model.IsAutoHidden ) if( !_model.IsAutoHidden )
_model.IsActiveChanged -= new EventHandler( _model_IsActiveChanged ); _model.IsActiveChanged -= new EventHandler( _model_IsActiveChanged );
@ -59,16 +121,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model.Root.Manager.ShowAutoHideWindow( this ); _model.Root.Manager.ShowAutoHideWindow( this );
} }
LayoutAnchorable _model; private void _openUpTimer_Tick( object sender, EventArgs e )
public ILayoutElement Model
{ {
get _openUpTimer.Tick -= new EventHandler( _openUpTimer_Tick );
{ _openUpTimer.Stop();
return _model; _openUpTimer = null;
} _model.Root.Manager.ShowAutoHideWindow( this );
} }
#endregion
#region Overrides
//protected override void OnVisualParentChanged(DependencyObject oldParent) //protected override void OnVisualParentChanged(DependencyObject oldParent)
//{ //{
// base.OnVisualParentChanged(oldParent); // base.OnVisualParentChanged(oldParent);
@ -110,9 +174,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
DispatcherTimer _openUpTimer = null;
protected override void OnMouseEnter( System.Windows.Input.MouseEventArgs e ) protected override void OnMouseEnter( System.Windows.Input.MouseEventArgs e )
{ {
base.OnMouseEnter( e ); base.OnMouseEnter( e );
@ -126,14 +187,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void _openUpTimer_Tick( object sender, EventArgs e )
{
_openUpTimer.Tick -= new EventHandler( _openUpTimer_Tick );
_openUpTimer.Stop();
_openUpTimer = null;
_model.Root.Manager.ShowAutoHideWindow( this );
}
protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e ) protected override void OnMouseLeave( System.Windows.Input.MouseEventArgs e )
{ {
if( _openUpTimer != null ) if( _openUpTimer != null )
@ -146,41 +199,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#region Side
/// <summary>
/// Side Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey SidePropertyKey
= DependencyProperty.RegisterReadOnly( "Side", typeof( AnchorSide ), typeof( LayoutAnchorControl ),
new FrameworkPropertyMetadata( ( AnchorSide )AnchorSide.Left ) );
public static readonly DependencyProperty SideProperty
= SidePropertyKey.DependencyProperty;
/// <summary>
/// Gets the Side property. This dependency property
/// indicates the anchor side of the control.
/// </summary>
public AnchorSide Side
{
get
{
return ( AnchorSide )GetValue( SideProperty );
}
}
/// <summary>
/// Provides a secure method for setting the Side property.
/// This dependency property indicates the anchor side of the control.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetSide( AnchorSide value )
{
SetValue( SidePropertyKey, value );
}
#endregion #endregion
} }
} }

51
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorGroupControl.cs

@ -14,10 +14,7 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -27,12 +24,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorGroupControl : Control, ILayoutControl public class LayoutAnchorGroupControl : Control, ILayoutControl
{ {
#region Members
private ObservableCollection<LayoutAnchorControl> _childViews = new ObservableCollection<LayoutAnchorControl>();
private LayoutAnchorGroup _model;
#endregion
#region Constructors
static LayoutAnchorGroupControl() static LayoutAnchorGroupControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorGroupControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorGroupControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorGroupControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorGroupControl ) ) );
} }
internal LayoutAnchorGroupControl( LayoutAnchorGroup model ) internal LayoutAnchorGroupControl( LayoutAnchorGroup model )
{ {
_model = model; _model = model;
@ -41,6 +46,30 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model.Children.CollectionChanged += ( s, e ) => OnModelChildrenCollectionChanged( e ); _model.Children.CollectionChanged += ( s, e ) => OnModelChildrenCollectionChanged( e );
} }
#endregion
#region Properties
public ObservableCollection<LayoutAnchorControl> Children
{
get
{
return _childViews;
}
}
public ILayoutElement Model
{
get
{
return _model;
}
}
#endregion
#region Private Methods
private void CreateChildrenViews() private void CreateChildrenViews()
{ {
var manager = _model.Root.Manager; var manager = _model.Root.Manager;
@ -82,18 +111,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
ObservableCollection<LayoutAnchorControl> _childViews = new ObservableCollection<LayoutAnchorControl>(); #endregion
public ObservableCollection<LayoutAnchorControl> Children
{
get { return _childViews; }
}
LayoutAnchorGroup _model;
public ILayoutElement Model
{
get { return _model; }
}
} }
} }

158
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorSideControl.cs

@ -25,12 +25,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorSideControl : Control, ILayoutControl public class LayoutAnchorSideControl : Control, ILayoutControl
{ {
#region Members
private LayoutAnchorSide _model = null;
private ObservableCollection<LayoutAnchorGroupControl> _childViews = new ObservableCollection<LayoutAnchorGroupControl>();
#endregion
#region Constructors
static LayoutAnchorSideControl() static LayoutAnchorSideControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorSideControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorSideControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorSideControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorSideControl ) ) );
} }
internal LayoutAnchorSideControl( LayoutAnchorSide model ) internal LayoutAnchorSideControl( LayoutAnchorSide model )
{ {
if( model == null ) if( model == null )
@ -46,42 +55,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
UpdateSide(); UpdateSide();
} }
private void CreateChildrenViews() #endregion
{
var manager = _model.Root.Manager;
foreach( var childModel in _model.Children )
{
_childViews.Add( manager.CreateUIElementForModel( childModel ) as LayoutAnchorGroupControl );
}
}
private void OnModelChildrenCollectionChanged( System.Collections.Specialized.NotifyCollectionChangedEventArgs e ) #region Properties
{
if( e.OldItems != null &&
( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove ||
e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Replace ) )
{
foreach( var childModel in e.OldItems )
_childViews.Remove( _childViews.First( cv => cv.Model == childModel ) );
}
if( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset ) #region Model
_childViews.Clear();
if( e.NewItems != null &&
( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add ||
e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Replace ) )
{
var manager = _model.Root.Manager;
int insertIndex = e.NewStartingIndex;
foreach( LayoutAnchorGroup childModel in e.NewItems )
{
_childViews.Insert( insertIndex++, manager.CreateUIElementForModel( childModel ) as LayoutAnchorGroupControl );
}
}
}
LayoutAnchorSide _model = null;
public ILayoutElement Model public ILayoutElement Model
{ {
get get
@ -90,7 +69,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
ObservableCollection<LayoutAnchorGroupControl> _childViews = new ObservableCollection<LayoutAnchorGroupControl>(); #endregion
#region Children
public ObservableCollection<LayoutAnchorGroupControl> Children public ObservableCollection<LayoutAnchorGroupControl> Children
{ {
@ -100,36 +81,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void UpdateSide() #endregion
{
switch( _model.Side )
{
case AnchorSide.Left:
SetIsLeftSide( true );
break;
case AnchorSide.Top:
SetIsTopSide( true );
break;
case AnchorSide.Right:
SetIsRightSide( true );
break;
case AnchorSide.Bottom:
SetIsBottomSide( true );
break;
}
}
#region IsLeftSide #region IsLeftSide
/// <summary> /// <summary>
/// IsLeftSide Read-Only Dependency Property /// IsLeftSide Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey IsLeftSidePropertyKey private static readonly DependencyPropertyKey IsLeftSidePropertyKey = DependencyProperty.RegisterReadOnly( "IsLeftSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
= DependencyProperty.RegisterReadOnly( "IsLeftSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
new FrameworkPropertyMetadata( ( bool )false ) ); new FrameworkPropertyMetadata( ( bool )false ) );
public static readonly DependencyProperty IsLeftSideProperty public static readonly DependencyProperty IsLeftSideProperty = IsLeftSidePropertyKey.DependencyProperty;
= IsLeftSidePropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the IsLeftSide property. This dependency property /// Gets the IsLeftSide property. This dependency property
@ -160,12 +122,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// IsTopSide Read-Only Dependency Property /// IsTopSide Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey IsTopSidePropertyKey private static readonly DependencyPropertyKey IsTopSidePropertyKey = DependencyProperty.RegisterReadOnly( "IsTopSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
= DependencyProperty.RegisterReadOnly( "IsTopSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
new FrameworkPropertyMetadata( ( bool )false ) ); new FrameworkPropertyMetadata( ( bool )false ) );
public static readonly DependencyProperty IsTopSideProperty public static readonly DependencyProperty IsTopSideProperty = IsTopSidePropertyKey.DependencyProperty;
= IsTopSidePropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the IsTopSide property. This dependency property /// Gets the IsTopSide property. This dependency property
@ -196,12 +156,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// IsRightSide Read-Only Dependency Property /// IsRightSide Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey IsRightSidePropertyKey private static readonly DependencyPropertyKey IsRightSidePropertyKey = DependencyProperty.RegisterReadOnly( "IsRightSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
= DependencyProperty.RegisterReadOnly( "IsRightSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
new FrameworkPropertyMetadata( ( bool )false ) ); new FrameworkPropertyMetadata( ( bool )false ) );
public static readonly DependencyProperty IsRightSideProperty public static readonly DependencyProperty IsRightSideProperty = IsRightSidePropertyKey.DependencyProperty;
= IsRightSidePropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the IsRightSide property. This dependency property /// Gets the IsRightSide property. This dependency property
@ -232,12 +190,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// IsBottomSide Read-Only Dependency Property /// IsBottomSide Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey IsBottomSidePropertyKey private static readonly DependencyPropertyKey IsBottomSidePropertyKey = DependencyProperty.RegisterReadOnly( "IsBottomSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
= DependencyProperty.RegisterReadOnly( "IsBottomSide", typeof( bool ), typeof( LayoutAnchorSideControl ),
new FrameworkPropertyMetadata( ( bool )false ) ); new FrameworkPropertyMetadata( ( bool )false ) );
public static readonly DependencyProperty IsBottomSideProperty public static readonly DependencyProperty IsBottomSideProperty = IsBottomSidePropertyKey.DependencyProperty;
= IsBottomSidePropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the IsBottomSide property. This dependency property /// Gets the IsBottomSide property. This dependency property
@ -263,5 +219,69 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
#endregion
#region Private Methods
private void CreateChildrenViews()
{
var manager = _model.Root.Manager;
foreach( var childModel in _model.Children )
{
_childViews.Add( manager.CreateUIElementForModel( childModel ) as LayoutAnchorGroupControl );
}
}
private void OnModelChildrenCollectionChanged( System.Collections.Specialized.NotifyCollectionChangedEventArgs e )
{
if( e.OldItems != null &&
( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove ||
e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Replace ) )
{
foreach( var childModel in e.OldItems )
_childViews.Remove( _childViews.First( cv => cv.Model == childModel ) );
}
if( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset )
_childViews.Clear();
if( e.NewItems != null &&
( e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add ||
e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Replace ) )
{
var manager = _model.Root.Manager;
int insertIndex = e.NewStartingIndex;
foreach( LayoutAnchorGroup childModel in e.NewItems )
{
_childViews.Insert( insertIndex++, manager.CreateUIElementForModel( childModel ) as LayoutAnchorGroupControl );
}
}
}
private void UpdateSide()
{
switch( _model.Side )
{
case AnchorSide.Left:
SetIsLeftSide( true );
break;
case AnchorSide.Top:
SetIsTopSide( true );
break;
case AnchorSide.Right:
SetIsRightSide( true );
break;
case AnchorSide.Bottom:
SetIsBottomSide( true );
break;
}
}
#endregion
} }
} }

21
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableControl.cs

@ -22,6 +22,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorableControl : Control public class LayoutAnchorableControl : Control
{ {
#region Constructors
static LayoutAnchorableControl() static LayoutAnchorableControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableControl ) ) );
@ -33,16 +35,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
//SetBinding(FlowDirectionProperty, new Binding("Model.Root.Manager.FlowDirection") { Source = this }); //SetBinding(FlowDirectionProperty, new Binding("Model.Root.Manager.FlowDirection") { Source = this });
} }
#endregion
#region Properties
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( LayoutAnchorableControl ),
DependencyProperty.Register( "Model", typeof( LayoutAnchorable ), typeof( LayoutAnchorableControl ), new FrameworkPropertyMetadata( ( LayoutAnchorable )null, new PropertyChangedCallback( OnModelChanged ) ) );
new FrameworkPropertyMetadata( ( LayoutAnchorable )null,
new PropertyChangedCallback( OnModelChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the Model property. This dependency property /// Gets or sets the Model property. This dependency property
@ -112,12 +115,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableControl ),
= DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableControl ),
new FrameworkPropertyMetadata( ( LayoutItem )null ) ); new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
= LayoutItemPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the LayoutItem property. This dependency property /// Gets the LayoutItem property. This dependency property
@ -143,6 +144,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e ) protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e )
{ {
@ -153,5 +157,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion
} }
} }

243
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableFloatingWindowControl.cs

@ -17,17 +17,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Runtime.InteropServices;
using System.Windows.Interop;
using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using Xceed.Wpf.AvalonDock.Converters; using Xceed.Wpf.AvalonDock.Converters;
using System.Diagnostics;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using Xceed.Wpf.AvalonDock.Commands; using Xceed.Wpf.AvalonDock.Commands;
using Microsoft.Windows.Shell; using Microsoft.Windows.Shell;
@ -36,12 +30,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorableFloatingWindowControl : LayoutFloatingWindowControl, IOverlayWindowHost public class LayoutAnchorableFloatingWindowControl : LayoutFloatingWindowControl, IOverlayWindowHost
{ {
#region Members
private LayoutAnchorableFloatingWindow _model;
private OverlayWindow _overlayWindow = null;
private List<IDropArea> _dropAreas = null;
#endregion
#region Constructors
static LayoutAnchorableFloatingWindowControl() static LayoutAnchorableFloatingWindowControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableFloatingWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableFloatingWindowControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableFloatingWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableFloatingWindowControl ) ) );
} }
internal LayoutAnchorableFloatingWindowControl( LayoutAnchorableFloatingWindow model ) internal LayoutAnchorableFloatingWindowControl( LayoutAnchorableFloatingWindow model )
: base( model ) : base( model )
{ {
@ -51,33 +54,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
UpdateThemeResources(); UpdateThemeResources();
} }
internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null ) #endregion
{
base.UpdateThemeResources( oldTheme );
if( _overlayWindow != null )
_overlayWindow.UpdateThemeResources( oldTheme );
}
LayoutAnchorableFloatingWindow _model;
public override ILayoutElement Model #region Properties
{
get
{
return _model;
}
}
#region SingleContentLayoutItem #region SingleContentLayoutItem
/// <summary> /// <summary>
/// SingleContentLayoutItem Dependency Property /// SingleContentLayoutItem Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty SingleContentLayoutItemProperty = public static readonly DependencyProperty SingleContentLayoutItemProperty = DependencyProperty.Register( "SingleContentLayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableFloatingWindowControl ),
DependencyProperty.Register( "SingleContentLayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableFloatingWindowControl ), new FrameworkPropertyMetadata( ( LayoutItem )null, new PropertyChangedCallback( OnSingleContentLayoutItemChanged ) ) );
new FrameworkPropertyMetadata( ( LayoutItem )null,
new PropertyChangedCallback( OnSingleContentLayoutItemChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the SingleContentLayoutItem property. This dependency property /// Gets or sets the SingleContentLayoutItem property. This dependency property
@ -112,7 +99,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
public override ILayoutElement Model
{
get
{
return _model;
}
}
protected override void OnInitialized( EventArgs e ) protected override void OnInitialized( EventArgs e )
{ {
@ -139,89 +136,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged ); _model.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged );
} }
void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
{
if( e.PropertyName == "RootPanel" &&
_model.RootPanel == null )
{
InternalClose();
}
}
bool IOverlayWindowHost.HitTest( Point dragPoint )
{
Rect detectionRect = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
return detectionRect.Contains( dragPoint );
}
DockingManager IOverlayWindowHost.Manager
{
get
{
return _model.Root.Manager;
}
}
OverlayWindow _overlayWindow = null;
void CreateOverlayWindow()
{
if( _overlayWindow == null )
_overlayWindow = new OverlayWindow( this );
Rect rectWindow = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
_overlayWindow.Left = rectWindow.Left;
_overlayWindow.Top = rectWindow.Top;
_overlayWindow.Width = rectWindow.Width;
_overlayWindow.Height = rectWindow.Height;
}
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow( LayoutFloatingWindowControl draggingWindow )
{
CreateOverlayWindow();
_overlayWindow.Owner = draggingWindow;
_overlayWindow.EnableDropTargets();
_overlayWindow.Show();
return _overlayWindow;
}
void IOverlayWindowHost.HideOverlayWindow()
{
_dropAreas = null;
_overlayWindow.Owner = null;
_overlayWindow.HideDropTargets();
}
List<IDropArea> _dropAreas = null;
IEnumerable<IDropArea> IOverlayWindowHost.GetDropAreas( LayoutFloatingWindowControl draggingWindow )
{
if( _dropAreas != null )
return _dropAreas;
_dropAreas = new List<IDropArea>();
if( draggingWindow.Model is LayoutDocumentFloatingWindow )
return _dropAreas;
var rootVisual = ( Content as FloatingWindowContentHost ).RootVisual;
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutAnchorablePaneControl>() )
{
_dropAreas.Add( new DropArea<LayoutAnchorablePaneControl>(
areaHost,
DropAreaType.AnchorablePane ) );
}
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutDocumentPaneControl>() )
{
_dropAreas.Add( new DropArea<LayoutDocumentPaneControl>(
areaHost,
DropAreaType.DocumentPane ) );
}
return _dropAreas;
}
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
var root = Model.Root; var root = Model.Root;
@ -283,7 +197,41 @@ namespace Xceed.Wpf.AvalonDock.Controls
return base.FilterMessage( hwnd, msg, wParam, lParam, ref handled ); return base.FilterMessage( hwnd, msg, wParam, lParam, ref handled );
} }
bool OpenContextMenu() internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null )
{
base.UpdateThemeResources( oldTheme );
if( _overlayWindow != null )
{
_overlayWindow.UpdateThemeResources( oldTheme );
}
}
#endregion
#region Private Methods
private void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
{
if( e.PropertyName == "RootPanel" &&
_model.RootPanel == null )
{
InternalClose();
}
}
private void CreateOverlayWindow()
{
if( _overlayWindow == null )
_overlayWindow = new OverlayWindow( this );
Rect rectWindow = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
_overlayWindow.Left = rectWindow.Left;
_overlayWindow.Top = rectWindow.Top;
_overlayWindow.Width = rectWindow.Width;
_overlayWindow.Height = rectWindow.Height;
}
private bool OpenContextMenu()
{ {
var ctxMenu = _model.Root.Manager.AnchorableContextMenu; var ctxMenu = _model.Root.Manager.AnchorableContextMenu;
if( ctxMenu != null && SingleContentLayoutItem != null ) if( ctxMenu != null && SingleContentLayoutItem != null )
@ -298,7 +246,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
return false; return false;
} }
bool IsContextMenuOpen() private bool IsContextMenuOpen()
{ {
var ctxMenu = _model.Root.Manager.AnchorableContextMenu; var ctxMenu = _model.Root.Manager.AnchorableContextMenu;
if( ctxMenu != null && SingleContentLayoutItem != null ) if( ctxMenu != null && SingleContentLayoutItem != null )
@ -309,7 +257,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
return false; return false;
} }
#endregion
#region Commands
#region HideWindowCommand #region HideWindowCommand
public ICommand HideWindowCommand public ICommand HideWindowCommand
{ {
get; get;
@ -417,6 +370,72 @@ namespace Xceed.Wpf.AvalonDock.Controls
anchorableLayoutItem.CloseCommand.Execute( parameter ); anchorableLayoutItem.CloseCommand.Execute( parameter );
} }
} }
#endregion
#endregion
#region IOverlayWindowHost
bool IOverlayWindowHost.HitTest( Point dragPoint )
{
Rect detectionRect = new Rect( this.PointToScreenDPIWithoutFlowDirection( new Point() ), this.TransformActualSizeToAncestor() );
return detectionRect.Contains( dragPoint );
}
DockingManager IOverlayWindowHost.Manager
{
get
{
return _model.Root.Manager;
}
}
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow( LayoutFloatingWindowControl draggingWindow )
{
CreateOverlayWindow();
_overlayWindow.Owner = draggingWindow;
_overlayWindow.EnableDropTargets();
_overlayWindow.Show();
return _overlayWindow;
}
void IOverlayWindowHost.HideOverlayWindow()
{
_dropAreas = null;
_overlayWindow.Owner = null;
_overlayWindow.HideDropTargets();
}
IEnumerable<IDropArea> IOverlayWindowHost.GetDropAreas( LayoutFloatingWindowControl draggingWindow )
{
if( _dropAreas != null )
return _dropAreas;
_dropAreas = new List<IDropArea>();
if( draggingWindow.Model is LayoutDocumentFloatingWindow )
return _dropAreas;
var rootVisual = ( Content as FloatingWindowContentHost ).RootVisual;
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutAnchorablePaneControl>() )
{
_dropAreas.Add( new DropArea<LayoutAnchorablePaneControl>(
areaHost,
DropAreaType.AnchorablePane ) );
}
foreach( var areaHost in rootVisual.FindVisualChildren<LayoutDocumentPaneControl>() )
{
_dropAreas.Add( new DropArea<LayoutDocumentPaneControl>(
areaHost,
DropAreaType.DocumentPane ) );
}
return _dropAreas;
}
#endregion #endregion
} }
} }

272
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableItem.cs

@ -15,9 +15,6 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Input; using System.Windows.Input;
using System.Windows; using System.Windows;
@ -28,85 +25,33 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorableItem : LayoutItem public class LayoutAnchorableItem : LayoutItem
{ {
LayoutAnchorable _anchorable; #region Members
internal LayoutAnchorableItem()
{
}
internal override void Attach(LayoutContent model) private LayoutAnchorable _anchorable;
{ private ICommand _defaultHideCommand;
_anchorable = model as LayoutAnchorable; private ICommand _defaultAutoHideCommand;
_anchorable.IsVisibleChanged += new EventHandler(_anchorable_IsVisibleChanged); private ICommand _defaultDockCommand;
private ReentrantFlag _visibilityReentrantFlag = new ReentrantFlag();
base.Attach(model);
}
internal override void Detach()
{
_anchorable.IsVisibleChanged -= new EventHandler(_anchorable_IsVisibleChanged);
_anchorable = null;
base.Detach();
}
protected override void Close() #endregion
{
if( (_anchorable.Root != null) && (_anchorable.Root.Manager != null) )
{
var dockingManager = _anchorable.Root.Manager;
dockingManager._ExecuteCloseCommand( _anchorable );
}
}
ICommand _defaultHideCommand; #region Constructors
ICommand _defaultAutoHideCommand;
ICommand _defaultDockCommand;
protected override void InitDefaultCommands() internal LayoutAnchorableItem()
{ {
_defaultHideCommand = new RelayCommand((p) => ExecuteHideCommand(p), (p) => CanExecuteHideCommand(p));
_defaultAutoHideCommand = new RelayCommand((p) => ExecuteAutoHideCommand(p), (p) => CanExecuteAutoHideCommand(p));
_defaultDockCommand = new RelayCommand((p) => ExecuteDockCommand(p), (p) => CanExecuteDockCommand(p));
base.InitDefaultCommands();
} }
protected override void ClearDefaultBindings() #endregion
{
if (HideCommand == _defaultHideCommand)
BindingOperations.ClearBinding(this, HideCommandProperty);
if (AutoHideCommand == _defaultAutoHideCommand)
BindingOperations.ClearBinding(this, AutoHideCommandProperty);
if (DockCommand == _defaultDockCommand)
BindingOperations.ClearBinding(this, DockCommandProperty);
base.ClearDefaultBindings();
}
protected override void SetDefaultBindings()
{
if (HideCommand == null)
HideCommand = _defaultHideCommand;
if (AutoHideCommand == null)
AutoHideCommand = _defaultAutoHideCommand;
if (DockCommand == null)
DockCommand = _defaultDockCommand;
Visibility = _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden;
base.SetDefaultBindings();
}
#region Properties
#region HideCommand #region HideCommand
/// <summary> /// <summary>
/// HideCommand Dependency Property /// HideCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty HideCommandProperty = public static readonly DependencyProperty HideCommandProperty = DependencyProperty.Register( "HideCommand", typeof( ICommand ), typeof( LayoutAnchorableItem ),
DependencyProperty.Register("HideCommand", typeof(ICommand), typeof(LayoutAnchorableItem), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnHideCommandChanged ), new CoerceValueCallback( CoerceHideCommandValue ) ) );
new FrameworkPropertyMetadata(null,
new PropertyChangedCallback(OnHideCommandChanged),
new CoerceValueCallback(CoerceHideCommandValue)));
/// <summary> /// <summary>
/// Gets or sets the HideCommand property. This dependency property /// Gets or sets the HideCommand property. This dependency property
@ -114,8 +59,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public ICommand HideCommand public ICommand HideCommand
{ {
get { return (ICommand)GetValue(HideCommandProperty); } get
set { SetValue(HideCommandProperty, value); } {
return ( ICommand )GetValue( HideCommandProperty );
}
set
{
SetValue( HideCommandProperty, value );
}
} }
/// <summary> /// <summary>
@ -141,7 +92,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return value; return value;
} }
private bool CanExecuteHideCommand( object parameter ) private bool CanExecuteHideCommand( object parameter )
{ {
if( LayoutElement == null ) if( LayoutElement == null )
@ -162,11 +112,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// AutoHideCommand Dependency Property /// AutoHideCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty AutoHideCommandProperty = public static readonly DependencyProperty AutoHideCommandProperty = DependencyProperty.Register( "AutoHideCommand", typeof( ICommand ), typeof( LayoutAnchorableItem ),
DependencyProperty.Register("AutoHideCommand", typeof(ICommand), typeof(LayoutAnchorableItem), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnAutoHideCommandChanged ), new CoerceValueCallback( CoerceAutoHideCommandValue ) ) );
new FrameworkPropertyMetadata(null,
new PropertyChangedCallback(OnAutoHideCommandChanged),
new CoerceValueCallback(CoerceAutoHideCommandValue)));
/// <summary> /// <summary>
/// Gets or sets the AutoHideCommand property. This dependency property /// Gets or sets the AutoHideCommand property. This dependency property
@ -175,8 +122,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <remarks>By default this command toggles auto hide state for an anchorable.</remarks> /// <remarks>By default this command toggles auto hide state for an anchorable.</remarks>
public ICommand AutoHideCommand public ICommand AutoHideCommand
{ {
get { return (ICommand)GetValue(AutoHideCommandProperty); } get
set { SetValue(AutoHideCommandProperty, value); } {
return ( ICommand )GetValue( AutoHideCommandProperty );
}
set
{
SetValue( AutoHideCommandProperty, value );
}
} }
/// <summary> /// <summary>
@ -226,11 +179,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// DockCommand Dependency Property /// DockCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DockCommandProperty = public static readonly DependencyProperty DockCommandProperty = DependencyProperty.Register( "DockCommand", typeof( ICommand ), typeof( LayoutAnchorableItem ),
DependencyProperty.Register("DockCommand", typeof(ICommand), typeof(LayoutAnchorableItem), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnDockCommandChanged ), new CoerceValueCallback( CoerceDockCommandValue ) ) );
new FrameworkPropertyMetadata(null,
new PropertyChangedCallback(OnDockCommandChanged),
new CoerceValueCallback(CoerceDockCommandValue)));
/// <summary> /// <summary>
/// Gets or sets the DockCommand property. This dependency property /// Gets or sets the DockCommand property. This dependency property
@ -239,8 +189,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <remarks>By default this command moves the anchorable inside the container pane which previously hosted the object.</remarks> /// <remarks>By default this command moves the anchorable inside the container pane which previously hosted the object.</remarks>
public ICommand DockCommand public ICommand DockCommand
{ {
get { return (ICommand)GetValue(DockCommandProperty); } get
set { SetValue(DockCommandProperty, value); } {
return ( ICommand )GetValue( DockCommandProperty );
}
set
{
SetValue( DockCommandProperty, value );
}
} }
/// <summary> /// <summary>
@ -280,8 +236,110 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region Visibility #region CanHide
ReentrantFlag _visibilityReentrantFlag = new ReentrantFlag();
/// <summary>
/// CanHide Dependency Property
/// </summary>
public static readonly DependencyProperty CanHideProperty = DependencyProperty.Register( "CanHide", typeof( bool ), typeof( LayoutAnchorableItem ), new FrameworkPropertyMetadata( ( bool )true,
new PropertyChangedCallback( OnCanHideChanged ) ) );
/// <summary>
/// Gets or sets the CanHide property. This dependency property
/// indicates if user can hide the anchorable item.
/// </summary>
public bool CanHide
{
get
{
return ( bool )GetValue( CanHideProperty );
}
set
{
SetValue( CanHideProperty, value );
}
}
/// <summary>
/// Handles changes to the CanHide property.
/// </summary>
private static void OnCanHideChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( LayoutAnchorableItem )d ).OnCanHideChanged( e );
}
/// <summary>
/// Provides derived classes an opportunity to handle changes to the CanHide property.
/// </summary>
protected virtual void OnCanHideChanged( DependencyPropertyChangedEventArgs e )
{
if( _anchorable != null )
_anchorable.CanHide = ( bool )e.NewValue;
}
#endregion
#endregion
#region Overrides
internal override void Attach( LayoutContent model )
{
_anchorable = model as LayoutAnchorable;
_anchorable.IsVisibleChanged += new EventHandler( _anchorable_IsVisibleChanged );
base.Attach( model );
}
internal override void Detach()
{
_anchorable.IsVisibleChanged -= new EventHandler( _anchorable_IsVisibleChanged );
_anchorable = null;
base.Detach();
}
protected override void Close()
{
if( ( _anchorable.Root != null ) && ( _anchorable.Root.Manager != null ) )
{
var dockingManager = _anchorable.Root.Manager;
dockingManager._ExecuteCloseCommand( _anchorable );
}
}
protected override void InitDefaultCommands()
{
_defaultHideCommand = new RelayCommand( ( p ) => ExecuteHideCommand( p ), ( p ) => CanExecuteHideCommand( p ) );
_defaultAutoHideCommand = new RelayCommand( ( p ) => ExecuteAutoHideCommand( p ), ( p ) => CanExecuteAutoHideCommand( p ) );
_defaultDockCommand = new RelayCommand( ( p ) => ExecuteDockCommand( p ), ( p ) => CanExecuteDockCommand( p ) );
base.InitDefaultCommands();
}
protected override void ClearDefaultBindings()
{
if( HideCommand == _defaultHideCommand )
BindingOperations.ClearBinding( this, HideCommandProperty );
if( AutoHideCommand == _defaultAutoHideCommand )
BindingOperations.ClearBinding( this, AutoHideCommandProperty );
if( DockCommand == _defaultDockCommand )
BindingOperations.ClearBinding( this, DockCommandProperty );
base.ClearDefaultBindings();
}
protected override void SetDefaultBindings()
{
if( HideCommand == null )
HideCommand = _defaultHideCommand;
if( AutoHideCommand == null )
AutoHideCommand = _defaultAutoHideCommand;
if( DockCommand == null )
DockCommand = _defaultDockCommand;
Visibility = _anchorable.IsVisible ? Visibility.Visible : System.Windows.Visibility.Hidden;
base.SetDefaultBindings();
}
protected override void OnVisibilityChanged() protected override void OnVisibilityChanged()
{ {
@ -302,8 +360,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnVisibilityChanged(); base.OnVisibilityChanged();
} }
#endregion
#region Private Methods
void _anchorable_IsVisibleChanged(object sender, EventArgs e) private void _anchorable_IsVisibleChanged( object sender, EventArgs e )
{ {
if( _anchorable != null && _anchorable.Root != null ) if( _anchorable != null && _anchorable.Root != null )
{ {
@ -320,47 +381,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
#region CanHide
/// <summary>
/// CanHide Dependency Property
/// </summary>
public static readonly DependencyProperty CanHideProperty =
DependencyProperty.Register("CanHide", typeof(bool), typeof(LayoutAnchorableItem),
new FrameworkPropertyMetadata((bool)true,
new PropertyChangedCallback(OnCanHideChanged)));
/// <summary>
/// Gets or sets the CanHide property. This dependency property
/// indicates if user can hide the anchorable item.
/// </summary>
public bool CanHide
{
get { return (bool)GetValue(CanHideProperty); }
set { SetValue(CanHideProperty, value); }
}
/// <summary>
/// Handles changes to the CanHide property.
/// </summary>
private static void OnCanHideChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
((LayoutAnchorableItem)d).OnCanHideChanged(e);
}
/// <summary>
/// Provides derived classes an opportunity to handle changes to the CanHide property.
/// </summary>
protected virtual void OnCanHideChanged(DependencyPropertyChangedEventArgs e)
{
if (_anchorable != null)
_anchorable.CanHide = (bool)e.NewValue;
}
#endregion #endregion
} }
} }

34
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneControl.cs

@ -24,6 +24,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorablePaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer public class LayoutAnchorablePaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer
{ {
#region Members
private LayoutAnchorablePane _model;
#endregion
#region Constructors
static LayoutAnchorablePaneControl() static LayoutAnchorablePaneControl()
{ {
FocusableProperty.OverrideMetadata( typeof( LayoutAnchorablePaneControl ), new FrameworkPropertyMetadata( false ) ); FocusableProperty.OverrideMetadata( typeof( LayoutAnchorablePaneControl ), new FrameworkPropertyMetadata( false ) );
@ -42,14 +50,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.LayoutUpdated += new EventHandler( OnLayoutUpdated ); this.LayoutUpdated += new EventHandler( OnLayoutUpdated );
} }
void OnLayoutUpdated( object sender, EventArgs e ) #endregion
{
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth;
modelWithAtcualSize.ActualHeight = ActualHeight;
}
LayoutAnchorablePane _model; #region Properties
public ILayoutElement Model public ILayoutElement Model
{ {
@ -59,6 +62,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
#region Overrides
protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e ) protected override void OnGotKeyboardFocus( System.Windows.Input.KeyboardFocusChangedEventArgs e )
{ {
if( ( _model != null ) && ( _model.SelectedContent != null ) ) if( ( _model != null ) && ( _model.SelectedContent != null ) )
@ -89,5 +96,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
#region Private Methods
private void OnLayoutUpdated( object sender, EventArgs e )
{
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth;
modelWithAtcualSize.ActualHeight = ActualHeight;
}
#endregion
} }
} }

18
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorablePaneGroupControl.cs

@ -14,26 +14,31 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAnchorablePaneGroupControl : LayoutGridControl<ILayoutAnchorablePane>, ILayoutControl public class LayoutAnchorablePaneGroupControl : LayoutGridControl<ILayoutAnchorablePane>, ILayoutControl
{ {
#region Members
private LayoutAnchorablePaneGroup _model;
#endregion
#region Constructors
internal LayoutAnchorablePaneGroupControl( LayoutAnchorablePaneGroup model ) internal LayoutAnchorablePaneGroupControl( LayoutAnchorablePaneGroup model )
: base( model, model.Orientation ) : base( model, model.Orientation )
{ {
_model = model; _model = model;
} }
LayoutAnchorablePaneGroup _model; #endregion
#region Overrides
protected override void OnFixChildrenDockLengths() protected override void OnFixChildrenDockLengths()
{ {
@ -63,5 +68,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
} }
#endregion
} }
} }

35
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAnchorableTabItem.cs

@ -14,17 +14,11 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Collections.ObjectModel;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Reflection;
using System.Diagnostics;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
@ -38,6 +32,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region Constructors
static LayoutAnchorableTabItem() static LayoutAnchorableTabItem()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableTabItem ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableTabItem ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAnchorableTabItem ), new FrameworkPropertyMetadata( typeof( LayoutAnchorableTabItem ) ) );
@ -47,17 +43,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
} }
#endregion
#region Properties
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutAnchorableTabItem ),
DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutAnchorableTabItem ), new FrameworkPropertyMetadata( ( LayoutContent )null, new PropertyChangedCallback( OnModelChanged ) ) );
new FrameworkPropertyMetadata( (LayoutContent)null,
new PropertyChangedCallback( OnModelChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the Model property. This dependency property /// Gets or sets the Model property. This dependency property
@ -102,12 +98,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableTabItem ),
= DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutAnchorableTabItem ),
new FrameworkPropertyMetadata( ( LayoutItem )null ) ); new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
= LayoutItemPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the LayoutItem property. This dependency property /// Gets the LayoutItem property. This dependency property
@ -133,6 +127,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
base.OnMouseLeftButtonDown( e ); base.OnMouseLeftButtonDown( e );
@ -184,8 +181,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
base.OnMouseEnter( e ); base.OnMouseEnter( e );
if( _draggingItem != null && if( _draggingItem != this &&
_draggingItem != this &&
e.LeftButton == MouseButtonState.Pressed ) e.LeftButton == MouseButtonState.Pressed )
{ {
var model = Model; var model = Model;
@ -208,6 +204,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion
#region Internal Methods
internal static bool IsDraggingItem() internal static bool IsDraggingItem()
{ {
return _draggingItem != null; return _draggingItem != null;
@ -221,10 +221,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
_draggingItem = null; _draggingItem = null;
} }
internal static void CancelMouseLeave() internal static void CancelMouseLeave()
{ {
_cancelMouseLeave = true; _cancelMouseLeave = true;
} }
#endregion
} }
} }

378
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutAutoHideWindowControl.cs

@ -29,6 +29,28 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutAutoHideWindowControl : HwndHost, ILayoutControl public class LayoutAutoHideWindowControl : HwndHost, ILayoutControl
{ {
#region Members
internal LayoutAnchorableControl _internalHost = null;
private LayoutAnchorControl _anchor;
private LayoutAnchorable _model;
private HwndSource _internalHwndSource = null;
private IntPtr parentWindowHandle;
private bool _internalHost_ContentRendered = false;
private ContentPresenter _internalHostPresenter = new ContentPresenter();
private Grid _internalGrid = null;
private AnchorSide _side;
private LayoutGridResizerControl _resizer = null;
private DockingManager _manager;
private Border _resizerGhost = null;
private Window _resizerWindowHost = null;
private Vector _initialStartPoint;
#endregion
#region Constructors
static LayoutAutoHideWindowControl() static LayoutAutoHideWindowControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAutoHideWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutAutoHideWindowControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutAutoHideWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutAutoHideWindowControl ) ) );
@ -41,41 +63,63 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
} }
internal void Show( LayoutAnchorControl anchor ) #endregion
{
if( _model != null )
throw new InvalidOperationException();
_anchor = anchor; #region Properties
_model = anchor.Model as LayoutAnchorable;
_side = ( anchor.Model.Parent.Parent as LayoutAnchorSide ).Side;
_manager = _model.Root.Manager;
CreateInternalGrid();
_model.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged ); #region AnchorableStyle
Visibility = System.Windows.Visibility.Visible; /// <summary>
InvalidateMeasure(); /// AnchorableStyle Dependency Property
UpdateWindowPos(); /// </summary>
} public static readonly DependencyProperty AnchorableStyleProperty = DependencyProperty.Register( "AnchorableStyle", typeof( Style ), typeof( LayoutAutoHideWindowControl ),
new FrameworkPropertyMetadata( ( Style )null ) );
internal void Hide() /// <summary>
/// Gets or sets the AnchorableStyle property. This dependency property
/// indicates the style to apply to the LayoutAnchorableControl hosted in this auto hide window.
/// </summary>
public Style AnchorableStyle
{ {
if( _model == null ) get
return; {
return ( Style )GetValue( AnchorableStyleProperty );
}
set
{
SetValue( AnchorableStyleProperty, value );
}
}
_model.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged ); #endregion
RemoveInternalGrid(); #region Background
_anchor = null;
_model = null; /// <summary>
_manager = null; /// Background Dependency Property
Visibility = System.Windows.Visibility.Hidden; /// </summary>
public static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register( "Background", typeof( Brush ), typeof( LayoutAutoHideWindowControl ),
new FrameworkPropertyMetadata( ( Brush )null ) );
/// <summary>
/// Gets or sets the Background property. This dependency property
/// indicates background of the autohide childwindow.
/// </summary>
public Brush Background
{
get
{
return ( Brush )GetValue( BackgroundProperty );
}
set
{
SetValue( BackgroundProperty, value );
}
} }
LayoutAnchorControl _anchor; #endregion
LayoutAnchorable _model; #region Model
public ILayoutElement Model public ILayoutElement Model
{ {
@ -85,8 +129,22 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
HwndSource _internalHwndSource = null; #endregion
IntPtr parentWindowHandle;
#region Resizer
internal bool IsResizing
{
get;
private set;
}
#endregion
#endregion
#region Overrides
protected override System.Runtime.InteropServices.HandleRef BuildWindowCore( System.Runtime.InteropServices.HandleRef hwndParent ) protected override System.Runtime.InteropServices.HandleRef BuildWindowCore( System.Runtime.InteropServices.HandleRef hwndParent )
{ {
parentWindowHandle = hwndParent.Handle; parentWindowHandle = hwndParent.Handle;
@ -106,14 +164,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return new HandleRef( this, _internalHwndSource.Handle ); return new HandleRef( this, _internalHwndSource.Handle );
} }
private bool _internalHost_ContentRendered = false;
void _internalHwndSource_ContentRendered( object sender, EventArgs e )
{
_internalHost_ContentRendered = true;
}
protected override IntPtr WndProc( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled ) protected override IntPtr WndProc( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled )
{ {
if( msg == Win32Helper.WM_WINDOWPOSCHANGING ) if( msg == Win32Helper.WM_WINDOWPOSCHANGING )
@ -137,18 +187,117 @@ namespace Xceed.Wpf.AvalonDock.Controls
public override void OnApplyTemplate() public override void OnApplyTemplate()
{ {
base.OnApplyTemplate(); base.OnApplyTemplate();
}
protected override bool HasFocusWithinCore()
{
return false;
}
protected override System.Collections.IEnumerator LogicalChildren
{
get
{
if( _internalHostPresenter == null )
return new UIElement[] { }.GetEnumerator();
return new UIElement[] { _internalHostPresenter }.GetEnumerator();
}
} }
ContentPresenter _internalHostPresenter = new ContentPresenter(); protected override Size MeasureOverride( Size constraint )
Grid _internalGrid = null; {
internal LayoutAnchorableControl _internalHost = null; if( _internalHostPresenter == null )
AnchorSide _side; return base.MeasureOverride( constraint );
LayoutGridResizerControl _resizer = null;
DockingManager _manager; _internalHostPresenter.Measure( constraint );
//return base.MeasureOverride(constraint);
return _internalHostPresenter.DesiredSize;
}
void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e ) protected override Size ArrangeOverride( Size finalSize )
{
if( _internalHostPresenter == null )
return base.ArrangeOverride( finalSize );
_internalHostPresenter.Arrange( new Rect( finalSize ) );
return base.ArrangeOverride( finalSize );// new Size(_internalHostPresenter.ActualWidth, _internalHostPresenter.ActualHeight);
}
#endregion
#region Internal Methods
internal void Show( LayoutAnchorControl anchor )
{
if( _model != null )
throw new InvalidOperationException();
_anchor = anchor;
_model = anchor.Model as LayoutAnchorable;
_side = ( anchor.Model.Parent.Parent as LayoutAnchorSide ).Side;
_manager = _model.Root.Manager;
CreateInternalGrid();
_model.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged );
Visibility = System.Windows.Visibility.Visible;
InvalidateMeasure();
UpdateWindowPos();
}
internal void Hide()
{
if( _model == null )
return;
_model.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler( _model_PropertyChanged );
RemoveInternalGrid();
_anchor = null;
_model = null;
_manager = null;
Visibility = System.Windows.Visibility.Hidden;
}
internal bool IsWin32MouseOver
{
get
{
var ptMouse = new Win32Helper.Win32Point();
if( !Win32Helper.GetCursorPos( ref ptMouse ) )
return false;
Point location = this.PointToScreenDPI( new Point() );
Rect rectWindow = this.GetScreenArea();
if( rectWindow.Contains( new Point( ptMouse.X, ptMouse.Y ) ) )
return true;
var manager = Model.Root.Manager;
var anchor = manager.FindVisualChildren<LayoutAnchorControl>().Where( c => c.Model == Model ).FirstOrDefault();
if( anchor == null )
return false;
location = anchor.PointToScreenDPI( new Point() );
if( anchor.IsMouseOver )
return true;
return false;
}
}
#endregion
#region Private Methods
private void _internalHwndSource_ContentRendered( object sender, EventArgs e )
{
_internalHost_ContentRendered = true;
}
private void _model_PropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
{ {
if( e.PropertyName == "IsAutoHidden" ) if( e.PropertyName == "IsAutoHidden" )
{ {
@ -159,7 +308,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void CreateInternalGrid() private void CreateInternalGrid()
{ {
_internalGrid = new Grid() { FlowDirection = System.Windows.FlowDirection.LeftToRight }; _internalGrid = new Grid() { FlowDirection = System.Windows.FlowDirection.LeftToRight };
_internalGrid.SetBinding( Grid.BackgroundProperty, new Binding( "Background" ) { Source = this } ); _internalGrid.SetBinding( Grid.BackgroundProperty, new Binding( "Background" ) { Source = this } );
@ -248,7 +397,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_internalHostPresenter.Content = _internalGrid; _internalHostPresenter.Content = _internalGrid;
} }
void RemoveInternalGrid() private void RemoveInternalGrid()
{ {
_resizer.DragStarted -= new System.Windows.Controls.Primitives.DragStartedEventHandler( OnResizerDragStarted ); _resizer.DragStarted -= new System.Windows.Controls.Primitives.DragStartedEventHandler( OnResizerDragStarted );
_resizer.DragDelta -= new System.Windows.Controls.Primitives.DragDeltaEventHandler( OnResizerDragDelta ); _resizer.DragDelta -= new System.Windows.Controls.Primitives.DragDeltaEventHandler( OnResizerDragDelta );
@ -257,19 +406,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_internalHostPresenter.Content = null; _internalHostPresenter.Content = null;
} }
private void ShowResizerOverlayWindow( LayoutGridResizerControl splitter )
protected override bool HasFocusWithinCore()
{
return false;
}
#region Resizer
Border _resizerGhost = null;
Window _resizerWindowHost = null;
Vector _initialStartPoint;
void ShowResizerOverlayWindow( LayoutGridResizerControl splitter )
{ {
_resizerGhost = new Border() _resizerGhost = new Border()
{ {
@ -346,7 +483,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_resizerWindowHost.Show(); _resizerWindowHost.Show();
} }
void HideResizerOverlayWindow() private void HideResizerOverlayWindow()
{ {
if( _resizerWindowHost != null ) if( _resizerWindowHost != null )
{ {
@ -355,13 +492,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
internal bool IsResizing private void OnResizerDragCompleted( object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e )
{
get;
private set;
}
void OnResizerDragCompleted( object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e )
{ {
LayoutGridResizerControl splitter = sender as LayoutGridResizerControl; LayoutGridResizerControl splitter = sender as LayoutGridResizerControl;
var rootVisual = this.FindVisualTreeRoot() as Visual; var rootVisual = this.FindVisualTreeRoot() as Visual;
@ -419,7 +550,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
InvalidateMeasure(); InvalidateMeasure();
} }
void OnResizerDragDelta( object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e ) private void OnResizerDragDelta( object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e )
{ {
LayoutGridResizerControl splitter = sender as LayoutGridResizerControl; LayoutGridResizerControl splitter = sender as LayoutGridResizerControl;
var rootVisual = this.FindVisualTreeRoot() as Visual; var rootVisual = this.FindVisualTreeRoot() as Visual;
@ -440,126 +571,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void OnResizerDragStarted( object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e ) private void OnResizerDragStarted( object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e )
{ {
var resizer = sender as LayoutGridResizerControl; var resizer = sender as LayoutGridResizerControl;
ShowResizerOverlayWindow( resizer ); ShowResizerOverlayWindow( resizer );
IsResizing = true; IsResizing = true;
} }
#endregion
protected override System.Collections.IEnumerator LogicalChildren
{
get
{
if( _internalHostPresenter == null )
return new UIElement[] { }.GetEnumerator();
return new UIElement[] { _internalHostPresenter }.GetEnumerator();
}
}
protected override Size MeasureOverride( Size constraint )
{
if( _internalHostPresenter == null )
return base.MeasureOverride( constraint );
_internalHostPresenter.Measure( constraint );
//return base.MeasureOverride(constraint);
return _internalHostPresenter.DesiredSize;
}
protected override Size ArrangeOverride( Size finalSize )
{
if( _internalHostPresenter == null )
return base.ArrangeOverride( finalSize );
_internalHostPresenter.Arrange( new Rect( finalSize ) );
return base.ArrangeOverride( finalSize );// new Size(_internalHostPresenter.ActualWidth, _internalHostPresenter.ActualHeight);
}
#region Background
/// <summary>
/// Background Dependency Property
/// </summary>
public static readonly DependencyProperty BackgroundProperty =
DependencyProperty.Register( "Background", typeof( Brush ), typeof( LayoutAutoHideWindowControl ),
new FrameworkPropertyMetadata( ( Brush )null ) );
/// <summary>
/// Gets or sets the Background property. This dependency property
/// indicates background of the autohide childwindow.
/// </summary>
public Brush Background
{
get
{
return ( Brush )GetValue( BackgroundProperty );
}
set
{
SetValue( BackgroundProperty, value );
}
}
#endregion
internal bool IsWin32MouseOver
{
get
{
var ptMouse = new Win32Helper.Win32Point();
if( !Win32Helper.GetCursorPos( ref ptMouse ) )
return false;
Point location = this.PointToScreenDPI( new Point() );
Rect rectWindow = this.GetScreenArea();
if( rectWindow.Contains( new Point( ptMouse.X, ptMouse.Y ) ) )
return true;
var manager = Model.Root.Manager;
var anchor = manager.FindVisualChildren<LayoutAnchorControl>().Where( c => c.Model == Model ).FirstOrDefault();
if( anchor == null )
return false;
location = anchor.PointToScreenDPI( new Point() );
if( anchor.IsMouseOver )
return true;
return false;
}
}
#region AnchorableStyle
/// <summary>
/// AnchorableStyle Dependency Property
/// </summary>
public static readonly DependencyProperty AnchorableStyleProperty =
DependencyProperty.Register( "AnchorableStyle", typeof( Style ), typeof( LayoutAutoHideWindowControl ),
new FrameworkPropertyMetadata( ( Style )null ) );
/// <summary>
/// Gets or sets the AnchorableStyle property. This dependency property
/// indicates the style to apply to the LayoutAnchorableControl hosted in this auto hide window.
/// </summary>
public Style AnchorableStyle
{
get
{
return ( Style )GetValue( AnchorableStyleProperty );
}
set
{
SetValue( AnchorableStyleProperty, value );
}
}
#endregion #endregion
} }
} }

27
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentControl.cs

@ -24,20 +24,24 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentControl : Control public class LayoutDocumentControl : Control
{ {
#region Constructors
static LayoutDocumentControl() static LayoutDocumentControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentControl ) ) );
FocusableProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( true ) ); FocusableProperty.OverrideMetadata( typeof( LayoutDocumentControl ), new FrameworkPropertyMetadata( true ) );
} }
#endregion
#region Properties
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutDocumentControl ),
typeof( LayoutContent ),
typeof( LayoutDocumentControl ),
new FrameworkPropertyMetadata( null, OnModelChanged ) ); new FrameworkPropertyMetadata( null, OnModelChanged ) );
/// <summary> /// <summary>
@ -110,11 +114,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutDocumentControl ),
typeof( LayoutItem ), new FrameworkPropertyMetadata(( LayoutItem )null ) );
typeof( LayoutDocumentControl ),
new FrameworkPropertyMetadata(
( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty; public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
@ -142,6 +143,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e ) protected override void OnPreviewGotKeyboardFocus( KeyboardFocusChangedEventArgs e )
{ {
this.SetIsActive(); this.SetIsActive();
@ -161,6 +166,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion
#region Private Methods
private void SetIsActive() private void SetIsActive()
{ {
if( this.Model != null ) if( this.Model != null )
@ -168,5 +177,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.Model.IsActive = true; this.Model.IsActive = true;
} }
} }
#endregion
} }
} }

80
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentFloatingWindowControl.cs

@ -15,20 +15,23 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows; using System.Windows;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows.Media;
using Microsoft.Windows.Shell; using Microsoft.Windows.Shell;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentFloatingWindowControl : LayoutFloatingWindowControl public class LayoutDocumentFloatingWindowControl : LayoutFloatingWindowControl
{ {
#region Members
private LayoutDocumentFloatingWindow _model;
#endregion
#region Constructors
static LayoutDocumentFloatingWindowControl() static LayoutDocumentFloatingWindowControl()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentFloatingWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentFloatingWindowControl ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentFloatingWindowControl ), new FrameworkPropertyMetadata( typeof( LayoutDocumentFloatingWindowControl ) ) );
@ -41,22 +44,27 @@ namespace Xceed.Wpf.AvalonDock.Controls
UpdateThemeResources(); UpdateThemeResources();
} }
#endregion
LayoutDocumentFloatingWindow _model; #region Properties
public override ILayoutElement Model public LayoutItem RootDocumentLayoutItem
{ {
get get
{ {
return _model; return _model.Root.Manager.GetLayoutItemFromModel( _model.RootDocument );
} }
} }
public LayoutItem RootDocumentLayoutItem #endregion
#region Overrides
public override ILayoutElement Model
{ {
get get
{ {
return _model.Root.Manager.GetLayoutItemFromModel( _model.RootDocument ); return _model;
} }
} }
@ -78,14 +86,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void _model_RootDocumentChanged( object sender, EventArgs e )
{
if( _model.RootDocument == null )
{
InternalClose();
}
}
protected override IntPtr FilterMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled ) protected override IntPtr FilterMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled )
{ {
switch( msg ) switch( msg )
@ -114,22 +114,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
return base.FilterMessage( hwnd, msg, wParam, lParam, ref handled ); return base.FilterMessage( hwnd, msg, wParam, lParam, ref handled );
} }
bool OpenContextMenu()
{
var ctxMenu = _model.Root.Manager.DocumentContextMenu;
if( ctxMenu != null && RootDocumentLayoutItem != null )
{
ctxMenu.PlacementTarget = null;
ctxMenu.Placement = PlacementMode.MousePoint;
ctxMenu.DataContext = RootDocumentLayoutItem;
ctxMenu.IsOpen = true;
return true;
}
return false;
}
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
var root = Model.Root; var root = Model.Root;
@ -146,5 +130,33 @@ namespace Xceed.Wpf.AvalonDock.Controls
_model.RootDocumentChanged -= new EventHandler( _model_RootDocumentChanged ); _model.RootDocumentChanged -= new EventHandler( _model_RootDocumentChanged );
} }
#endregion
#region Private Methods
private void _model_RootDocumentChanged( object sender, EventArgs e )
{
if( _model.RootDocument == null )
{
InternalClose();
}
}
private bool OpenContextMenu()
{
var ctxMenu = _model.Root.Manager.DocumentContextMenu;
if( ctxMenu != null && RootDocumentLayoutItem != null )
{
ctxMenu.PlacementTarget = null;
ctxMenu.Placement = PlacementMode.MousePoint;
ctxMenu.DataContext = RootDocumentLayoutItem;
ctxMenu.IsOpen = true;
return true;
}
return false;
}
#endregion
} }
} }

100
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentItem.cs

@ -14,47 +14,39 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Commands;
using System.Windows.Input;
using System.Windows.Data;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentItem : LayoutItem public class LayoutDocumentItem : LayoutItem
{ {
LayoutDocument _document; #region Members
internal LayoutDocumentItem()
{
} private LayoutDocument _document;
internal override void Attach(LayoutContent model) #endregion
{
_document = model as LayoutDocument;
base.Attach(model);
}
protected override void Close() #region Constructors
{
if( (_document.Root != null) && (_document.Root.Manager != null) ) internal LayoutDocumentItem()
{ {
var dockingManager = _document.Root.Manager;
dockingManager._ExecuteCloseCommand( _document );
}
} }
#endregion
#region Properties
#region Description #region Description
/// <summary> /// <summary>
/// Description Dependency Property /// Description Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DescriptionProperty = public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register( "Description", typeof( string ), typeof( LayoutDocumentItem ),
DependencyProperty.Register("Description", typeof(string), typeof(LayoutDocumentItem), new FrameworkPropertyMetadata( ( string )null, new PropertyChangedCallback( OnDescriptionChanged ) ) );
new FrameworkPropertyMetadata((string)null,
new PropertyChangedCallback(OnDescriptionChanged)));
/// <summary> /// <summary>
/// Gets or sets the Description property. This dependency property /// Gets or sets the Description property. This dependency property
@ -62,8 +54,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public string Description public string Description
{ {
get { return (string)GetValue(DescriptionProperty); } get
set { SetValue(DescriptionProperty, value); } {
return ( string )GetValue( DescriptionProperty );
}
set
{
SetValue( DescriptionProperty, value );
}
} }
/// <summary> /// <summary>
@ -84,10 +82,62 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#endregion
#region Overrides
protected override void Close()
{
if( ( _document.Root != null ) && ( _document.Root.Manager != null ) )
{
var dockingManager = _document.Root.Manager;
dockingManager._ExecuteCloseCommand( _document );
}
}
protected override void OnVisibilityChanged()
{
if( (_document != null) && (_document.Root != null) )
{
_document.IsVisible = ( this.Visibility == Visibility.Visible );
if( _document.Parent is LayoutDocumentPane )
{
( ( LayoutDocumentPane )_document.Parent ).ComputeVisibility();
}
}
base.OnVisibilityChanged();
}
internal override void Attach( LayoutContent model )
{
_document = model as LayoutDocument;
base.Attach( model );
}
internal override void Detach() internal override void Detach()
{ {
_document = null; _document = null;
base.Detach(); base.Detach();
} }
#endregion
#region Private Methods
#endregion
} }
} }

58
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneControl.cs

@ -25,12 +25,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentPaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer public class LayoutDocumentPaneControl : TabControl, ILayoutControl//, ILogicalChildrenContainer
{ {
#region Members
private List<object> _logicalChildren = new List<object>();
private LayoutDocumentPane _model;
#endregion
#region Constructors
static LayoutDocumentPaneControl() static LayoutDocumentPaneControl()
{ {
FocusableProperty.OverrideMetadata( typeof( LayoutDocumentPaneControl ), new FrameworkPropertyMetadata( false ) ); FocusableProperty.OverrideMetadata( typeof( LayoutDocumentPaneControl ), new FrameworkPropertyMetadata( false ) );
} }
internal LayoutDocumentPaneControl( LayoutDocumentPane model ) internal LayoutDocumentPaneControl( LayoutDocumentPane model )
{ {
if( model == null ) if( model == null )
@ -43,22 +51,21 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.LayoutUpdated += new EventHandler( OnLayoutUpdated ); this.LayoutUpdated += new EventHandler( OnLayoutUpdated );
} }
void OnLayoutUpdated( object sender, EventArgs e ) #endregion
{
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth;
modelWithAtcualSize.ActualHeight = ActualHeight;
}
protected override void OnSelectionChanged( SelectionChangedEventArgs e ) #region Properties
{
base.OnSelectionChanged( e );
if( _model.SelectedContent != null ) public ILayoutElement Model
_model.SelectedContent.IsActive = true; {
get
{
return _model;
}
} }
List<object> _logicalChildren = new List<object>(); #endregion
#region Overrides
protected override System.Collections.IEnumerator LogicalChildren protected override System.Collections.IEnumerator LogicalChildren
{ {
@ -68,14 +75,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
LayoutDocumentPane _model; protected override void OnSelectionChanged( SelectionChangedEventArgs e )
public ILayoutElement Model
{
get
{ {
return _model; base.OnSelectionChanged( e );
}
if( _model.SelectedContent != null )
_model.SelectedContent.IsActive = true;
} }
protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e )
@ -95,5 +100,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion
#region Private Methods
private void OnLayoutUpdated( object sender, EventArgs e )
{
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth;
modelWithAtcualSize.ActualHeight = ActualHeight;
}
#endregion
} }
} }

17
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentPaneGroupControl.cs

@ -14,10 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,13 +22,23 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentPaneGroupControl : LayoutGridControl<ILayoutDocumentPane>, ILayoutControl public class LayoutDocumentPaneGroupControl : LayoutGridControl<ILayoutDocumentPane>, ILayoutControl
{ {
#region Members
private LayoutDocumentPaneGroup _model;
#endregion
#region Constructors
internal LayoutDocumentPaneGroupControl( LayoutDocumentPaneGroup model ) internal LayoutDocumentPaneGroupControl( LayoutDocumentPaneGroup model )
: base( model, model.Orientation ) : base( model, model.Orientation )
{ {
_model = model; _model = model;
} }
LayoutDocumentPaneGroup _model; #endregion
#region Overrides
protected override void OnFixChildrenDockLengths() protected override void OnFixChildrenDockLengths()
{ {
@ -62,5 +68,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
} }
#endregion
} }
} }

119
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutDocumentTabItem.cs

@ -17,18 +17,28 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Diagnostics;
using System.Windows.Media;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutDocumentTabItem : Control public class LayoutDocumentTabItem : Control
{ {
#region Members
private List<Rect> _otherTabsScreenArea = null;
private List<TabItem> _otherTabs = null;
private Rect _parentDocumentTabPanelScreenArea;
private DocumentPaneTabPanel _parentDocumentTabPanel;
private bool _isMouseDown = false;
private Point _mouseDownPoint;
#endregion
#region Contructors
static LayoutDocumentTabItem() static LayoutDocumentTabItem()
{ {
DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentTabItem ), new FrameworkPropertyMetadata( typeof( LayoutDocumentTabItem ) ) ); DefaultStyleKeyProperty.OverrideMetadata( typeof( LayoutDocumentTabItem ), new FrameworkPropertyMetadata( typeof( LayoutDocumentTabItem ) ) );
@ -38,15 +48,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
} }
#endregion
#region Properties
#region Model #region Model
/// <summary> /// <summary>
/// Model Dependency Property /// Model Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ModelProperty = public static readonly DependencyProperty ModelProperty = DependencyProperty.Register( "Model", typeof( LayoutContent ), typeof( LayoutDocumentTabItem ),
DependencyProperty.Register("Model", typeof(LayoutContent), typeof(LayoutDocumentTabItem), new FrameworkPropertyMetadata( ( LayoutContent )null, new PropertyChangedCallback( OnModelChanged ) ) );
new FrameworkPropertyMetadata((LayoutContent)null,
new PropertyChangedCallback(OnModelChanged)));
/// <summary> /// <summary>
/// Gets or sets the Model property. This dependency property /// Gets or sets the Model property. This dependency property
@ -54,8 +66,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutContent Model public LayoutContent Model
{ {
get { return (LayoutContent)GetValue(ModelProperty); } get
set { SetValue(ModelProperty, value); } {
return ( LayoutContent )GetValue( ModelProperty );
}
set
{
SetValue( ModelProperty, value );
}
} }
/// <summary> /// <summary>
@ -86,12 +104,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// LayoutItem Read-Only Dependency Property /// LayoutItem Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey LayoutItemPropertyKey private static readonly DependencyPropertyKey LayoutItemPropertyKey = DependencyProperty.RegisterReadOnly( "LayoutItem", typeof( LayoutItem ), typeof( LayoutDocumentTabItem ),
= DependencyProperty.RegisterReadOnly("LayoutItem", typeof(LayoutItem), typeof(LayoutDocumentTabItem),
new FrameworkPropertyMetadata( ( LayoutItem )null ) ); new FrameworkPropertyMetadata( ( LayoutItem )null ) );
public static readonly DependencyProperty LayoutItemProperty public static readonly DependencyProperty LayoutItemProperty = LayoutItemPropertyKey.DependencyProperty;
= LayoutItemPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the LayoutItem property. This dependency property /// Gets the LayoutItem property. This dependency property
@ -99,7 +115,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public LayoutItem LayoutItem public LayoutItem LayoutItem
{ {
get { return (LayoutItem)GetValue(LayoutItemProperty); } get
{
return ( LayoutItem )GetValue( LayoutItemProperty );
}
} }
/// <summary> /// <summary>
@ -114,26 +133,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
List<Rect> _otherTabsScreenArea = null; #endregion
List<TabItem> _otherTabs = null;
Rect _parentDocumentTabPanelScreenArea;
DocumentPaneTabPanel _parentDocumentTabPanel;
bool _isMouseDown = false;
Point _mouseDownPoint;
void UpdateDragDetails() #region Overrides
{
_parentDocumentTabPanel = this.FindLogicalAncestor<DocumentPaneTabPanel>();
_parentDocumentTabPanelScreenArea = _parentDocumentTabPanel.GetScreenArea();
_otherTabs = _parentDocumentTabPanel.Children.Cast<TabItem>().Where(ch =>
ch.Visibility != System.Windows.Visibility.Collapsed).ToList();
Rect currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_otherTabsScreenArea = _otherTabs.Select(ti =>
{
var screenArea = ti.GetScreenArea();
return new Rect(screenArea.Left, screenArea.Top, currentTabScreenArea.Width, screenArea.Height);
}).ToList();
}
protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonDown( System.Windows.Input.MouseButtonEventArgs e )
{ {
@ -159,20 +161,18 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( Math.Abs( ptMouseMove.X - _mouseDownPoint.X ) > SystemParameters.MinimumHorizontalDragDistance || if( Math.Abs( ptMouseMove.X - _mouseDownPoint.X ) > SystemParameters.MinimumHorizontalDragDistance ||
Math.Abs( ptMouseMove.Y - _mouseDownPoint.Y ) > SystemParameters.MinimumVerticalDragDistance ) Math.Abs( ptMouseMove.Y - _mouseDownPoint.Y ) > SystemParameters.MinimumVerticalDragDistance )
{ {
UpdateDragDetails(); this.UpdateDragDetails();
CaptureMouse(); this.CaptureMouse();
_isMouseDown = false; _isMouseDown = false;
} }
} }
if (IsMouseCaptured) if( this.IsMouseCaptured )
{ {
var mousePosInScreenCoord = this.PointToScreenDPI( e.GetPosition( this ) ); var mousePosInScreenCoord = this.PointToScreenDPI( e.GetPosition( this ) );
if( !_parentDocumentTabPanelScreenArea.Contains( mousePosInScreenCoord ) ) if( !_parentDocumentTabPanelScreenArea.Contains( mousePosInScreenCoord ) )
{ {
ReleaseMouseCapture(); this.StartDraggingFloatingWindowForContent();
var manager = Model.Root.Manager;
manager.StartDraggingFloatingWindowForContent(Model);
} }
else else
{ {
@ -180,8 +180,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( indexOfTabItemWithMouseOver >= 0 ) if( indexOfTabItemWithMouseOver >= 0 )
{ {
var targetModel = _otherTabs[ indexOfTabItemWithMouseOver ].Content as LayoutContent; var targetModel = _otherTabs[ indexOfTabItemWithMouseOver ].Content as LayoutContent;
var container = Model.Parent as ILayoutContainer; var container = this.Model.Parent as ILayoutContainer;
var containerPane = Model.Parent as ILayoutPane; var containerPane = this.Model.Parent as ILayoutPane;
if( ( containerPane is LayoutDocumentPane ) && !( ( LayoutDocumentPane )containerPane ).CanRepositionItems ) if( ( containerPane is LayoutDocumentPane ) && !( ( LayoutDocumentPane )containerPane ).CanRepositionItems )
return; return;
@ -190,13 +190,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
var childrenList = container.Children.ToList(); var childrenList = container.Children.ToList();
containerPane.MoveChild( childrenList.IndexOf( Model ), childrenList.IndexOf( targetModel ) ); containerPane.MoveChild( childrenList.IndexOf( Model ), childrenList.IndexOf( targetModel ) );
Model.IsActive = true; this.Model.IsActive = true;
_parentDocumentTabPanel.UpdateLayout(); _parentDocumentTabPanel.UpdateLayout();
UpdateDragDetails(); this.UpdateDragDetails();
} }
} }
} }
} }
protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e ) protected override void OnMouseLeftButtonUp( System.Windows.Input.MouseButtonEventArgs e )
@ -230,5 +229,37 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnMouseDown( e ); base.OnMouseDown( e );
} }
#endregion
#region Private Methods
private void UpdateDragDetails()
{
_parentDocumentTabPanel = this.FindLogicalAncestor<DocumentPaneTabPanel>();
_parentDocumentTabPanelScreenArea = _parentDocumentTabPanel.GetScreenArea();
_otherTabs = _parentDocumentTabPanel.Children.Cast<TabItem>().Where( ch =>
ch.Visibility != System.Windows.Visibility.Collapsed ).ToList();
Rect currentTabScreenArea = this.FindLogicalAncestor<TabItem>().GetScreenArea();
_otherTabsScreenArea = _otherTabs.Select( ti =>
{
var screenArea = ti.GetScreenArea();
return new Rect( screenArea.Left, screenArea.Top, currentTabScreenArea.Width, screenArea.Height );
} ).ToList();
}
private void StartDraggingFloatingWindowForContent()
{
this.ReleaseMouseCapture();
if( this.Model is LayoutAnchorable )
{
( ( LayoutAnchorable )this.Model ).ResetCanCloseInternal();
}
var manager = this.Model.Root.Manager;
manager.StartDraggingFloatingWindowForContent( this.Model );
}
#endregion
} }
} }

584
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutFloatingWindowControl.cs

@ -31,8 +31,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public abstract class LayoutFloatingWindowControl : Window, ILayoutControl public abstract class LayoutFloatingWindowControl : Window, ILayoutControl
{ {
#region Members
private ResourceDictionary currentThemeResourceDictionary; // = null private ResourceDictionary currentThemeResourceDictionary; // = null
private bool _isInternalChange; //false private bool _isInternalChange; //false
private ILayoutElement _model;
private bool _attachDrag = false;
private HwndSource _hwndSrc;
private HwndSourceHook _hwndSrcHook;
private DragService _dragService = null;
private bool _internalCloseFlag = false;
#endregion
#region Constructors
static LayoutFloatingWindowControl() static LayoutFloatingWindowControl()
{ {
@ -41,165 +53,159 @@ namespace Xceed.Wpf.AvalonDock.Controls
ShowInTaskbarProperty.OverrideMetadata( typeof( LayoutFloatingWindowControl ), new FrameworkPropertyMetadata( false ) ); ShowInTaskbarProperty.OverrideMetadata( typeof( LayoutFloatingWindowControl ), new FrameworkPropertyMetadata( false ) );
} }
static object CoerceContentValue( DependencyObject sender, object content ) protected LayoutFloatingWindowControl( ILayoutElement model )
{ {
return new FloatingWindowContentHost( sender as LayoutFloatingWindowControl ) { Content = content as UIElement }; this.Loaded += new RoutedEventHandler( OnLoaded );
this.Unloaded += new RoutedEventHandler( OnUnloaded );
_model = model;
} }
protected internal class FloatingWindowContentHost : HwndHost #endregion
{
LayoutFloatingWindowControl _owner;
public FloatingWindowContentHost( LayoutFloatingWindowControl owner )
{
_owner = owner;
var manager = _owner.Model.Root.Manager;
}
#region Properties
HwndSource _wpfContentHost = null; #region Model
Border _rootPresenter = null;
DockingManager _manager = null;
protected override System.Runtime.InteropServices.HandleRef BuildWindowCore( System.Runtime.InteropServices.HandleRef hwndParent ) public abstract ILayoutElement Model
{
_wpfContentHost = new HwndSource( new HwndSourceParameters()
{ {
ParentWindow = hwndParent.Handle, get;
WindowStyle = Win32Helper.WS_CHILD | Win32Helper.WS_VISIBLE | Win32Helper.WS_CLIPSIBLINGS | Win32Helper.WS_CLIPCHILDREN, }
Width = 1,
Height = 1
} );
_rootPresenter = new Border() { Child = new AdornerDecorator() { Child = Content }, Focusable = true }; #endregion
_rootPresenter.SetBinding( Border.BackgroundProperty, new Binding( "Background" ) { Source = _owner } );
_wpfContentHost.RootVisual = _rootPresenter;
_wpfContentHost.SizeToContent = SizeToContent.Manual;
_manager = _owner.Model.Root.Manager;
_manager.InternalAddLogicalChild( _rootPresenter );
return new HandleRef( this, _wpfContentHost.Handle ); #region IsDragging
}
/// <summary>
/// IsDragging Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey IsDraggingPropertyKey = DependencyProperty.RegisterReadOnly( "IsDragging", typeof( bool ), typeof( LayoutFloatingWindowControl ),
new FrameworkPropertyMetadata( ( bool )false, new PropertyChangedCallback( OnIsDraggingChanged ) ) );
protected override void DestroyWindowCore( HandleRef hwnd ) public static readonly DependencyProperty IsDraggingProperty = IsDraggingPropertyKey.DependencyProperty;
{
_manager.InternalRemoveLogicalChild( _rootPresenter );
if( _wpfContentHost != null )
{
_wpfContentHost.Dispose();
_wpfContentHost = null;
}
}
public Visual RootVisual /// <summary>
/// Gets the IsDragging property. This dependency property
/// indicates that this floating window is being dragged.
/// </summary>
public bool IsDragging
{ {
get get
{ {
return _rootPresenter; return ( bool )GetValue( IsDraggingProperty );
} }
} }
protected override Size MeasureOverride( Size constraint ) /// <summary>
/// Provides a secure method for setting the IsDragging property.
/// This dependency property indicates that this floating window is being dragged.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetIsDragging( bool value )
{ {
if( Content == null ) SetValue( IsDraggingPropertyKey, value );
return base.MeasureOverride( constraint );
Content.Measure( constraint );
return Content.DesiredSize;
} }
#region Content
/// <summary> /// <summary>
/// Content Dependency Property /// Handles changes to the IsDragging property.
/// </summary> /// </summary>
public static readonly DependencyProperty ContentProperty = private static void OnIsDraggingChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
DependencyProperty.Register( "Content", typeof( UIElement ), typeof( FloatingWindowContentHost ), {
new FrameworkPropertyMetadata( ( UIElement )null, ( ( LayoutFloatingWindowControl )d ).OnIsDraggingChanged( e );
new PropertyChangedCallback( OnContentChanged ) ) ); }
/// <summary> /// <summary>
/// Gets or sets the Content property. This dependency property /// Provides derived classes an opportunity to handle changes to the IsDragging property.
/// indicates ....
/// </summary> /// </summary>
public UIElement Content protected virtual void OnIsDraggingChanged( DependencyPropertyChangedEventArgs e )
{ {
get if( ( bool )e.NewValue )
{ {
return ( UIElement )GetValue( ContentProperty ); CaptureMouse();
} }
set else
{ {
SetValue( ContentProperty, value ); ReleaseMouseCapture();
} }
} }
/// <summary> #endregion
/// Handles changes to the Content property.
/// </summary>
private static void OnContentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( FloatingWindowContentHost )d ).OnContentChanged( e );
}
/// <summary> #region CloseInitiatedByUser
/// Provides derived classes an opportunity to handle changes to the Content property.
/// </summary> protected bool CloseInitiatedByUser
protected virtual void OnContentChanged( DependencyPropertyChangedEventArgs e )
{ {
if( _rootPresenter != null ) get
_rootPresenter.Child = Content; {
return !_internalCloseFlag;
}
} }
#endregion #endregion
}
ILayoutElement _model; #region KeepContentVisibleOnClose
protected LayoutFloatingWindowControl( ILayoutElement model ) internal bool KeepContentVisibleOnClose
{ {
this.Loaded += new RoutedEventHandler( OnLoaded ); get;
this.Unloaded += new RoutedEventHandler( OnUnloaded ); set;
_model = model;
} }
internal virtual void UpdateThemeResources( Theme oldTheme = null ) #endregion
{
if( oldTheme != null ) #region IsMaximized
{
if( oldTheme is DictionaryTheme ) /// <summary>
/// IsMaximized Dependency Property
/// </summary>
public static readonly DependencyProperty IsMaximizedProperty = DependencyProperty.Register( "IsMaximized", typeof( bool ), typeof( LayoutFloatingWindowControl ),
new FrameworkPropertyMetadata( ( bool )false ) );
/// <summary>
/// Gets/sets the IsMaximized property. This dependency property
/// indicates if the window is maximized.
/// </summary>
public bool IsMaximized
{ {
if( currentThemeResourceDictionary != null ) get
{ {
Resources.MergedDictionaries.Remove( currentThemeResourceDictionary ); return ( bool )GetValue( IsMaximizedProperty );
currentThemeResourceDictionary = null;
}
} }
else private set
{ {
var resourceDictionaryToRemove = SetValue( IsMaximizedProperty, value );
Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() ); UpdatePositionAndSizeOfPanes();
if( resourceDictionaryToRemove != null )
Resources.MergedDictionaries.Remove(
resourceDictionaryToRemove );
} }
} }
var manager = _model.Root.Manager; /// <summary>
if( manager.Theme != null ) /// Provides a secure method for setting the IsMaximized property.
/// This dependency property indicates if the window is maximized.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected override void OnStateChanged( EventArgs e )
{ {
if( manager.Theme is DictionaryTheme ) if( !_isInternalChange )
{ {
currentThemeResourceDictionary = ( ( DictionaryTheme )manager.Theme ).ThemeResourceDictionary; if( WindowState == WindowState.Maximized )
Resources.MergedDictionaries.Add( currentThemeResourceDictionary ); {
UpdateMaximizedState( true );
} }
else else
{ {
Resources.MergedDictionaries.Add( new ResourceDictionary() { Source = manager.Theme.GetResourceUri() } ); WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal;
} }
} }
base.OnStateChanged( e );
} }
#endregion
#endregion
#region Overrides
protected override void OnClosed( EventArgs e ) protected override void OnClosed( EventArgs e )
{ {
if( Content != null ) if( Content != null )
@ -218,72 +224,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
base.OnClosed( e ); base.OnClosed( e );
} }
bool _attachDrag = false;
internal void AttachDrag( bool onActivated = true )
{
if( onActivated )
{
_attachDrag = true;
this.Activated += new EventHandler( OnActivated );
}
else
{
IntPtr windowHandle = new WindowInteropHelper( this ).Handle;
IntPtr lParam = new IntPtr( ( ( int )Left & ( int )0xFFFF ) | ( ( ( int )Top ) << 16 ) );
Win32Helper.SendMessage( windowHandle, Win32Helper.WM_NCLBUTTONDOWN, new IntPtr( Win32Helper.HT_CAPTION ), lParam );
}
}
HwndSource _hwndSrc;
HwndSourceHook _hwndSrcHook;
void OnLoaded( object sender, RoutedEventArgs e )
{
this.Loaded -= new RoutedEventHandler( OnLoaded );
this.SetParentToMainWindowOf( Model.Root.Manager );
_hwndSrc = HwndSource.FromDependencyObject( this ) as HwndSource;
_hwndSrcHook = new HwndSourceHook( FilterMessage );
_hwndSrc.AddHook( _hwndSrcHook );
// Restore maximize state
var maximized = Model.Descendents().OfType<ILayoutElementForFloatingWindow>().Any( l => l.IsMaximized );
UpdateMaximizedState( maximized );
}
void OnUnloaded( object sender, RoutedEventArgs e )
{
this.Unloaded -= new RoutedEventHandler( OnUnloaded );
if( _hwndSrc != null )
{
_hwndSrc.RemoveHook( _hwndSrcHook );
InternalClose();
}
}
void OnActivated( object sender, EventArgs e )
{
this.Activated -= new EventHandler( OnActivated );
if( _attachDrag && Mouse.LeftButton == MouseButtonState.Pressed )
{
IntPtr windowHandle = new WindowInteropHelper( this ).Handle;
var mousePosition = this.PointToScreenDPI( Mouse.GetPosition( this ) );
var clientArea = Win32Helper.GetClientRect( windowHandle );
var windowArea = Win32Helper.GetWindowRect( windowHandle );
Left = mousePosition.X - windowArea.Width / 2.0;
Top = mousePosition.Y - ( windowArea.Height - clientArea.Height ) / 2.0;
_attachDrag = false;
IntPtr lParam = new IntPtr( ( ( int )mousePosition.X & ( int )0xFFFF ) | ( ( ( int )mousePosition.Y ) << 16 ) );
Win32Helper.SendMessage( windowHandle, Win32Helper.WM_NCLBUTTONDOWN, new IntPtr( Win32Helper.HT_CAPTION ), lParam );
}
}
protected override void OnInitialized( EventArgs e ) protected override void OnInitialized( EventArgs e )
{ {
CommandBindings.Add( new CommandBinding( Microsoft.Windows.Shell.SystemCommands.CloseWindowCommand, CommandBindings.Add( new CommandBinding( Microsoft.Windows.Shell.SystemCommands.CloseWindowCommand,
@ -299,105 +239,63 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
public abstract ILayoutElement Model #endregion
{
get;
}
#region IsDragging
/// <summary>
/// IsDragging Read-Only Dependency Property
/// </summary>
private static readonly DependencyPropertyKey IsDraggingPropertyKey
= DependencyProperty.RegisterReadOnly( "IsDragging", typeof( bool ), typeof( LayoutFloatingWindowControl ),
new FrameworkPropertyMetadata( ( bool )false,
new PropertyChangedCallback( OnIsDraggingChanged ) ) );
public static readonly DependencyProperty IsDraggingProperty #region Internal Methods
= IsDraggingPropertyKey.DependencyProperty;
/// <summary> internal virtual void UpdateThemeResources( Theme oldTheme = null )
/// Gets the IsDragging property. This dependency property
/// indicates that this floating window is being dragged.
/// </summary>
public bool IsDragging
{ {
get if( oldTheme != null )
{ {
return ( bool )GetValue( IsDraggingProperty ); if( oldTheme is DictionaryTheme )
{
if( currentThemeResourceDictionary != null )
{
Resources.MergedDictionaries.Remove( currentThemeResourceDictionary );
currentThemeResourceDictionary = null;
} }
} }
else
/// <summary>
/// Provides a secure method for setting the IsDragging property.
/// This dependency property indicates that this floating window is being dragged.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetIsDragging( bool value )
{ {
SetValue( IsDraggingPropertyKey, value ); var resourceDictionaryToRemove =
Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() );
if( resourceDictionaryToRemove != null )
Resources.MergedDictionaries.Remove(
resourceDictionaryToRemove );
} }
/// <summary>
/// Handles changes to the IsDragging property.
/// </summary>
private static void OnIsDraggingChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( LayoutFloatingWindowControl )d ).OnIsDraggingChanged( e );
} }
/// <summary> var manager = _model.Root.Manager;
/// Provides derived classes an opportunity to handle changes to the IsDragging property. if( manager.Theme != null )
/// </summary>
protected virtual void OnIsDraggingChanged( DependencyPropertyChangedEventArgs e )
{ {
if( ( bool )e.NewValue ) if( manager.Theme is DictionaryTheme )
{ {
CaptureMouse(); currentThemeResourceDictionary = ( ( DictionaryTheme )manager.Theme ).ThemeResourceDictionary;
Resources.MergedDictionaries.Add( currentThemeResourceDictionary );
} }
else else
{ {
ReleaseMouseCapture(); Resources.MergedDictionaries.Add( new ResourceDictionary() { Source = manager.Theme.GetResourceUri() } );
}
} }
} }
#endregion internal void AttachDrag( bool onActivated = true )
DragService _dragService = null;
void UpdatePositionAndSizeOfPanes()
{ {
foreach( var posElement in Model.Descendents().OfType<ILayoutElementForFloatingWindow>() ) if( onActivated )
{ {
posElement.FloatingLeft = Left; _attachDrag = true;
posElement.FloatingTop = Top; this.Activated += new EventHandler( OnActivated );
posElement.FloatingWidth = Width;
posElement.FloatingHeight = Height;
}
} }
else
void UpdateMaximizedState( bool isMaximized )
{
foreach( var posElement in Model.Descendents().OfType<ILayoutElementForFloatingWindow>() )
{ {
posElement.IsMaximized = isMaximized; IntPtr windowHandle = new WindowInteropHelper( this ).Handle;
IntPtr lParam = new IntPtr( ( ( int )Left & ( int )0xFFFF ) | ( ( ( int )Top ) << 16 ) );
Win32Helper.SendMessage( windowHandle, Win32Helper.WM_NCLBUTTONDOWN, new IntPtr( Win32Helper.HT_CAPTION ), lParam );
} }
IsMaximized = isMaximized;
_isInternalChange = true;
WindowState = isMaximized ? WindowState.Maximized : WindowState.Normal;
_isInternalChange = false;
} }
protected virtual IntPtr FilterMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled )
protected virtual IntPtr FilterMessage(
IntPtr hwnd,
int msg,
IntPtr wParam,
IntPtr lParam,
ref bool handled
)
{ {
handled = false; handled = false;
@ -460,6 +358,90 @@ namespace Xceed.Wpf.AvalonDock.Controls
return IntPtr.Zero; return IntPtr.Zero;
} }
internal void InternalClose()
{
_internalCloseFlag = true;
Close();
}
#endregion
#region Private Methods
private static object CoerceContentValue( DependencyObject sender, object content )
{
return new FloatingWindowContentHost( sender as LayoutFloatingWindowControl ) { Content = content as UIElement };
}
private void OnLoaded( object sender, RoutedEventArgs e )
{
this.Loaded -= new RoutedEventHandler( OnLoaded );
this.SetParentToMainWindowOf( Model.Root.Manager );
_hwndSrc = HwndSource.FromDependencyObject( this ) as HwndSource;
_hwndSrcHook = new HwndSourceHook( FilterMessage );
_hwndSrc.AddHook( _hwndSrcHook );
// Restore maximize state
var maximized = Model.Descendents().OfType<ILayoutElementForFloatingWindow>().Any( l => l.IsMaximized );
UpdateMaximizedState( maximized );
}
private void OnUnloaded( object sender, RoutedEventArgs e )
{
this.Unloaded -= new RoutedEventHandler( OnUnloaded );
if( _hwndSrc != null )
{
_hwndSrc.RemoveHook( _hwndSrcHook );
InternalClose();
}
}
private void OnActivated( object sender, EventArgs e )
{
this.Activated -= new EventHandler( OnActivated );
if( _attachDrag && Mouse.LeftButton == MouseButtonState.Pressed )
{
IntPtr windowHandle = new WindowInteropHelper( this ).Handle;
var mousePosition = this.PointToScreenDPI( Mouse.GetPosition( this ) );
var clientArea = Win32Helper.GetClientRect( windowHandle );
var windowArea = Win32Helper.GetWindowRect( windowHandle );
Left = mousePosition.X - windowArea.Width / 2.0;
Top = mousePosition.Y - ( windowArea.Height - clientArea.Height ) / 2.0;
_attachDrag = false;
IntPtr lParam = new IntPtr( ( ( int )mousePosition.X & ( int )0xFFFF ) | ( ( ( int )mousePosition.Y ) << 16 ) );
Win32Helper.SendMessage( windowHandle, Win32Helper.WM_NCLBUTTONDOWN, new IntPtr( Win32Helper.HT_CAPTION ), lParam );
}
}
private void UpdatePositionAndSizeOfPanes()
{
foreach( var posElement in Model.Descendents().OfType<ILayoutElementForFloatingWindow>() )
{
posElement.FloatingLeft = Left;
posElement.FloatingTop = Top;
posElement.FloatingWidth = Width;
posElement.FloatingHeight = Height;
}
}
private void UpdateMaximizedState( bool isMaximized )
{
foreach( var posElement in Model.Descendents().OfType<ILayoutElementForFloatingWindow>() )
{
posElement.IsMaximized = isMaximized;
}
IsMaximized = isMaximized;
_isInternalChange = true;
WindowState = isMaximized ? WindowState.Maximized : WindowState.Normal;
_isInternalChange = false;
}
private void UpdateDragPosition() private void UpdateDragPosition()
{ {
if( _dragService == null ) if( _dragService == null )
@ -472,76 +454,132 @@ namespace Xceed.Wpf.AvalonDock.Controls
_dragService.UpdateMouseLocation( mousePosition ); _dragService.UpdateMouseLocation( mousePosition );
} }
bool _internalCloseFlag = false; #endregion
internal void InternalClose() #region Internal Classes
protected internal class FloatingWindowContentHost : HwndHost
{ {
_internalCloseFlag = true; #region Members
Close();
private LayoutFloatingWindowControl _owner;
private HwndSource _wpfContentHost = null;
private Border _rootPresenter = null;
private DockingManager _manager = null;
#endregion
#region Constructors
public FloatingWindowContentHost( LayoutFloatingWindowControl owner )
{
_owner = owner;
var manager = _owner.Model.Root.Manager;
} }
#endregion
#region Properties
protected bool CloseInitiatedByUser #region RootVisual
public Visual RootVisual
{ {
get get
{ {
return !_internalCloseFlag; return _rootPresenter;
} }
} }
internal bool KeepContentVisibleOnClose #endregion
{
get;
set;
}
#region IsMaximized #region Content
/// <summary> /// <summary>
/// IsMaximized Dependency Property /// Content Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IsMaximizedProperty public static readonly DependencyProperty ContentProperty = DependencyProperty.Register( "Content", typeof( UIElement ), typeof( FloatingWindowContentHost ),
= DependencyProperty.Register( "IsMaximized", typeof( bool ), typeof( LayoutFloatingWindowControl ), new FrameworkPropertyMetadata( ( UIElement )null, new PropertyChangedCallback( OnContentChanged ) ) );
new FrameworkPropertyMetadata( ( bool )false ) );
/// <summary> /// <summary>
/// Gets/sets the IsMaximized property. This dependency property /// Gets or sets the Content property. This dependency property
/// indicates if the window is maximized. /// indicates ....
/// </summary> /// </summary>
public bool IsMaximized public UIElement Content
{ {
get get
{ {
return ( bool )GetValue( IsMaximizedProperty ); return ( UIElement )GetValue( ContentProperty );
} }
private set set
{ {
SetValue( IsMaximizedProperty, value ); SetValue( ContentProperty, value );
UpdatePositionAndSizeOfPanes();
} }
} }
/// <summary> /// <summary>
/// Provides a secure method for setting the IsMaximized property. /// Handles changes to the Content property.
/// This dependency property indicates if the window is maximized.
/// </summary> /// </summary>
/// <param name="value">The new value for the property.</param> private static void OnContentChanged( DependencyObject d, DependencyPropertyChangedEventArgs e )
{
( ( FloatingWindowContentHost )d ).OnContentChanged( e );
}
protected override void OnStateChanged( EventArgs e ) /// <summary>
/// Provides derived classes an opportunity to handle changes to the Content property.
/// </summary>
protected virtual void OnContentChanged( DependencyPropertyChangedEventArgs e )
{ {
if( !_isInternalChange ) if( _rootPresenter != null )
_rootPresenter.Child = Content;
}
#endregion
#endregion
#region Overrides
protected override System.Runtime.InteropServices.HandleRef BuildWindowCore( System.Runtime.InteropServices.HandleRef hwndParent )
{ {
if( WindowState == WindowState.Maximized ) _wpfContentHost = new HwndSource( new HwndSourceParameters()
{ {
UpdateMaximizedState( true ); ParentWindow = hwndParent.Handle,
WindowStyle = Win32Helper.WS_CHILD | Win32Helper.WS_VISIBLE | Win32Helper.WS_CLIPSIBLINGS | Win32Helper.WS_CLIPCHILDREN,
Width = 1,
Height = 1
} );
_rootPresenter = new Border() { Child = new AdornerDecorator() { Child = Content }, Focusable = true };
_rootPresenter.SetBinding( Border.BackgroundProperty, new Binding( "Background" ) { Source = _owner } );
_wpfContentHost.RootVisual = _rootPresenter;
_wpfContentHost.SizeToContent = SizeToContent.Manual;
_manager = _owner.Model.Root.Manager;
_manager.InternalAddLogicalChild( _rootPresenter );
return new HandleRef( this, _wpfContentHost.Handle );
} }
else
protected override void DestroyWindowCore( HandleRef hwnd )
{ {
WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal; _manager.InternalRemoveLogicalChild( _rootPresenter );
if( _wpfContentHost != null )
{
_wpfContentHost.Dispose();
_wpfContentHost = null;
} }
} }
base.OnStateChanged( e ); protected override Size MeasureOverride( Size constraint )
{
if( Content == null )
return base.MeasureOverride( constraint );
Content.Measure( constraint );
return Content.DesiredSize;
}
#endregion
} }
#endregion #endregion

111
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridControl.cs

@ -15,21 +15,33 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Diagnostics;
using System.Windows.Threading; using System.Windows.Threading;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public abstract class LayoutGridControl<T> : Grid, ILayoutControl where T : class, ILayoutPanelElement public abstract class LayoutGridControl<T> : Grid, ILayoutControl where T : class, ILayoutPanelElement
{ {
#region Members
private LayoutPositionableGroup<T> _model;
private Orientation _orientation;
private bool _initialized;
private ChildrenTreeChange? _asyncRefreshCalled;
private ReentrantFlag _fixingChildrenDockLengths = new ReentrantFlag();
private Border _resizerGhost = null;
private Window _resizerWindowHost = null;
private Vector _initialStartPoint;
#endregion
#region Constructors
static LayoutGridControl() static LayoutGridControl()
{ {
} }
@ -45,26 +57,37 @@ namespace Xceed.Wpf.AvalonDock.Controls
FlowDirection = System.Windows.FlowDirection.LeftToRight; FlowDirection = System.Windows.FlowDirection.LeftToRight;
} }
LayoutPositionableGroup<T> _model; #endregion
#region Properties
public ILayoutElement Model public ILayoutElement Model
{ {
get { return _model; } get
{
return _model;
}
} }
Orientation _orientation;
public Orientation Orientation public Orientation Orientation
{ {
get { return (_model as ILayoutOrientableGroup).Orientation; } get
{
return ( _model as ILayoutOrientableGroup ).Orientation;
}
} }
bool _initialized; private bool AsyncRefreshCalled
ChildrenTreeChange? _asyncRefreshCalled; {
get
bool AsyncRefreshCalled
{ {
get { return _asyncRefreshCalled != null; } return _asyncRefreshCalled != null;
} }
}
#endregion
#region Overrides
protected override void OnInitialized( EventArgs e ) protected override void OnInitialized( EventArgs e )
{ {
@ -86,7 +109,23 @@ namespace Xceed.Wpf.AvalonDock.Controls
this.LayoutUpdated += new EventHandler( OnLayoutUpdated ); this.LayoutUpdated += new EventHandler( OnLayoutUpdated );
} }
void OnLayoutUpdated(object sender, EventArgs e) #endregion
#region Internal Methods
protected void FixChildrenDockLengths()
{
using( _fixingChildrenDockLengths.Enter() )
OnFixChildrenDockLengths();
}
protected abstract void OnFixChildrenDockLengths();
#endregion
#region Private Methods
private void OnLayoutUpdated( object sender, EventArgs e )
{ {
var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize; var modelWithAtcualSize = _model as ILayoutPositionableElementWithActualSize;
modelWithAtcualSize.ActualWidth = ActualWidth; modelWithAtcualSize.ActualWidth = ActualWidth;
@ -99,7 +138,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void UpdateChildren() private void UpdateChildren()
{ {
var alreadyContainedChildren = Children.OfType<ILayoutControl>().ToArray(); var alreadyContainedChildren = Children.OfType<ILayoutControl>().ToArray();
@ -152,7 +191,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void OnChildModelPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) private void OnChildModelPropertyChanged( object sender, System.ComponentModel.PropertyChangedEventArgs e )
{ {
if( AsyncRefreshCalled ) if( AsyncRefreshCalled )
return; return;
@ -183,8 +222,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
private void UpdateRowColDefinitions()
void UpdateRowColDefinitions()
{ {
var root = _model.Root; var root = _model.Root;
if( root == null ) if( root == null )
@ -287,18 +325,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
} }
ReentrantFlag _fixingChildrenDockLengths = new ReentrantFlag(); private void CreateSplitters()
protected void FixChildrenDockLengths()
{
using (_fixingChildrenDockLengths.Enter())
OnFixChildrenDockLengths();
}
protected abstract void OnFixChildrenDockLengths();
#region Splitters
void CreateSplitters()
{ {
for( int iChild = 1; iChild < Children.Count; iChild++ ) for( int iChild = 1; iChild < Children.Count; iChild++ )
{ {
@ -309,7 +336,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void DetachOldSplitters() private void DetachOldSplitters()
{ {
foreach( var splitter in Children.OfType<LayoutGridResizerControl>() ) foreach( var splitter in Children.OfType<LayoutGridResizerControl>() )
{ {
@ -319,7 +346,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void AttachNewSplitters() private void AttachNewSplitters()
{ {
foreach( var splitter in Children.OfType<LayoutGridResizerControl>() ) foreach( var splitter in Children.OfType<LayoutGridResizerControl>() )
{ {
@ -329,13 +356,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void OnSplitterDragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e) private void OnSplitterDragStarted( object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e )
{ {
var resizer = sender as LayoutGridResizerControl; var resizer = sender as LayoutGridResizerControl;
ShowResizerOverlayWindow( resizer ); ShowResizerOverlayWindow( resizer );
} }
void OnSplitterDragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e) private void OnSplitterDragDelta( object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e )
{ {
LayoutGridResizerControl splitter = sender as LayoutGridResizerControl; LayoutGridResizerControl splitter = sender as LayoutGridResizerControl;
var rootVisual = this.FindVisualTreeRoot() as Visual; var rootVisual = this.FindVisualTreeRoot() as Visual;
@ -354,7 +381,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
void OnSplitterDragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e) private void OnSplitterDragCompleted( object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e )
{ {
LayoutGridResizerControl splitter = sender as LayoutGridResizerControl; LayoutGridResizerControl splitter = sender as LayoutGridResizerControl;
var rootVisual = this.FindVisualTreeRoot() as Visual; var rootVisual = this.FindVisualTreeRoot() as Visual;
@ -428,11 +455,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
HideResizerOverlayWindow(); HideResizerOverlayWindow();
} }
Border _resizerGhost = null; private FrameworkElement GetNextVisibleChild( int index )
Window _resizerWindowHost = null;
Vector _initialStartPoint;
FrameworkElement GetNextVisibleChild(int index)
{ {
for( int i = index + 1; i < InternalChildren.Count; i++ ) for( int i = index + 1; i < InternalChildren.Count; i++ )
{ {
@ -454,7 +477,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
return null; return null;
} }
void ShowResizerOverlayWindow(LayoutGridResizerControl splitter) private void ShowResizerOverlayWindow( LayoutGridResizerControl splitter )
{ {
_resizerGhost = new Border() _resizerGhost = new Border()
{ {
@ -542,7 +565,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
_resizerWindowHost.Show(); _resizerWindowHost.Show();
} }
void HideResizerOverlayWindow() private void HideResizerOverlayWindow()
{ {
if( _resizerWindowHost != null ) if( _resizerWindowHost != null )
{ {
@ -552,9 +575,5 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion #endregion
} }
} }

37
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutGridResizerControl.cs

@ -14,10 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows; using System.Windows;
using System.Windows.Media; using System.Windows.Media;
@ -26,6 +22,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutGridResizerControl : Thumb public class LayoutGridResizerControl : Thumb
{ {
#region Constructors
static LayoutGridResizerControl() static LayoutGridResizerControl()
{ {
//This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
@ -37,14 +35,16 @@ namespace Xceed.Wpf.AvalonDock.Controls
IsHitTestVisibleProperty.OverrideMetadata( typeof( LayoutGridResizerControl ), new FrameworkPropertyMetadata( true, null ) ); IsHitTestVisibleProperty.OverrideMetadata( typeof( LayoutGridResizerControl ), new FrameworkPropertyMetadata( true, null ) );
} }
#endregion
#region Properties
#region BackgroundWhileDragging #region BackgroundWhileDragging
/// <summary> /// <summary>
/// BackgroundWhileDragging Dependency Property /// BackgroundWhileDragging Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty BackgroundWhileDraggingProperty = public static readonly DependencyProperty BackgroundWhileDraggingProperty = DependencyProperty.Register( "BackgroundWhileDragging", typeof( Brush ), typeof( LayoutGridResizerControl ),
DependencyProperty.Register("BackgroundWhileDragging", typeof(Brush), typeof(LayoutGridResizerControl),
new FrameworkPropertyMetadata( ( Brush )Brushes.Black ) ); new FrameworkPropertyMetadata( ( Brush )Brushes.Black ) );
/// <summary> /// <summary>
@ -53,8 +53,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public Brush BackgroundWhileDragging public Brush BackgroundWhileDragging
{ {
get { return (Brush)GetValue(BackgroundWhileDraggingProperty); } get
set { SetValue(BackgroundWhileDraggingProperty, value); } {
return ( Brush )GetValue( BackgroundWhileDraggingProperty );
}
set
{
SetValue( BackgroundWhileDraggingProperty, value );
}
} }
#endregion #endregion
@ -64,8 +70,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// OpacityWhileDragging Dependency Property /// OpacityWhileDragging Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty OpacityWhileDraggingProperty = public static readonly DependencyProperty OpacityWhileDraggingProperty = DependencyProperty.Register( "OpacityWhileDragging", typeof( double ), typeof( LayoutGridResizerControl ),
DependencyProperty.Register("OpacityWhileDragging", typeof(double), typeof(LayoutGridResizerControl),
new FrameworkPropertyMetadata( ( double )0.5 ) ); new FrameworkPropertyMetadata( ( double )0.5 ) );
/// <summary> /// <summary>
@ -74,9 +79,17 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public double OpacityWhileDragging public double OpacityWhileDragging
{ {
get { return (double)GetValue(OpacityWhileDraggingProperty); } get
set { SetValue(OpacityWhileDraggingProperty, value); } {
return ( double )GetValue( OpacityWhileDraggingProperty );
}
set
{
SetValue( OpacityWhileDraggingProperty, value );
} }
}
#endregion
#endregion #endregion
} }

475
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutItem.cs

@ -15,14 +15,11 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Windows.Input; using System.Windows.Input;
using Xceed.Wpf.AvalonDock.Commands; using Xceed.Wpf.AvalonDock.Commands;
using System.ComponentModel;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
@ -31,6 +28,26 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public abstract class LayoutItem : FrameworkElement public abstract class LayoutItem : FrameworkElement
{ {
#region Members
private ICommand _defaultCloseCommand;
private ICommand _defaultFloatCommand;
private ICommand _defaultDockAsDocumentCommand;
private ICommand _defaultCloseAllButThisCommand;
private ICommand _defaultCloseAllCommand;
private ICommand _defaultActivateCommand;
private ICommand _defaultNewVerticalTabGroupCommand;
private ICommand _defaultNewHorizontalTabGroupCommand;
private ICommand _defaultMoveToNextTabGroupCommand;
private ICommand _defaultMoveToPreviousTabGroupCommand;
private ContentPresenter _view = null;
private ReentrantFlag _isSelectedReentrantFlag = new ReentrantFlag();
private ReentrantFlag _isActiveReentrantFlag = new ReentrantFlag();
#endregion
#region Constructors
static LayoutItem() static LayoutItem()
{ {
ToolTipProperty.OverrideMetadata( typeof( LayoutItem ), new FrameworkPropertyMetadata( null, ( s, e ) => OnToolTipChanged( s, e ) ) ); ToolTipProperty.OverrideMetadata( typeof( LayoutItem ), new FrameworkPropertyMetadata( null, ( s, e ) => OnToolTipChanged( s, e ) ) );
@ -40,55 +57,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
internal LayoutItem() internal LayoutItem()
{ {
} }
internal virtual void Attach( LayoutContent model ) #endregion
{
LayoutElement = model;
Model = model.Content;
InitDefaultCommands();
LayoutElement.IsSelectedChanged += new EventHandler( LayoutElement_IsSelectedChanged );
LayoutElement.IsActiveChanged += new EventHandler( LayoutElement_IsActiveChanged );
DataContext = this;
}
#region Properties
#region LayoutElement
void LayoutElement_IsActiveChanged( object sender, EventArgs e )
{
if( _isActiveReentrantFlag.CanEnter )
{
using( _isActiveReentrantFlag.Enter() )
{
var bnd = BindingOperations.GetBinding( this, IsActiveProperty );
IsActive = LayoutElement.IsActive;
var bnd2 = BindingOperations.GetBinding( this, IsActiveProperty );
}
}
}
void LayoutElement_IsSelectedChanged( object sender, EventArgs e )
{
if( _isSelectedReentrantFlag.CanEnter )
{
using( _isSelectedReentrantFlag.Enter() )
{
IsSelected = LayoutElement.IsSelected;
}
}
}
internal virtual void Detach()
{
LayoutElement.IsSelectedChanged -= new EventHandler( LayoutElement_IsSelectedChanged );
LayoutElement.IsActiveChanged -= new EventHandler( LayoutElement_IsActiveChanged );
LayoutElement = null;
Model = null;
}
public LayoutContent LayoutElement public LayoutContent LayoutElement
{ {
@ -96,106 +71,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
private set; private set;
} }
#endregion
#region Model
public object Model public object Model
{ {
get; get;
private set; private set;
} }
ICommand _defaultCloseCommand; #endregion
ICommand _defaultFloatCommand;
ICommand _defaultDockAsDocumentCommand;
ICommand _defaultCloseAllButThisCommand;
ICommand _defaultCloseAllCommand;
ICommand _defaultActivateCommand;
ICommand _defaultNewVerticalTabGroupCommand;
ICommand _defaultNewHorizontalTabGroupCommand;
ICommand _defaultMoveToNextTabGroupCommand;
ICommand _defaultMoveToPreviousTabGroupCommand;
protected virtual void InitDefaultCommands()
{
_defaultCloseCommand = new RelayCommand( ( p ) => ExecuteCloseCommand( p ), ( p ) => CanExecuteCloseCommand( p ) );
_defaultFloatCommand = new RelayCommand( ( p ) => ExecuteFloatCommand( p ), ( p ) => CanExecuteFloatCommand( p ) );
_defaultDockAsDocumentCommand = new RelayCommand( ( p ) => ExecuteDockAsDocumentCommand( p ), ( p ) => CanExecuteDockAsDocumentCommand( p ) );
_defaultCloseAllButThisCommand = new RelayCommand( ( p ) => ExecuteCloseAllButThisCommand( p ), ( p ) => CanExecuteCloseAllButThisCommand( p ) );
_defaultCloseAllCommand = new RelayCommand( ( p ) => ExecuteCloseAllCommand( p ), ( p ) => CanExecuteCloseAllCommand( p ) );
_defaultActivateCommand = new RelayCommand( ( p ) => ExecuteActivateCommand( p ), ( p ) => CanExecuteActivateCommand( p ) );
_defaultNewVerticalTabGroupCommand = new RelayCommand( ( p ) => ExecuteNewVerticalTabGroupCommand( p ), ( p ) => CanExecuteNewVerticalTabGroupCommand( p ) );
_defaultNewHorizontalTabGroupCommand = new RelayCommand( ( p ) => ExecuteNewHorizontalTabGroupCommand( p ), ( p ) => CanExecuteNewHorizontalTabGroupCommand( p ) );
_defaultMoveToNextTabGroupCommand = new RelayCommand( ( p ) => ExecuteMoveToNextTabGroupCommand( p ), ( p ) => CanExecuteMoveToNextTabGroupCommand( p ) );
_defaultMoveToPreviousTabGroupCommand = new RelayCommand( ( p ) => ExecuteMoveToPreviousTabGroupCommand( p ), ( p ) => CanExecuteMoveToPreviousTabGroupCommand( p ) );
}
protected virtual void ClearDefaultBindings()
{
if( CloseCommand == _defaultCloseCommand )
BindingOperations.ClearBinding( this, CloseCommandProperty );
if( FloatCommand == _defaultFloatCommand )
BindingOperations.ClearBinding( this, FloatCommandProperty );
if( DockAsDocumentCommand == _defaultDockAsDocumentCommand )
BindingOperations.ClearBinding( this, DockAsDocumentCommandProperty );
if( CloseAllButThisCommand == _defaultCloseAllButThisCommand )
BindingOperations.ClearBinding( this, CloseAllButThisCommandProperty );
if( CloseAllCommand == _defaultCloseAllCommand )
BindingOperations.ClearBinding( this, CloseAllCommandProperty );
if( ActivateCommand == _defaultActivateCommand )
BindingOperations.ClearBinding( this, ActivateCommandProperty );
if( NewVerticalTabGroupCommand == _defaultNewVerticalTabGroupCommand )
BindingOperations.ClearBinding( this, NewVerticalTabGroupCommandProperty );
if( NewHorizontalTabGroupCommand == _defaultNewHorizontalTabGroupCommand )
BindingOperations.ClearBinding( this, NewHorizontalTabGroupCommandProperty );
if( MoveToNextTabGroupCommand == _defaultMoveToNextTabGroupCommand )
BindingOperations.ClearBinding( this, MoveToNextTabGroupCommandProperty );
if( MoveToPreviousTabGroupCommand == _defaultMoveToPreviousTabGroupCommand )
BindingOperations.ClearBinding( this, MoveToPreviousTabGroupCommandProperty );
}
protected virtual void SetDefaultBindings()
{
if( CloseCommand == null )
CloseCommand = _defaultCloseCommand;
if( FloatCommand == null )
FloatCommand = _defaultFloatCommand;
if( DockAsDocumentCommand == null )
DockAsDocumentCommand = _defaultDockAsDocumentCommand;
if( CloseAllButThisCommand == null )
CloseAllButThisCommand = _defaultCloseAllButThisCommand;
if( CloseAllCommand == null )
CloseAllCommand = _defaultCloseAllCommand;
if( ActivateCommand == null )
ActivateCommand = _defaultActivateCommand;
if( NewVerticalTabGroupCommand == null )
NewVerticalTabGroupCommand = _defaultNewVerticalTabGroupCommand;
if( NewHorizontalTabGroupCommand == null )
NewHorizontalTabGroupCommand = _defaultNewHorizontalTabGroupCommand;
if( MoveToNextTabGroupCommand == null )
MoveToNextTabGroupCommand = _defaultMoveToNextTabGroupCommand;
if( MoveToPreviousTabGroupCommand == null )
MoveToPreviousTabGroupCommand = _defaultMoveToPreviousTabGroupCommand;
IsSelected = LayoutElement.IsSelected;
IsActive = LayoutElement.IsActive;
CanClose = LayoutElement.CanClose;
}
internal void _ClearDefaultBindings()
{
ClearDefaultBindings();
}
internal void _SetDefaultBindings()
{
SetDefaultBindings();
}
internal bool IsViewExists() #region View
{
return ( _view != null );
}
ContentPresenter _view = null;
public ContentPresenter View public ContentPresenter View
{ {
get get
@ -220,16 +109,15 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
#endregion
#region Title #region Title
/// <summary> /// <summary>
/// Title Dependency Property /// Title Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty TitleProperty = public static readonly DependencyProperty TitleProperty = DependencyProperty.Register( "Title", typeof( string ), typeof( LayoutItem ),
DependencyProperty.Register( "Title", typeof( string ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( string )null, new PropertyChangedCallback( OnTitleChanged ) ) );
new FrameworkPropertyMetadata( ( string )null,
new PropertyChangedCallback( OnTitleChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the Title property. This dependency property /// Gets or sets the Title property. This dependency property
@ -266,28 +154,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region ToolTip
private static void OnToolTipChanged( DependencyObject s, DependencyPropertyChangedEventArgs e )
{
( ( LayoutItem )s ).OnToolTipChanged();
}
private void OnToolTipChanged()
{
if( LayoutElement != null )
LayoutElement.ToolTip = ToolTip;
}
#endregion
#region IconSource #region IconSource
/// <summary> /// <summary>
/// IconSource Dependency Property /// IconSource Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IconSourceProperty = public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register( "IconSource", typeof( ImageSource ), typeof( LayoutItem ),
DependencyProperty.Register( "IconSource", typeof( ImageSource ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( ImageSource )null, new PropertyChangedCallback( OnIconSourceChanged ) ) );
new FrameworkPropertyMetadata( ( ImageSource )null,
new PropertyChangedCallback( OnIconSourceChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the IconSource property. This dependency property /// Gets or sets the IconSource property. This dependency property
@ -324,31 +197,13 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region Visibility
private static void OnVisibilityChanged( DependencyObject s, DependencyPropertyChangedEventArgs e )
{
( ( LayoutItem )s ).OnVisibilityChanged();
}
protected virtual void OnVisibilityChanged()
{
if( LayoutElement != null &&
Visibility == System.Windows.Visibility.Collapsed )
LayoutElement.Close();
}
#endregion
#region ContentId #region ContentId
/// <summary> /// <summary>
/// ContentId Dependency Property /// ContentId Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ContentIdProperty = public static readonly DependencyProperty ContentIdProperty = DependencyProperty.Register( "ContentId", typeof( string ), typeof( LayoutItem ),
DependencyProperty.Register( "ContentId", typeof( string ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( string )null, new PropertyChangedCallback( OnContentIdChanged ) ) );
new FrameworkPropertyMetadata( ( string )null,
new PropertyChangedCallback( OnContentIdChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the ContentId property. This dependency property /// Gets or sets the ContentId property. This dependency property
@ -387,15 +242,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region IsSelected #region IsSelected
ReentrantFlag _isSelectedReentrantFlag = new ReentrantFlag();
/// <summary> /// <summary>
/// IsSelected Dependency Property /// IsSelected Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IsSelectedProperty = public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register( "IsSelected", typeof( bool ), typeof( LayoutItem ),
DependencyProperty.Register( "IsSelected", typeof( bool ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( bool )false, new PropertyChangedCallback( OnIsSelectedChanged ) ) );
new FrameworkPropertyMetadata( ( bool )false,
new PropertyChangedCallback( OnIsSelectedChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the IsSelected property. This dependency property /// Gets or sets the IsSelected property. This dependency property
@ -440,15 +291,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
#region IsActive #region IsActive
ReentrantFlag _isActiveReentrantFlag = new ReentrantFlag();
/// <summary> /// <summary>
/// IsActive Dependency Property /// IsActive Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IsActiveProperty = public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register( "IsActive", typeof( bool ), typeof( LayoutItem ),
DependencyProperty.Register( "IsActive", typeof( bool ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( bool )false, new PropertyChangedCallback( OnIsActiveChanged ) ) );
new FrameworkPropertyMetadata( ( bool )false,
new PropertyChangedCallback( OnIsActiveChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the IsActive property. This dependency property /// Gets or sets the IsActive property. This dependency property
@ -496,10 +343,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// CanClose Dependency Property /// CanClose Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty CanCloseProperty = public static readonly DependencyProperty CanCloseProperty = DependencyProperty.Register( "CanClose", typeof( bool ), typeof( LayoutItem ),
DependencyProperty.Register( "CanClose", typeof( bool ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( bool )true, new PropertyChangedCallback( OnCanCloseChanged ) ) );
new FrameworkPropertyMetadata( ( bool )true,
new PropertyChangedCallback( OnCanCloseChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the CanClose property. This dependency property /// Gets or sets the CanClose property. This dependency property
@ -541,10 +386,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// CanFloat Dependency Property /// CanFloat Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty CanFloatProperty = public static readonly DependencyProperty CanFloatProperty = DependencyProperty.Register( "CanFloat", typeof( bool ), typeof( LayoutItem ),
DependencyProperty.Register( "CanFloat", typeof( bool ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( bool )true, new PropertyChangedCallback( OnCanFloatChanged ) ) );
new FrameworkPropertyMetadata( ( bool )true,
new PropertyChangedCallback( OnCanFloatChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the CanFloat property. This dependency property /// Gets or sets the CanFloat property. This dependency property
@ -586,11 +429,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// CloseCommand Dependency Property /// CloseCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty CloseCommandProperty = public static readonly DependencyProperty CloseCommandProperty = DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "CloseCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseCommandChanged ), new CoerceValueCallback( CoerceCloseCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnCloseCommandChanged ),
new CoerceValueCallback( CoerceCloseCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the CloseCommand property. This dependency property /// Gets or sets the CloseCommand property. This dependency property
@ -650,11 +490,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// FloatCommand Dependency Property /// FloatCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty FloatCommandProperty = public static readonly DependencyProperty FloatCommandProperty = DependencyProperty.Register( "FloatCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "FloatCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnFloatCommandChanged ), new CoerceValueCallback( CoerceFloatCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnFloatCommandChanged ),
new CoerceValueCallback( CoerceFloatCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the FloatCommand property. This dependency property /// Gets or sets the FloatCommand property. This dependency property
@ -713,16 +550,20 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
#region DockAsDocumentCommand #region DockAsDocumentCommand
/// <summary> /// <summary>
/// DockAsDocumentCommand Dependency Property /// DockAsDocumentCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty DockAsDocumentCommandProperty = public static readonly DependencyProperty DockAsDocumentCommandProperty = DependencyProperty.Register( "DockAsDocumentCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "DockAsDocumentCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnDockAsDocumentCommandChanged ), new CoerceValueCallback( CoerceDockAsDocumentCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnDockAsDocumentCommandChanged ),
new CoerceValueCallback( CoerceDockAsDocumentCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the DockAsDocumentCommand property. This dependency property /// Gets or sets the DockAsDocumentCommand property. This dependency property
@ -781,11 +622,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// CloseAllButThisCommand Dependency Property /// CloseAllButThisCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty CloseAllButThisCommandProperty = public static readonly DependencyProperty CloseAllButThisCommandProperty = DependencyProperty.Register( "CloseAllButThisCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "CloseAllButThisCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseAllButThisCommandChanged ), new CoerceValueCallback( CoerceCloseAllButThisCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnCloseAllButThisCommandChanged ),
new CoerceValueCallback( CoerceCloseAllButThisCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the CloseAllButThisCommand property. This dependency property /// Gets or sets the CloseAllButThisCommand property. This dependency property
@ -850,11 +688,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// CloseAllCommand Dependency Property /// CloseAllCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty CloseAllCommandProperty = public static readonly DependencyProperty CloseAllCommandProperty = DependencyProperty.Register( "CloseAllCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "CloseAllCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnCloseAllCommandChanged ), new CoerceValueCallback( CoerceCloseAllCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnCloseAllCommandChanged ),
new CoerceValueCallback( CoerceCloseAllCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the CloseAllCommand property. This dependency property /// Gets or sets the CloseAllCommand property. This dependency property
@ -919,11 +754,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// ActivateCommand Dependency Property /// ActivateCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty ActivateCommandProperty = public static readonly DependencyProperty ActivateCommandProperty = DependencyProperty.Register( "ActivateCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "ActivateCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( null, new PropertyChangedCallback( OnActivateCommandChanged ), new CoerceValueCallback( CoerceActivateCommandValue ) ) );
new FrameworkPropertyMetadata( null,
new PropertyChangedCallback( OnActivateCommandChanged ),
new CoerceValueCallback( CoerceActivateCommandValue ) ) );
/// <summary> /// <summary>
/// Gets or sets the ActivateCommand property. This dependency property /// Gets or sets the ActivateCommand property. This dependency property
@ -981,10 +813,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// NewVerticalTabGroupCommand Dependency Property /// NewVerticalTabGroupCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty NewVerticalTabGroupCommandProperty = public static readonly DependencyProperty NewVerticalTabGroupCommandProperty = DependencyProperty.Register( "NewVerticalTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "NewVerticalTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( ICommand )null, new PropertyChangedCallback( OnNewVerticalTabGroupCommandChanged ) ) );
new FrameworkPropertyMetadata( ( ICommand )null,
new PropertyChangedCallback( OnNewVerticalTabGroupCommandChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the NewVerticalTabGroupCommand property. This dependency property /// Gets or sets the NewVerticalTabGroupCommand property. This dependency property
@ -1057,10 +887,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// NewHorizontalTabGroupCommand Dependency Property /// NewHorizontalTabGroupCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty NewHorizontalTabGroupCommandProperty = public static readonly DependencyProperty NewHorizontalTabGroupCommandProperty = DependencyProperty.Register( "NewHorizontalTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "NewHorizontalTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( ICommand )null, new PropertyChangedCallback( OnNewHorizontalTabGroupCommandChanged ) ) );
new FrameworkPropertyMetadata( ( ICommand )null,
new PropertyChangedCallback( OnNewHorizontalTabGroupCommandChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the NewHorizontalTabGroupCommand property. This dependency property /// Gets or sets the NewHorizontalTabGroupCommand property. This dependency property
@ -1134,10 +962,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// MoveToNextTabGroupCommand Dependency Property /// MoveToNextTabGroupCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty MoveToNextTabGroupCommandProperty = public static readonly DependencyProperty MoveToNextTabGroupCommandProperty = DependencyProperty.Register( "MoveToNextTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "MoveToNextTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( ICommand )null, new PropertyChangedCallback( OnMoveToNextTabGroupCommandChanged ) ) );
new FrameworkPropertyMetadata( ( ICommand )null,
new PropertyChangedCallback( OnMoveToNextTabGroupCommandChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the MoveToNextTabGroupCommand property. This dependency property /// Gets or sets the MoveToNextTabGroupCommand property. This dependency property
@ -1203,10 +1029,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// MoveToPreviousTabGroupCommand Dependency Property /// MoveToPreviousTabGroupCommand Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty MoveToPreviousTabGroupCommandProperty = public static readonly DependencyProperty MoveToPreviousTabGroupCommandProperty = DependencyProperty.Register( "MoveToPreviousTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ),
DependencyProperty.Register( "MoveToPreviousTabGroupCommand", typeof( ICommand ), typeof( LayoutItem ), new FrameworkPropertyMetadata( ( ICommand )null, new PropertyChangedCallback( OnMoveToPreviousTabGroupCommandChanged ) ) );
new FrameworkPropertyMetadata( ( ICommand )null,
new PropertyChangedCallback( OnMoveToPreviousTabGroupCommandChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the MoveToPreviousTabGroupCommand property. This dependency property /// Gets or sets the MoveToPreviousTabGroupCommand property. This dependency property
@ -1265,7 +1089,164 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
#endregion #endregion
#endregion
#region Internal Methods
protected virtual void InitDefaultCommands()
{
_defaultCloseCommand = new RelayCommand( ( p ) => ExecuteCloseCommand( p ), ( p ) => CanExecuteCloseCommand( p ) );
_defaultFloatCommand = new RelayCommand( ( p ) => ExecuteFloatCommand( p ), ( p ) => CanExecuteFloatCommand( p ) );
_defaultDockAsDocumentCommand = new RelayCommand( ( p ) => ExecuteDockAsDocumentCommand( p ), ( p ) => CanExecuteDockAsDocumentCommand( p ) );
_defaultCloseAllButThisCommand = new RelayCommand( ( p ) => ExecuteCloseAllButThisCommand( p ), ( p ) => CanExecuteCloseAllButThisCommand( p ) );
_defaultCloseAllCommand = new RelayCommand( ( p ) => ExecuteCloseAllCommand( p ), ( p ) => CanExecuteCloseAllCommand( p ) );
_defaultActivateCommand = new RelayCommand( ( p ) => ExecuteActivateCommand( p ), ( p ) => CanExecuteActivateCommand( p ) );
_defaultNewVerticalTabGroupCommand = new RelayCommand( ( p ) => ExecuteNewVerticalTabGroupCommand( p ), ( p ) => CanExecuteNewVerticalTabGroupCommand( p ) );
_defaultNewHorizontalTabGroupCommand = new RelayCommand( ( p ) => ExecuteNewHorizontalTabGroupCommand( p ), ( p ) => CanExecuteNewHorizontalTabGroupCommand( p ) );
_defaultMoveToNextTabGroupCommand = new RelayCommand( ( p ) => ExecuteMoveToNextTabGroupCommand( p ), ( p ) => CanExecuteMoveToNextTabGroupCommand( p ) );
_defaultMoveToPreviousTabGroupCommand = new RelayCommand( ( p ) => ExecuteMoveToPreviousTabGroupCommand( p ), ( p ) => CanExecuteMoveToPreviousTabGroupCommand( p ) );
}
protected virtual void ClearDefaultBindings()
{
if( CloseCommand == _defaultCloseCommand )
BindingOperations.ClearBinding( this, CloseCommandProperty );
if( FloatCommand == _defaultFloatCommand )
BindingOperations.ClearBinding( this, FloatCommandProperty );
if( DockAsDocumentCommand == _defaultDockAsDocumentCommand )
BindingOperations.ClearBinding( this, DockAsDocumentCommandProperty );
if( CloseAllButThisCommand == _defaultCloseAllButThisCommand )
BindingOperations.ClearBinding( this, CloseAllButThisCommandProperty );
if( CloseAllCommand == _defaultCloseAllCommand )
BindingOperations.ClearBinding( this, CloseAllCommandProperty );
if( ActivateCommand == _defaultActivateCommand )
BindingOperations.ClearBinding( this, ActivateCommandProperty );
if( NewVerticalTabGroupCommand == _defaultNewVerticalTabGroupCommand )
BindingOperations.ClearBinding( this, NewVerticalTabGroupCommandProperty );
if( NewHorizontalTabGroupCommand == _defaultNewHorizontalTabGroupCommand )
BindingOperations.ClearBinding( this, NewHorizontalTabGroupCommandProperty );
if( MoveToNextTabGroupCommand == _defaultMoveToNextTabGroupCommand )
BindingOperations.ClearBinding( this, MoveToNextTabGroupCommandProperty );
if( MoveToPreviousTabGroupCommand == _defaultMoveToPreviousTabGroupCommand )
BindingOperations.ClearBinding( this, MoveToPreviousTabGroupCommandProperty );
}
protected virtual void SetDefaultBindings()
{
if( CloseCommand == null )
CloseCommand = _defaultCloseCommand;
if( FloatCommand == null )
FloatCommand = _defaultFloatCommand;
if( DockAsDocumentCommand == null )
DockAsDocumentCommand = _defaultDockAsDocumentCommand;
if( CloseAllButThisCommand == null )
CloseAllButThisCommand = _defaultCloseAllButThisCommand;
if( CloseAllCommand == null )
CloseAllCommand = _defaultCloseAllCommand;
if( ActivateCommand == null )
ActivateCommand = _defaultActivateCommand;
if( NewVerticalTabGroupCommand == null )
NewVerticalTabGroupCommand = _defaultNewVerticalTabGroupCommand;
if( NewHorizontalTabGroupCommand == null )
NewHorizontalTabGroupCommand = _defaultNewHorizontalTabGroupCommand;
if( MoveToNextTabGroupCommand == null )
MoveToNextTabGroupCommand = _defaultMoveToNextTabGroupCommand;
if( MoveToPreviousTabGroupCommand == null )
MoveToPreviousTabGroupCommand = _defaultMoveToPreviousTabGroupCommand;
IsSelected = LayoutElement.IsSelected;
IsActive = LayoutElement.IsActive;
CanClose = LayoutElement.CanClose;
}
protected virtual void OnVisibilityChanged()
{
if( LayoutElement != null &&
Visibility == System.Windows.Visibility.Collapsed )
LayoutElement.Close();
}
internal virtual void Attach( LayoutContent model )
{
LayoutElement = model;
Model = model.Content;
InitDefaultCommands();
LayoutElement.IsSelectedChanged += new EventHandler( LayoutElement_IsSelectedChanged );
LayoutElement.IsActiveChanged += new EventHandler( LayoutElement_IsActiveChanged );
DataContext = this;
}
internal virtual void Detach()
{
LayoutElement.IsSelectedChanged -= new EventHandler( LayoutElement_IsSelectedChanged );
LayoutElement.IsActiveChanged -= new EventHandler( LayoutElement_IsActiveChanged );
LayoutElement = null;
Model = null;
}
internal void _ClearDefaultBindings()
{
ClearDefaultBindings();
}
internal void _SetDefaultBindings()
{
SetDefaultBindings();
}
internal bool IsViewExists()
{
return ( _view != null );
}
#endregion
#region Private Methods
private void LayoutElement_IsActiveChanged( object sender, EventArgs e )
{
if( _isActiveReentrantFlag.CanEnter )
{
using( _isActiveReentrantFlag.Enter() )
{
var bnd = BindingOperations.GetBinding( this, IsActiveProperty );
IsActive = LayoutElement.IsActive;
var bnd2 = BindingOperations.GetBinding( this, IsActiveProperty );
}
}
}
private void LayoutElement_IsSelectedChanged( object sender, EventArgs e )
{
if( _isSelectedReentrantFlag.CanEnter )
{
using( _isSelectedReentrantFlag.Enter() )
{
IsSelected = LayoutElement.IsSelected;
}
}
}
private static void OnToolTipChanged( DependencyObject s, DependencyPropertyChangedEventArgs e )
{
( ( LayoutItem )s ).OnToolTipChanged();
}
private void OnToolTipChanged()
{
if( LayoutElement != null )
LayoutElement.ToolTip = ToolTip;
}
private static void OnVisibilityChanged( DependencyObject s, DependencyPropertyChangedEventArgs e )
{
( ( LayoutItem )s ).OnVisibilityChanged();
}
#endregion
} }
} }

16
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/LayoutPanelControl.cs

@ -15,9 +15,6 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
@ -26,6 +23,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class LayoutPanelControl : LayoutGridControl<ILayoutPanelElement>, ILayoutControl public class LayoutPanelControl : LayoutGridControl<ILayoutPanelElement>, ILayoutControl
{ {
#region Members
private LayoutPanel _model;
#endregion
#region Constructors
internal LayoutPanelControl( LayoutPanel model ) internal LayoutPanelControl( LayoutPanel model )
: base( model, model.Orientation ) : base( model, model.Orientation )
{ {
@ -33,7 +38,9 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
LayoutPanel _model; #endregion
#region Overrides
protected override void OnFixChildrenDockLengths() protected override void OnFixChildrenDockLengths()
{ {
@ -127,5 +134,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
} }
#endregion
} }
} }

60
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/MenuItemEx.cs

@ -14,10 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows; using System.Windows;
@ -25,25 +21,34 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class MenuItemEx : MenuItem public class MenuItemEx : MenuItem
{ {
#region Members
private bool _reentrantFlag = false;
#endregion
#region Constructors
static MenuItemEx() static MenuItemEx()
{ {
IconProperty.OverrideMetadata( typeof( MenuItemEx ), new FrameworkPropertyMetadata( new PropertyChangedCallback( OnIconPropertyChanged ) ) ); IconProperty.OverrideMetadata( typeof( MenuItemEx ), new FrameworkPropertyMetadata( new PropertyChangedCallback( OnIconPropertyChanged ) ) );
} }
public MenuItemEx() public MenuItemEx()
{ {
} }
#endregion
#region Properties
#region IconTemplate #region IconTemplate
/// <summary> /// <summary>
/// IconTemplate Dependency Property /// IconTemplate Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IconTemplateProperty = public static readonly DependencyProperty IconTemplateProperty = DependencyProperty.Register( "IconTemplate", typeof( DataTemplate ), typeof( MenuItemEx ),
DependencyProperty.Register("IconTemplate", typeof(DataTemplate), typeof(MenuItemEx), new FrameworkPropertyMetadata( ( DataTemplate )null, new PropertyChangedCallback( OnIconTemplateChanged ) ) );
new FrameworkPropertyMetadata((DataTemplate)null,
new PropertyChangedCallback(OnIconTemplateChanged)));
/// <summary> /// <summary>
/// Gets or sets the IconTemplate property. This dependency property /// Gets or sets the IconTemplate property. This dependency property
@ -51,8 +56,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public DataTemplate IconTemplate public DataTemplate IconTemplate
{ {
get { return (DataTemplate)GetValue(IconTemplateProperty); } get
set { SetValue(IconTemplateProperty, value); } {
return ( DataTemplate )GetValue( IconTemplateProperty );
}
set
{
SetValue( IconTemplateProperty, value );
}
} }
/// <summary> /// <summary>
@ -78,10 +89,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// IconTemplateSelector Dependency Property /// IconTemplateSelector Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty IconTemplateSelectorProperty = public static readonly DependencyProperty IconTemplateSelectorProperty = DependencyProperty.Register( "IconTemplateSelector", typeof( DataTemplateSelector ), typeof( MenuItemEx ),
DependencyProperty.Register("IconTemplateSelector", typeof(DataTemplateSelector), typeof(MenuItemEx), new FrameworkPropertyMetadata( ( DataTemplateSelector )null, new PropertyChangedCallback( OnIconTemplateSelectorChanged ) ) );
new FrameworkPropertyMetadata((DataTemplateSelector)null,
new PropertyChangedCallback(OnIconTemplateSelectorChanged)));
/// <summary> /// <summary>
/// Gets or sets the IconTemplateSelector property. This dependency property /// Gets or sets the IconTemplateSelector property. This dependency property
@ -89,8 +98,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
public DataTemplateSelector IconTemplateSelector public DataTemplateSelector IconTemplateSelector
{ {
get { return (DataTemplateSelector)GetValue(IconTemplateSelectorProperty); } get
set { SetValue(IconTemplateSelectorProperty, value); } {
return ( DataTemplateSelector )GetValue( IconTemplateSelectorProperty );
}
set
{
SetValue( IconTemplateSelectorProperty, value );
}
} }
/// <summary> /// <summary>
@ -111,7 +126,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
#endregion #endregion
static void OnIconPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) #endregion
#region Private Mehods
private static void OnIconPropertyChanged( DependencyObject sender, DependencyPropertyChangedEventArgs e )
{ {
if( e.NewValue != null ) if( e.NewValue != null )
{ {
@ -119,8 +138,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
bool _reentrantFlag = false; private void UpdateIcon()
void UpdateIcon()
{ {
if( _reentrantFlag ) if( _reentrantFlag )
return; return;
@ -135,5 +153,7 @@ namespace Xceed.Wpf.AvalonDock.Controls
Icon = IconTemplate.LoadContent(); Icon = IconTemplate.LoadContent();
_reentrantFlag = false; _reentrantFlag = false;
} }
#endregion
} }
} }

448
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/NavigatorWindow.cs

@ -19,12 +19,30 @@ using System.Linq;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using Xceed.Wpf.AvalonDock.Themes; using Xceed.Wpf.AvalonDock.Themes;
using System.Windows.Controls;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
[TemplatePart( Name = PART_AnchorableListBox, Type = typeof( ListBox ) )]
[TemplatePart( Name = PART_DocumentListBox, Type = typeof( ListBox ) )]
public class NavigatorWindow : Window public class NavigatorWindow : Window
{ {
#region Members
private const string PART_AnchorableListBox = "PART_AnchorableListBox";
private const string PART_DocumentListBox = "PART_DocumentListBox";
private ResourceDictionary currentThemeResourceDictionary; // = null private ResourceDictionary currentThemeResourceDictionary; // = null
private DockingManager _manager;
private bool _isSelectingDocument;
private ListBox _anchorableListBox;
private ListBox _documentListBox;
private bool _internalSetSelectedDocument = false;
private bool _internalSetSelectedAnchorable = false;
#endregion
#region Constructors
static NavigatorWindow() static NavigatorWindow()
{ {
@ -33,124 +51,47 @@ namespace Xceed.Wpf.AvalonDock.Controls
ShowInTaskbarProperty.OverrideMetadata( typeof( NavigatorWindow ), new FrameworkPropertyMetadata( false ) ); ShowInTaskbarProperty.OverrideMetadata( typeof( NavigatorWindow ), new FrameworkPropertyMetadata( false ) );
} }
DockingManager _manager;
internal NavigatorWindow( DockingManager manager ) internal NavigatorWindow( DockingManager manager )
{ {
_manager = manager; _manager = manager;
_internalSetSelectedDocument = true; _internalSetSelectedDocument = true;
SetAnchorables( _manager.Layout.Descendents().OfType<LayoutAnchorable>().Where( a => a.IsVisible ).Select( d => ( LayoutAnchorableItem )_manager.GetLayoutItemFromModel( d ) ).ToArray() ); this.SetAnchorables( _manager.Layout.Descendents().OfType<LayoutAnchorable>().Where( a => a.IsVisible ).Select( d => ( LayoutAnchorableItem )_manager.GetLayoutItemFromModel( d ) ).ToArray() );
SetDocuments( _manager.Layout.Descendents().OfType<LayoutDocument>().OrderByDescending( d => d.LastActivationTimeStamp.GetValueOrDefault() ).Select( d => ( LayoutDocumentItem )_manager.GetLayoutItemFromModel( d ) ).ToArray() ); this.SetDocuments( _manager.Layout.Descendents().OfType<LayoutDocument>().OrderByDescending( d => d.LastActivationTimeStamp.GetValueOrDefault() ).Select( d => ( LayoutDocumentItem )_manager.GetLayoutItemFromModel( d ) ).ToArray() );
_internalSetSelectedDocument = false; _internalSetSelectedDocument = false;
if( Documents.Length > 1 ) if( this.Documents.Length > 1 )
InternalSetSelectedDocument( Documents[ 1 ] );
this.DataContext = this;
this.Loaded += new RoutedEventHandler( OnLoaded );
this.Unloaded += new RoutedEventHandler( OnUnloaded );
UpdateThemeResources();
}
internal void UpdateThemeResources( Theme oldTheme = null )
{
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
if( currentThemeResourceDictionary != null )
{
Resources.MergedDictionaries.Remove( currentThemeResourceDictionary );
currentThemeResourceDictionary = null;
}
}
else
{
var resourceDictionaryToRemove =
Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() );
if( resourceDictionaryToRemove != null )
Resources.MergedDictionaries.Remove(
resourceDictionaryToRemove );
}
}
if( _manager.Theme != null )
{
if( _manager.Theme is DictionaryTheme )
{ {
currentThemeResourceDictionary = ( ( DictionaryTheme )_manager.Theme ).ThemeResourceDictionary; this.InternalSetSelectedDocument( this.Documents[ 1 ] );
Resources.MergedDictionaries.Add( currentThemeResourceDictionary ); _isSelectingDocument = true;
} }
else else if( this.Anchorables.Count() > 1 )
{ {
Resources.MergedDictionaries.Add( new ResourceDictionary() { Source = _manager.Theme.GetResourceUri() } ); this.InternalSetSelectedAnchorable( this.Anchorables.ToArray()[ 1 ] );
} _isSelectingDocument = false;
} }
}
void OnLoaded( object sender, RoutedEventArgs e ) this.DataContext = this;
{
this.Loaded -= new RoutedEventHandler( OnLoaded );
this.Focus();
//this.SetParentToMainWindowOf(_manager);
WindowStartupLocation = WindowStartupLocation.CenterOwner;
}
void OnUnloaded( object sender, RoutedEventArgs e ) this.Loaded += new RoutedEventHandler( OnLoaded );
{ this.Unloaded += new RoutedEventHandler( OnUnloaded );
this.Unloaded -= new RoutedEventHandler( OnUnloaded );
//_hwndSrc.RemoveHook(_hwndSrcHook); this.UpdateThemeResources();
//_hwndSrc.Dispose();
//_hwndSrc = null;
} }
//protected virtual IntPtr FilterMessage( #endregion
// IntPtr hwnd,
// int msg,
// IntPtr wParam,
// IntPtr lParam,
// ref bool handled
// )
//{
// handled = false;
// switch (msg)
// {
// case Win32Helper.WM_ACTIVATE:
// if (((int)wParam & 0xFFFF) == Win32Helper.WA_INACTIVE)
// {
// if (lParam == new WindowInteropHelper(this.Owner).Handle)
// {
// Win32Helper.SetActiveWindow(_hwndSrc.Handle);
// handled = true;
// }
// }
// break;
// }
// return IntPtr.Zero;
//}
#region Properties
#region Documents #region Documents
/// <summary> /// <summary>
/// Documents Read-Only Dependency Property /// Documents Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey DocumentsPropertyKey private static readonly DependencyPropertyKey DocumentsPropertyKey = DependencyProperty.RegisterReadOnly( "Documents", typeof( IEnumerable<LayoutDocumentItem> ), typeof( NavigatorWindow ),
= DependencyProperty.RegisterReadOnly( "Documents", typeof( IEnumerable<LayoutDocumentItem> ), typeof( NavigatorWindow ),
new FrameworkPropertyMetadata( null ) ); new FrameworkPropertyMetadata( null ) );
public static readonly DependencyProperty DocumentsProperty public static readonly DependencyProperty DocumentsProperty = DocumentsPropertyKey.DependencyProperty;
= DocumentsPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the Documents property. This dependency property /// Gets the Documents property. This dependency property
@ -164,16 +105,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
/// <summary>
/// Provides a secure method for setting the Documents property.
/// This dependency property indicates the list of documents.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetDocuments( LayoutDocumentItem[] value )
{
SetValue( DocumentsPropertyKey, value );
}
#endregion #endregion
#region Anchorables #region Anchorables
@ -181,12 +112,10 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// Anchorables Read-Only Dependency Property /// Anchorables Read-Only Dependency Property
/// </summary> /// </summary>
private static readonly DependencyPropertyKey AnchorablesPropertyKey private static readonly DependencyPropertyKey AnchorablesPropertyKey = DependencyProperty.RegisterReadOnly( "Anchorables", typeof( IEnumerable<LayoutAnchorableItem> ), typeof( NavigatorWindow ),
= DependencyProperty.RegisterReadOnly( "Anchorables", typeof( IEnumerable<LayoutAnchorableItem> ), typeof( NavigatorWindow ),
new FrameworkPropertyMetadata( ( IEnumerable<LayoutAnchorableItem> )null ) ); new FrameworkPropertyMetadata( ( IEnumerable<LayoutAnchorableItem> )null ) );
public static readonly DependencyProperty AnchorablesProperty public static readonly DependencyProperty AnchorablesProperty = AnchorablesPropertyKey.DependencyProperty;
= AnchorablesPropertyKey.DependencyProperty;
/// <summary> /// <summary>
/// Gets the Anchorables property. This dependency property /// Gets the Anchorables property. This dependency property
@ -200,16 +129,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
} }
/// <summary>
/// Provides a secure method for setting the Anchorables property.
/// This dependency property indicates the list of anchorables.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetAnchorables( IEnumerable<LayoutAnchorableItem> value )
{
SetValue( AnchorablesPropertyKey, value );
}
#endregion #endregion
#region SelectedDocument #region SelectedDocument
@ -217,10 +136,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// SelectedDocument Dependency Property /// SelectedDocument Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty SelectedDocumentProperty = public static readonly DependencyProperty SelectedDocumentProperty = DependencyProperty.Register( "SelectedDocument", typeof( LayoutDocumentItem ), typeof( NavigatorWindow ),
DependencyProperty.Register( "SelectedDocument", typeof( LayoutDocumentItem ), typeof( NavigatorWindow ), new FrameworkPropertyMetadata( ( LayoutDocumentItem )null, new PropertyChangedCallback( OnSelectedDocumentChanged ) ) );
new FrameworkPropertyMetadata( ( LayoutDocumentItem )null,
new PropertyChangedCallback( OnSelectedDocumentChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the SelectedDocument property. This dependency property /// Gets or sets the SelectedDocument property. This dependency property
@ -254,21 +171,12 @@ namespace Xceed.Wpf.AvalonDock.Controls
if( _internalSetSelectedDocument ) if( _internalSetSelectedDocument )
return; return;
if( SelectedDocument != null && if( this.SelectedDocument != null &&
SelectedDocument.ActivateCommand.CanExecute( null ) ) this.SelectedDocument.ActivateCommand.CanExecute( null ) )
{ {
SelectedDocument.ActivateCommand.Execute( null ); this.Hide();
Hide(); this.SelectedDocument.ActivateCommand.Execute( null );
} }
}
bool _internalSetSelectedDocument = false;
void InternalSetSelectedDocument( LayoutDocumentItem documentToSelect )
{
_internalSetSelectedDocument = true;
SelectedDocument = documentToSelect;
_internalSetSelectedDocument = false;
} }
#endregion #endregion
@ -278,10 +186,8 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// <summary> /// <summary>
/// SelectedAnchorable Dependency Property /// SelectedAnchorable Dependency Property
/// </summary> /// </summary>
public static readonly DependencyProperty SelectedAnchorableProperty = public static readonly DependencyProperty SelectedAnchorableProperty = DependencyProperty.Register( "SelectedAnchorable", typeof( LayoutAnchorableItem ), typeof( NavigatorWindow ),
DependencyProperty.Register( "SelectedAnchorable", typeof( LayoutAnchorableItem ), typeof( NavigatorWindow ), new FrameworkPropertyMetadata( ( LayoutAnchorableItem )null, new PropertyChangedCallback( OnSelectedAnchorableChanged ) ) );
new FrameworkPropertyMetadata( ( LayoutAnchorableItem )null,
new PropertyChangedCallback( OnSelectedAnchorableChanged ) ) );
/// <summary> /// <summary>
/// Gets or sets the SelectedAnchorable property. This dependency property /// Gets or sets the SelectedAnchorable property. This dependency property
@ -312,45 +218,107 @@ namespace Xceed.Wpf.AvalonDock.Controls
/// </summary> /// </summary>
protected virtual void OnSelectedAnchorableChanged( DependencyPropertyChangedEventArgs e ) protected virtual void OnSelectedAnchorableChanged( DependencyPropertyChangedEventArgs e )
{ {
if( _internalSetSelectedAnchorable )
return;
var selectedAnchorable = e.NewValue as LayoutAnchorableItem; var selectedAnchorable = e.NewValue as LayoutAnchorableItem;
if( SelectedAnchorable != null && if( this.SelectedAnchorable != null &&
SelectedAnchorable.ActivateCommand.CanExecute( null ) ) this.SelectedAnchorable.ActivateCommand.CanExecute( null ) )
{ {
SelectedAnchorable.ActivateCommand.Execute( null ); this.Close();
Close(); this.SelectedAnchorable.ActivateCommand.Execute( null );
} }
} }
#endregion #endregion
#endregion
internal void SelectNextDocument() #region Overrides
{
if( SelectedDocument != null )
{
int docIndex = Documents.IndexOf<LayoutDocumentItem>( SelectedDocument );
docIndex++;
if( docIndex == Documents.Length )
docIndex = 0;
InternalSetSelectedDocument( Documents[ docIndex ] );
}
}
protected override void OnKeyDown( System.Windows.Input.KeyEventArgs e ) public override void OnApplyTemplate()
{ {
base.OnKeyDown( e ); base.OnApplyTemplate();
_anchorableListBox = this.GetTemplateChild( PART_AnchorableListBox ) as ListBox;
_documentListBox = this.GetTemplateChild( PART_DocumentListBox ) as ListBox;
} }
protected override void OnPreviewKeyDown( System.Windows.Input.KeyEventArgs e ) protected override void OnPreviewKeyDown( System.Windows.Input.KeyEventArgs e )
{ {
bool shouldHandle = false;
// Press Tab to switch Selected LayoutContent.
if( e.Key == System.Windows.Input.Key.Tab) if( e.Key == System.Windows.Input.Key.Tab)
{ {
SelectNextDocument(); // Selecting LayoutDocuments
e.Handled = true; if( _isSelectingDocument )
{
if( this.SelectedDocument != null )
{
// Jump to next LayoutDocument
var docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument );
if( docIndex < (this.Documents.Length - 1) )
{
this.SelectNextDocument();
shouldHandle = true;
}
// Jump to first LayoutAnchorable
else if( this.Anchorables.Count() > 0 )
{
_isSelectingDocument = false;
this.InternalSetSelectedDocument( null );
this.InternalSetSelectedAnchorable( this.Anchorables.First() );
shouldHandle = true;
}
}
// There is no SelectedDocument, select the first one.
else
{
if( this.Documents.Length > 0 )
{
this.InternalSetSelectedDocument( this.Documents[ 0 ] );
shouldHandle = true;
}
}
}
// Selecting LayoutAnchorables
else
{
if( this.SelectedAnchorable != null )
{
// Jump to next LayoutAnchorable
var anchorableIndex = this.Anchorables.ToArray().IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable );
if( anchorableIndex < (this.Anchorables.Count() - 1) )
{
this.SelectNextAnchorable();
shouldHandle = true;
}
// Jump to first LayoutDocument
else if( this.Documents.Length > 0 )
{
_isSelectingDocument = true;
this.InternalSetSelectedAnchorable( null );
this.InternalSetSelectedDocument( this.Documents[ 0 ] );
shouldHandle = true;
}
}
// There is no SelectedAnchorable, select the first one.
else
{
if( this.Anchorables.Count() > 0 )
{
this.InternalSetSelectedAnchorable( this.Anchorables.ToArray()[ 0 ] );
shouldHandle = true;
}
}
}
} }
if( shouldHandle )
{
e.Handled = true;
}
base.OnPreviewKeyDown( e ); base.OnPreviewKeyDown( e );
} }
@ -358,22 +326,166 @@ namespace Xceed.Wpf.AvalonDock.Controls
{ {
if( e.Key != System.Windows.Input.Key.Tab ) if( e.Key != System.Windows.Input.Key.Tab )
{ {
if( SelectedAnchorable != null && this.Close();
SelectedAnchorable.ActivateCommand.CanExecute( null ) )
SelectedAnchorable.ActivateCommand.Execute( null );
if( SelectedAnchorable == null && if( this.SelectedDocument != null &&
SelectedDocument != null && this.SelectedDocument.ActivateCommand.CanExecute( null ) )
SelectedDocument.ActivateCommand.CanExecute( null ) ) {
SelectedDocument.ActivateCommand.Execute( null ); this.SelectedDocument.ActivateCommand.Execute( null );
Close();
e.Handled = true;
} }
if( this.SelectedDocument == null &&
this.SelectedAnchorable != null &&
this.SelectedAnchorable.ActivateCommand.CanExecute( null ) )
{
this.SelectedAnchorable.ActivateCommand.Execute( null );
}
e.Handled = true;
}
base.OnPreviewKeyUp( e ); base.OnPreviewKeyUp( e );
} }
#endregion
#region Internal Methods
/// <summary>
/// Provides a secure method for setting the Anchorables property.
/// This dependency property indicates the list of anchorables.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetAnchorables( IEnumerable<LayoutAnchorableItem> value )
{
this.SetValue( AnchorablesPropertyKey, value );
}
/// <summary>
/// Provides a secure method for setting the Documents property.
/// This dependency property indicates the list of documents.
/// </summary>
/// <param name="value">The new value for the property.</param>
protected void SetDocuments( LayoutDocumentItem[] value )
{
this.SetValue( DocumentsPropertyKey, value );
}
internal void UpdateThemeResources( Theme oldTheme = null )
{
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
if( currentThemeResourceDictionary != null )
{
this.Resources.MergedDictionaries.Remove( currentThemeResourceDictionary );
currentThemeResourceDictionary = null;
}
}
else
{
var resourceDictionaryToRemove = this.Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() );
if( resourceDictionaryToRemove != null )
{
this.Resources.MergedDictionaries.Remove( resourceDictionaryToRemove );
}
}
}
if( _manager.Theme != null )
{
if( _manager.Theme is DictionaryTheme )
{
currentThemeResourceDictionary = ( ( DictionaryTheme )_manager.Theme ).ThemeResourceDictionary;
this.Resources.MergedDictionaries.Add( currentThemeResourceDictionary );
}
else
{
this.Resources.MergedDictionaries.Add( new ResourceDictionary() { Source = _manager.Theme.GetResourceUri() } );
}
}
}
internal void SelectNextDocument()
{
if( this.SelectedDocument != null )
{
int docIndex = this.Documents.IndexOf<LayoutDocumentItem>( this.SelectedDocument );
docIndex++;
if( docIndex == this.Documents.Length )
{
docIndex = 0;
}
this.InternalSetSelectedDocument( this.Documents[ docIndex ] );
}
}
internal void SelectNextAnchorable()
{
if( this.SelectedAnchorable != null )
{
var anchorablesArray = this.Anchorables.ToArray();
int anchorableIndex = anchorablesArray.IndexOf<LayoutAnchorableItem>( this.SelectedAnchorable );
anchorableIndex++;
if( anchorableIndex == this.Anchorables.Count() )
{
anchorableIndex = 0;
}
this.InternalSetSelectedAnchorable( anchorablesArray[ anchorableIndex ] );
}
}
#endregion
#region Private Methods
private void InternalSetSelectedAnchorable( LayoutAnchorableItem anchorableToSelect )
{
_internalSetSelectedAnchorable = true;
this.SelectedAnchorable = anchorableToSelect;
_internalSetSelectedAnchorable = false;
if( _anchorableListBox != null )
{
_anchorableListBox.Focus();
}
}
private void InternalSetSelectedDocument( LayoutDocumentItem documentToSelect )
{
_internalSetSelectedDocument = true;
this.SelectedDocument = documentToSelect;
_internalSetSelectedDocument = false;
if( ( _documentListBox != null ) && ( documentToSelect != null ) )
{
_documentListBox.Focus();
}
}
private void OnLoaded( object sender, RoutedEventArgs e )
{
this.Loaded -= new RoutedEventHandler( OnLoaded );
if( ( _documentListBox != null ) && (this.SelectedDocument != null) )
{
_documentListBox.Focus();
}
else if( ( _anchorableListBox != null ) && (this.SelectedAnchorable != null) )
{
_anchorableListBox.Focus();
}
WindowStartupLocation = WindowStartupLocation.CenterOwner;
}
private void OnUnloaded( object sender, RoutedEventArgs e )
{
this.Unloaded -= new RoutedEventHandler( OnUnloaded );
}
#endregion
} }
} }

36
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayArea.cs

@ -14,41 +14,47 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows; using System.Windows;
using Xceed.Wpf.AvalonDock.Layout;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public abstract class OverlayArea : IOverlayWindowArea public abstract class OverlayArea : IOverlayWindowArea
{ {
#region Members
private IOverlayWindow _overlayWindow;
private Rect? _screenDetectionArea;
#endregion
#region Constructors
internal OverlayArea( IOverlayWindow overlayWindow ) internal OverlayArea( IOverlayWindow overlayWindow )
{ {
_overlayWindow = overlayWindow; _overlayWindow = overlayWindow;
} }
IOverlayWindow _overlayWindow; #endregion
Rect? _screenDetectionArea; #region Internal Methods
Rect IOverlayWindowArea.ScreenDetectionArea
{
get
{
return _screenDetectionArea.Value;
}
}
protected void SetScreenDetectionArea( Rect rect ) protected void SetScreenDetectionArea( Rect rect )
{ {
_screenDetectionArea = rect; _screenDetectionArea = rect;
} }
#endregion
#region IOverlayWindowArea
Rect IOverlayWindowArea.ScreenDetectionArea
{
get
{
return _screenDetectionArea.Value;
}
}
#endregion
} }
} }

446
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindow.cs

@ -14,23 +14,63 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes; using System.Windows.Shapes;
using Xceed.Wpf.AvalonDock.Layout; using Xceed.Wpf.AvalonDock.Layout;
using System.Diagnostics;
using Xceed.Wpf.AvalonDock.Themes; using Xceed.Wpf.AvalonDock.Themes;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class OverlayWindow : Window, IOverlayWindow public class OverlayWindow : Window, IOverlayWindow
{ {
#region Members
private ResourceDictionary currentThemeResourceDictionary; // = null private ResourceDictionary currentThemeResourceDictionary; // = null
private Canvas _mainCanvasPanel;
private Grid _gridDockingManagerDropTargets;
private Grid _gridAnchorablePaneDropTargets;
private Grid _gridDocumentPaneDropTargets;
private Grid _gridDocumentPaneFullDropTargets;
private FrameworkElement _dockingManagerDropTargetBottom;
private FrameworkElement _dockingManagerDropTargetTop;
private FrameworkElement _dockingManagerDropTargetLeft;
private FrameworkElement _dockingManagerDropTargetRight;
private FrameworkElement _anchorablePaneDropTargetBottom;
private FrameworkElement _anchorablePaneDropTargetTop;
private FrameworkElement _anchorablePaneDropTargetLeft;
private FrameworkElement _anchorablePaneDropTargetRight;
private FrameworkElement _anchorablePaneDropTargetInto;
private FrameworkElement _documentPaneDropTargetBottom;
private FrameworkElement _documentPaneDropTargetTop;
private FrameworkElement _documentPaneDropTargetLeft;
private FrameworkElement _documentPaneDropTargetRight;
private FrameworkElement _documentPaneDropTargetInto;
private FrameworkElement _documentPaneDropTargetBottomAsAnchorablePane;
private FrameworkElement _documentPaneDropTargetTopAsAnchorablePane;
private FrameworkElement _documentPaneDropTargetLeftAsAnchorablePane;
private FrameworkElement _documentPaneDropTargetRightAsAnchorablePane;
private FrameworkElement _documentPaneFullDropTargetBottom;
private FrameworkElement _documentPaneFullDropTargetTop;
private FrameworkElement _documentPaneFullDropTargetLeft;
private FrameworkElement _documentPaneFullDropTargetRight;
private FrameworkElement _documentPaneFullDropTargetInto;
private Path _previewBox;
private IOverlayWindowHost _host;
private LayoutFloatingWindowControl _floatingWindow = null;
private List<IDropArea> _visibleAreas = new List<IDropArea>();
#endregion
#region Constructors
static OverlayWindow() static OverlayWindow()
{ {
@ -43,86 +83,15 @@ namespace Xceed.Wpf.AvalonDock.Controls
OverlayWindow.VisibilityProperty.OverrideMetadata( typeof( OverlayWindow ), new FrameworkPropertyMetadata( Visibility.Hidden ) ); OverlayWindow.VisibilityProperty.OverrideMetadata( typeof( OverlayWindow ), new FrameworkPropertyMetadata( Visibility.Hidden ) );
} }
internal OverlayWindow( IOverlayWindowHost host ) internal OverlayWindow( IOverlayWindowHost host )
{ {
_host = host; _host = host;
UpdateThemeResources(); UpdateThemeResources();
} }
#endregion
internal void UpdateThemeResources(Theme oldTheme = null) #region Overrides
{
if (oldTheme != null)
{
if( oldTheme is DictionaryTheme )
{
if( currentThemeResourceDictionary != null )
{
Resources.MergedDictionaries.Remove( currentThemeResourceDictionary );
currentThemeResourceDictionary = null;
}
}
else
{
var resourceDictionaryToRemove =
Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() );
if( resourceDictionaryToRemove != null )
Resources.MergedDictionaries.Remove(
resourceDictionaryToRemove );
}
}
if (_host.Manager.Theme != null)
{
if( _host.Manager.Theme is DictionaryTheme )
{
currentThemeResourceDictionary = ( ( DictionaryTheme )_host.Manager.Theme ).ThemeResourceDictionary;
Resources.MergedDictionaries.Add( currentThemeResourceDictionary );
}
else
{
Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = _host.Manager.Theme.GetResourceUri() });
}
}
}
Canvas _mainCanvasPanel;
Grid _gridDockingManagerDropTargets;
Grid _gridAnchorablePaneDropTargets;
Grid _gridDocumentPaneDropTargets;
Grid _gridDocumentPaneFullDropTargets;
FrameworkElement _dockingManagerDropTargetBottom;
FrameworkElement _dockingManagerDropTargetTop;
FrameworkElement _dockingManagerDropTargetLeft;
FrameworkElement _dockingManagerDropTargetRight;
FrameworkElement _anchorablePaneDropTargetBottom;
FrameworkElement _anchorablePaneDropTargetTop;
FrameworkElement _anchorablePaneDropTargetLeft;
FrameworkElement _anchorablePaneDropTargetRight;
FrameworkElement _anchorablePaneDropTargetInto;
FrameworkElement _documentPaneDropTargetBottom;
FrameworkElement _documentPaneDropTargetTop;
FrameworkElement _documentPaneDropTargetLeft;
FrameworkElement _documentPaneDropTargetRight;
FrameworkElement _documentPaneDropTargetInto;
FrameworkElement _documentPaneDropTargetBottomAsAnchorablePane;
FrameworkElement _documentPaneDropTargetTopAsAnchorablePane;
FrameworkElement _documentPaneDropTargetLeftAsAnchorablePane;
FrameworkElement _documentPaneDropTargetRightAsAnchorablePane;
FrameworkElement _documentPaneFullDropTargetBottom;
FrameworkElement _documentPaneFullDropTargetTop;
FrameworkElement _documentPaneFullDropTargetLeft;
FrameworkElement _documentPaneFullDropTargetRight;
FrameworkElement _documentPaneFullDropTargetInto;
Path _previewBox;
public override void OnApplyTemplate() public override void OnApplyTemplate()
{ {
@ -171,6 +140,50 @@ namespace Xceed.Wpf.AvalonDock.Controls
_previewBox = GetTemplateChild( "PART_PreviewBox" ) as Path; _previewBox = GetTemplateChild( "PART_PreviewBox" ) as Path;
} }
protected override void OnClosing( System.ComponentModel.CancelEventArgs e )
{
base.OnClosing( e );
}
#endregion
#region Internal Methods
internal void UpdateThemeResources( Theme oldTheme = null )
{
if( oldTheme != null )
{
if( oldTheme is DictionaryTheme )
{
if( currentThemeResourceDictionary != null )
{
Resources.MergedDictionaries.Remove( currentThemeResourceDictionary );
currentThemeResourceDictionary = null;
}
}
else
{
var resourceDictionaryToRemove =
Resources.MergedDictionaries.FirstOrDefault( r => r.Source == oldTheme.GetResourceUri() );
if( resourceDictionaryToRemove != null )
Resources.MergedDictionaries.Remove(
resourceDictionaryToRemove );
}
}
if( _host.Manager.Theme != null )
{
if( _host.Manager.Theme is DictionaryTheme )
{
currentThemeResourceDictionary = ( ( DictionaryTheme )_host.Manager.Theme ).ThemeResourceDictionary;
Resources.MergedDictionaries.Add( currentThemeResourceDictionary );
}
else
{
Resources.MergedDictionaries.Add( new ResourceDictionary() { Source = _host.Manager.Theme.GetResourceUri() } );
}
}
}
internal void EnableDropTargets() internal void EnableDropTargets()
{ {
@ -185,7 +198,143 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
IOverlayWindowHost _host; #endregion
#region Private Methods
/// <summary>
/// This method controls the DropTargetInto button of the overlay window.
/// It checks that only 1 of the defined ContentLayouts can be present on the LayoutDocumentPane or LayoutAnchorablePane.
/// The combination between the ContentLayout Title and the ContentId is the search key, and has to be unique.
/// If a floating window is dropped on a LayoutDocumentPane or LayoutAnchorablePane, it checks if one of the containing LayoutContents
/// is already present on the LayoutDocumentPane or LayoutAnchorablePane. If so, then it will disable the DropTargetInto button.
/// </summary>
/// <param name="positionableElement">The given LayoutDocumentPane or LayoutAnchorablePane</param>
private void SetDropTargetIntoVisibility( ILayoutPositionableElement positionableElement )
{
if( positionableElement is LayoutAnchorablePane )
{
_anchorablePaneDropTargetInto.Visibility = Visibility.Visible;
}
else if( positionableElement is LayoutDocumentPane )
{
_documentPaneDropTargetInto.Visibility = Visibility.Visible;
}
if( positionableElement == null || _floatingWindow.Model == null || positionableElement.AllowDuplicateContent )
{
return;
}
// Find all content layouts in the anchorable pane (object to drop on)
var contentLayoutsOnPositionableElementPane = GetAllLayoutContents( positionableElement );
// Find all content layouts in the floating window (object to drop)
var contentLayoutsOnFloatingWindow = GetAllLayoutContents( _floatingWindow.Model );
// If any of the content layouts is present in the drop area, then disable the DropTargetInto button.
foreach( var content in contentLayoutsOnFloatingWindow )
{
if( !contentLayoutsOnPositionableElementPane.Any( item =>
item.Title == content.Title &&
item.ContentId == content.ContentId ) )
{
continue;
}
if( positionableElement is LayoutAnchorablePane )
{
_anchorablePaneDropTargetInto.Visibility = Visibility.Hidden;
}
else if( positionableElement is LayoutDocumentPane )
{
_documentPaneDropTargetInto.Visibility = Visibility.Hidden;
}
break;
}
}
/// <summary>
/// Find any LayoutDocument or LayoutAnchorable from a given source (e.g. LayoutDocumentPane, LayoutAnchorableFloatingWindow, etc.)
/// </summary>
/// <param name="source">The given source to search in</param>
/// <returns>A list of all LayoutContent's</returns>
private List<LayoutContent> GetAllLayoutContents( object source )
{
var result = new List<LayoutContent>();
var documentFloatingWindow = source as LayoutDocumentFloatingWindow;
if( documentFloatingWindow != null )
{
foreach( var layoutElement in documentFloatingWindow.Children )
{
result.AddRange( GetAllLayoutContents( layoutElement ) );
}
}
var anchorableFloatingWindow = source as LayoutAnchorableFloatingWindow;
if( anchorableFloatingWindow != null )
{
foreach( var layoutElement in anchorableFloatingWindow.Children )
{
result.AddRange( GetAllLayoutContents( layoutElement ) );
}
}
var documentPaneGroup = source as LayoutDocumentPaneGroup;
if( documentPaneGroup != null )
{
foreach( var layoutDocumentPane in documentPaneGroup.Children )
{
result.AddRange( GetAllLayoutContents( layoutDocumentPane ) );
}
}
var anchorablePaneGroup = source as LayoutAnchorablePaneGroup;
if( anchorablePaneGroup != null )
{
foreach( var layoutDocumentPane in anchorablePaneGroup.Children )
{
result.AddRange( GetAllLayoutContents( layoutDocumentPane ) );
}
}
var documentPane = source as LayoutDocumentPane;
if( documentPane != null )
{
foreach( var layoutContent in documentPane.Children )
{
result.Add( layoutContent );
}
}
var anchorablePane = source as LayoutAnchorablePane;
if( anchorablePane != null )
{
foreach( var layoutContent in anchorablePane.Children )
{
result.Add( layoutContent );
}
}
var document = source as LayoutDocument;
if( document != null )
{
result.Add( document );
}
var anchorable = source as LayoutAnchorable;
if( anchorable != null )
{
result.Add( anchorable );
}
return result;
}
#endregion
#region IOverlayWindow
IEnumerable<IDropTarget> IOverlayWindow.GetTargets() IEnumerable<IDropTarget> IOverlayWindow.GetTargets()
{ {
@ -330,7 +479,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
yield break; yield break;
} }
LayoutFloatingWindowControl _floatingWindow = null;
void IOverlayWindow.DragEnter( LayoutFloatingWindowControl floatingWindow ) void IOverlayWindow.DragEnter( LayoutFloatingWindowControl floatingWindow )
{ {
_floatingWindow = floatingWindow; _floatingWindow = floatingWindow;
@ -343,144 +491,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
_floatingWindow = null; _floatingWindow = null;
} }
/// <summary>
/// This method controls the DropTargetInto button of the overlay window.
/// It checks that only 1 of the defined ContentLayouts can be present on the LayoutDocumentPane or LayoutAnchorablePane.
/// The combination between the ContentLayout Title and the ContentId is the search key, and has to be unique.
/// If a floating window is dropped on a LayoutDocumentPane or LayoutAnchorablePane, it checks if one of the containing LayoutContents
/// is already present on the LayoutDocumentPane or LayoutAnchorablePane. If so, then it will disable the DropTargetInto button.
/// </summary>
/// <param name="positionableElement">The given LayoutDocumentPane or LayoutAnchorablePane</param>
private void SetDropTargetIntoVisibility( ILayoutPositionableElement positionableElement )
{
if( positionableElement is LayoutAnchorablePane )
{
_anchorablePaneDropTargetInto.Visibility = Visibility.Visible;
}
else if( positionableElement is LayoutDocumentPane )
{
_documentPaneDropTargetInto.Visibility = Visibility.Visible;
}
if( positionableElement == null || _floatingWindow.Model == null || positionableElement.AllowDuplicateContent )
{
return;
}
// Find all content layouts in the anchorable pane (object to drop on)
var contentLayoutsOnPositionableElementPane = GetAllLayoutContents( positionableElement );
// Find all content layouts in the floating window (object to drop)
var contentLayoutsOnFloatingWindow = GetAllLayoutContents( _floatingWindow.Model );
// If any of the content layouts is present in the drop area, then disable the DropTargetInto button.
foreach( var content in contentLayoutsOnFloatingWindow )
{
if( !contentLayoutsOnPositionableElementPane.Any( item =>
item.Title == content.Title &&
item.ContentId == content.ContentId ) )
{
continue;
}
if( positionableElement is LayoutAnchorablePane )
{
_anchorablePaneDropTargetInto.Visibility = Visibility.Hidden;
}
else if( positionableElement is LayoutDocumentPane )
{
_documentPaneDropTargetInto.Visibility = Visibility.Hidden;
}
break;
}
}
/// <summary>
/// Find any LayoutDocument or LayoutAnchorable from a given source (e.g. LayoutDocumentPane, LayoutAnchorableFloatingWindow, etc.)
/// </summary>
/// <param name="source">The given source to search in</param>
/// <returns>A list of all LayoutContent's</returns>
private List<LayoutContent> GetAllLayoutContents( object source )
{
var result = new List<LayoutContent>();
var documentFloatingWindow = source as LayoutDocumentFloatingWindow;
if( documentFloatingWindow != null )
{
foreach( var layoutElement in documentFloatingWindow.Children )
{
result.AddRange( GetAllLayoutContents( layoutElement ) );
}
}
var anchorableFloatingWindow = source as LayoutAnchorableFloatingWindow;
if( anchorableFloatingWindow != null )
{
foreach( var layoutElement in anchorableFloatingWindow.Children )
{
result.AddRange( GetAllLayoutContents( layoutElement ) );
}
}
var documentPaneGroup = source as LayoutDocumentPaneGroup;
if( documentPaneGroup != null )
{
foreach( var layoutDocumentPane in documentPaneGroup.Children )
{
result.AddRange( GetAllLayoutContents( layoutDocumentPane ) );
}
}
var anchorablePaneGroup = source as LayoutAnchorablePaneGroup;
if( anchorablePaneGroup != null )
{
foreach( var layoutDocumentPane in anchorablePaneGroup.Children )
{
result.AddRange( GetAllLayoutContents( layoutDocumentPane ) );
}
}
var documentPane = source as LayoutDocumentPane;
if( documentPane != null )
{
foreach( var layoutContent in documentPane.Children )
{
result.Add( layoutContent );
}
}
var anchorablePane = source as LayoutAnchorablePane;
if( anchorablePane != null )
{
foreach( var layoutContent in anchorablePane.Children )
{
result.Add( layoutContent );
}
}
var document = source as LayoutDocument;
if( document != null )
{
result.Add( document );
}
var anchorable = source as LayoutAnchorable;
if( anchorable != null )
{
result.Add( anchorable );
}
return result;
}
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
base.OnClosing(e);
}
List<IDropArea> _visibleAreas = new List<IDropArea>();
void IOverlayWindow.DragEnter( IDropArea area ) void IOverlayWindow.DragEnter( IDropArea area )
{ {
_visibleAreas.Add( area ); _visibleAreas.Add( area );
@ -714,6 +724,6 @@ namespace Xceed.Wpf.AvalonDock.Controls
target.Drop( _floatingWindow.Model as LayoutFloatingWindow ); target.Drop( _floatingWindow.Model as LayoutFloatingWindow );
} }
#endregion
} }
} }

29
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTarget.cs

@ -14,17 +14,22 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows; using System.Windows;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public class OverlayWindowDropTarget : IOverlayWindowDropTarget public class OverlayWindowDropTarget : IOverlayWindowDropTarget
{ {
#region Members
private IOverlayWindowArea _overlayArea;
private Rect _screenDetectionArea;
private OverlayWindowDropTargetType _type;
#endregion
#region Constructors
internal OverlayWindowDropTarget( IOverlayWindowArea overlayArea, OverlayWindowDropTargetType targetType, FrameworkElement element ) internal OverlayWindowDropTarget( IOverlayWindowArea overlayArea, OverlayWindowDropTargetType targetType, FrameworkElement element )
{ {
_overlayArea = overlayArea; _overlayArea = overlayArea;
@ -32,9 +37,11 @@ namespace Xceed.Wpf.AvalonDock.Controls
_screenDetectionArea = new Rect( element.TransformToDeviceDPI( new Point() ), element.TransformActualSizeToAncestor() ); _screenDetectionArea = new Rect( element.TransformToDeviceDPI( new Point() ), element.TransformActualSizeToAncestor() );
} }
IOverlayWindowArea _overlayArea; #endregion
#region IOverlayWindowDropTarget
Rect _screenDetectionArea;
Rect IOverlayWindowDropTarget.ScreenDetectionArea Rect IOverlayWindowDropTarget.ScreenDetectionArea
{ {
get get
@ -44,12 +51,14 @@ namespace Xceed.Wpf.AvalonDock.Controls
} }
OverlayWindowDropTargetType _type;
OverlayWindowDropTargetType IOverlayWindowDropTarget.Type OverlayWindowDropTargetType IOverlayWindowDropTarget.Type
{ {
get { return _type; } get
{
return _type;
}
} }
#endregion
} }
} }

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/OverlayWindowDropTargetType.cs

@ -14,11 +14,6 @@
***********************************************************************************/ ***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
public enum OverlayWindowDropTargetType public enum OverlayWindowDropTargetType

49
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Controls/ReentrantFlag.cs

@ -15,30 +15,30 @@
***********************************************************************************/ ***********************************************************************************/
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xceed.Wpf.AvalonDock.Controls namespace Xceed.Wpf.AvalonDock.Controls
{ {
class ReentrantFlag internal class ReentrantFlag
{ {
public class _ReentrantFlagHandler : IDisposable #region Members
{
ReentrantFlag _owner;
public _ReentrantFlagHandler(ReentrantFlag owner)
{
_owner = owner;
_owner._flag = true;
}
public void Dispose() private bool _flag = false;
#endregion
#region Properties
public bool CanEnter
{ {
_owner._flag = false; get
{
return !_flag;
} }
} }
bool _flag = false; #endregion
#region Public Methods
public _ReentrantFlagHandler Enter() public _ReentrantFlagHandler Enter()
{ {
@ -47,10 +47,25 @@ namespace Xceed.Wpf.AvalonDock.Controls
return new _ReentrantFlagHandler( this ); return new _ReentrantFlagHandler( this );
} }
public bool CanEnter #endregion
#region Internal Classes
public class _ReentrantFlagHandler : IDisposable
{
private ReentrantFlag _owner;
public _ReentrantFlagHandler( ReentrantFlag owner )
{
_owner = owner;
_owner._flag = true;
}
public void Dispose()
{ {
get { return !_flag; } _owner._flag = false;
}
} }
#endregion
} }
} }

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save