Skip to content

Commit

Permalink
Adjusted documentation for PR #174
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Jul 7, 2020
1 parent 15736f1 commit b85b187
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 33 deletions.
8 changes: 5 additions & 3 deletions source/Components/AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,8 @@ public StyleSelector LayoutItemContainerStyleSelector
public static readonly DependencyProperty ShowSystemMenuProperty = DependencyProperty.Register(nameof(ShowSystemMenu), typeof(bool), typeof(DockingManager),
new FrameworkPropertyMetadata(true));

/// <summary>Gets or sets the <see cref="ShowSystemMenu"/> property. This dependency property indicates if floating windows should show the system menu when a custom context menu is not defined.</summary>
/// <summary>Gets/sets whether floating windows should show the system menu when a custom context menu is not defined.</summary>
[Bindable(true), Description("Gets/sets whether floating windows should show the system menu when a custom context menu is not defined."), Category("FloatingWindow")]
public bool ShowSystemMenu
{
get => (bool)GetValue(ShowSystemMenuProperty);
Expand Down Expand Up @@ -1345,9 +1346,10 @@ public bool AllowMixedOrientation
#region AutoWindowSizeWhenOpened

/// <summary>
/// Gets/sets the float window <see cref="LayoutFloatingWindowControl"/> is auto size when dragged out
/// Gets/sets whether the floating window size of a <see cref="LayoutFloatingWindowControl"/> is auto sized when it is dragged out.
/// If true the MinHeight and MinWidth of the content will be used together with the margins to determine the initial size of the floating window.
/// </summary>
[Bindable(true), Description("Gets/sets the floating window is auto size when floated out"), Category("FloatingWindow")]
[Bindable(true), Description("Gets/sets whether the floating window is auto sized when it is dragged out."), Category("FloatingWindow")]
public bool AutoWindowSizeWhenOpened
{
get { return (bool)GetValue(AutoWindowSizeWhenOpenedProperty); }
Expand Down
48 changes: 21 additions & 27 deletions source/TestApp/App.xaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
<!--
************************************************************************
AvalonDock
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://opensource.org/licenses/MS-PL
************************************************************************
************************************************************************
AvalonDock
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at https://opensource.org/licenses/MS-PL
************************************************************************
-->

<Application
x:Class="TestApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnMainWindowClose"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
x:Key="{x:Type LayoutAnchorableFloatingWindowControl}"
BasedOn="{StaticResource {x:Type LayoutAnchorableFloatingWindowControl}}"
TargetType="{x:Type LayoutAnchorableFloatingWindowControl}">
<!--
Set this property to true to auto-size the demo LayoutAnchorable to the size of its containing control
when being dragged into floating mode
-->
<!--<Setter Property="SetWindowSizeWhenOpened" Value="True" />-->
</Style>
</ResourceDictionary>
</Application.Resources>
x:Class="TestApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnMainWindowClose"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
x:Key="{x:Type LayoutAnchorableFloatingWindowControl}"
BasedOn="{StaticResource {x:Type LayoutAnchorableFloatingWindowControl}}"
TargetType="{x:Type LayoutAnchorableFloatingWindowControl}" />
</ResourceDictionary>
</Application.Resources>
</Application>
4 changes: 2 additions & 2 deletions source/TestApp/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ private void OnShowHeader(object sender, RoutedEventArgs e)

/// <summary>
/// Method create a new anchorable window to test whether a floating window will auto-adjust its size to the
/// containing control. See SetWindowSizeWhenOpened property in <seealso cref="LayoutAnchorableFloatingWindow"/>
/// and App.xaml in this demo App for more details.
/// containing control. See <see cref="DockingManager.AutoWindowSizeWhenOpened"/> dependency property.
/// and TestUserControl in this demo App for more details.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Expand Down
3 changes: 2 additions & 1 deletion source/TestApp/TestUserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<TextBlock FontWeight="Bold">This Comtrol demos an Auto-Size FloatingWindow</TextBlock>
<TextBlock TextWrapping="WrapWithOverflow">
This content can initially be sized to the content of a containing user control when dragging
the LayoutAnchorable into floating mode using the SetWindowSizeWhenOpened property (see App.xaml of this demo app).
the LayoutAnchorable into floating mode using the DockingManager's AutoWindowSizeWhenOpened
dependency property.
</TextBlock>
</TextBlock>
</StackPanel>
Expand Down

0 comments on commit b85b187

Please sign in to comment.