chore: Rename InverseStackPanel to ReversibleStackPanel.
This commit is contained in:
1 parent
be9525c04c
commit
75d5cbe4e3
4 files changed
+13
-13
No files matched your search
@@ -420,7 +420,7 @@ public class Growl : Control
|
|||||||
var transitionMode = GetTransitionMode(GrowlPanel);
|
var transitionMode = GetTransitionMode(GrowlPanel);
|
||||||
GrowlPanel.VerticalAlignment = GetPanelVerticalAlignment(transitionMode);
|
GrowlPanel.VerticalAlignment = GetPanelVerticalAlignment(transitionMode);
|
||||||
GrowlPanel.HorizontalAlignment = GetPanelHorizontalAlignment(transitionMode);
|
GrowlPanel.HorizontalAlignment = GetPanelHorizontalAlignment(transitionMode);
|
||||||
GrowlPanel.SetValue(InverseStackPanel.IsInverseEnabledProperty,
|
GrowlPanel.SetValue(ReversibleStackPanel.ReverseOrderProperty,
|
||||||
transitionMode is TransitionMode.Bottom2Top or TransitionMode.Bottom2TopWithFade);
|
transitionMode is TransitionMode.Bottom2Top or TransitionMode.Bottom2TopWithFade);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -442,7 +442,7 @@ public class Growl : Control
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var panel = new InverseStackPanel();
|
var panel = new ReversibleStackPanel();
|
||||||
|
|
||||||
InitGrowlPanel(panel);
|
InitGrowlPanel(panel);
|
||||||
SetIsCreatedAutomatically(panel, true);
|
SetIsCreatedAutomatically(panel, true);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public sealed class GrowlWindow : Window
|
|||||||
AllowsTransparency = true;
|
AllowsTransparency = true;
|
||||||
|
|
||||||
Growl.SetTransitionStoryboard(this, Growl.GetTransitionStoryboard(Application.Current.MainWindow));
|
Growl.SetTransitionStoryboard(this, Growl.GetTransitionStoryboard(Application.Current.MainWindow));
|
||||||
GrowlPanel = new InverseStackPanel();
|
GrowlPanel = new ReversibleStackPanel();
|
||||||
Content = new ScrollViewer
|
Content = new ScrollViewer
|
||||||
{
|
{
|
||||||
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
|
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
|
||||||
@@ -42,7 +42,7 @@ public sealed class GrowlWindow : Window
|
|||||||
};
|
};
|
||||||
|
|
||||||
Growl.SetTransitionMode(this, transitionMode);
|
Growl.SetTransitionMode(this, transitionMode);
|
||||||
GrowlPanel.SetValue(InverseStackPanel.IsInverseEnabledProperty,
|
GrowlPanel.SetValue(ReversibleStackPanel.ReverseOrderProperty,
|
||||||
transitionMode is TransitionMode.Bottom2Top or TransitionMode.Bottom2TopWithFade);
|
transitionMode is TransitionMode.Bottom2Top or TransitionMode.Bottom2TopWithFade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -4,21 +4,21 @@ using HandyControl.Data;
|
|||||||
|
|
||||||
namespace HandyControl.Controls;
|
namespace HandyControl.Controls;
|
||||||
|
|
||||||
public class InverseStackPanel : SimpleStackPanel
|
public class ReversibleStackPanel : SimpleStackPanel
|
||||||
{
|
{
|
||||||
public static readonly DependencyProperty IsInverseEnabledProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ReverseOrderProperty = DependencyProperty.Register(
|
||||||
nameof(IsInversed), typeof(bool), typeof(InverseStackPanel),
|
nameof(ReverseOrder), typeof(bool), typeof(ReversibleStackPanel),
|
||||||
new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsMeasure));
|
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsMeasure));
|
||||||
|
|
||||||
public bool IsInversed
|
public bool ReverseOrder
|
||||||
{
|
{
|
||||||
get => (bool) GetValue(IsInverseEnabledProperty);
|
get => (bool) GetValue(ReverseOrderProperty);
|
||||||
set => SetValue(IsInverseEnabledProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(ReverseOrderProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Size ArrangeOverride(Size arrangeSize)
|
protected override Size ArrangeOverride(Size arrangeSize)
|
||||||
{
|
{
|
||||||
if (!IsInversed)
|
if (!ReverseOrder)
|
||||||
{
|
{
|
||||||
return base.ArrangeOverride(arrangeSize);
|
return base.ArrangeOverride(arrangeSize);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\ClipGrid.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\ClipGrid.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\FlexPanel.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\FlexPanel.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\ElementGroup.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\ElementGroup.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\InverseStackPanel.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\ReversibleStackPanel.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\SimpleStackPanel.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\SimpleStackPanel.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\UniformSpacingPanel.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\UniformSpacingPanel.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\PropertyGrid\Editors\ImagePropertyEditor.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\PropertyGrid\Editors\ImagePropertyEditor.cs" />
|
||||||
|
|||||||
Reference in new issue
Block a user