minor modify
This commit is contained in:
1 parent
2240dbce8c
commit
5206e11aa4
4 files changed
+13
-17
No files matched your search
@@ -238,11 +238,11 @@ namespace HandyControl.Controls
|
||||
|
||||
public UIElement Element { get; }
|
||||
|
||||
public bool HorizontalOffsetFlag { get; set; }
|
||||
private bool HorizontalOffsetFlag { get; set; }
|
||||
|
||||
public bool VerticalOffsetFlag { get; set; }
|
||||
private bool VerticalOffsetFlag { get; set; }
|
||||
|
||||
public Size BoundingSize { get; set; }
|
||||
private Size BoundingSize { get; set; }
|
||||
|
||||
public Size OriginDesiredSize { get; set; }
|
||||
|
||||
@@ -436,9 +436,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
// 判断是否有循环
|
||||
if (!set.Add(node.Element))
|
||||
throw new Exception(
|
||||
"RelativePanel error: Circular dependency detected. Layout could not complete.");
|
||||
if (!set.Add(node.Element)) throw new Exception("RelativePanel error: Circular dependency detected. Layout could not complete.");
|
||||
|
||||
// 没有循环,且有依赖,则继续往下
|
||||
Measure(node.OutgoingNodes, set);
|
||||
|
||||
@@ -95,7 +95,6 @@ namespace HandyControl.Controls
|
||||
if (DefaultValue > 0)
|
||||
{
|
||||
Value = DefaultValue;
|
||||
UpdateItems();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -221,7 +220,6 @@ namespace HandyControl.Controls
|
||||
protected override void OnMouseLeave(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
|
||||
UpdateItems();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Icon" Value="{StaticResource StarGeometry}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource RateRateItemBaseStyle}"/>
|
||||
<Setter Property="Text" Value="{Binding Value,RelativeSource={RelativeSource Self},StringFormat={}{0:0.0}}"/>
|
||||
<Setter Property="Template">
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipSliderThumbHorizontalTop" TargetType="Thumb">
|
||||
<hc:InternalCanvas>
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipSliderThumbHorizontalBottom" TargetType="Thumb">
|
||||
<hc:InternalCanvas>
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipSliderThumbVerticalLeft" TargetType="Thumb">
|
||||
<hc:InternalCanvas Orientation="Vertical">
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipSliderThumbVerticalRight" TargetType="Thumb">
|
||||
<hc:InternalCanvas Orientation="Vertical">
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -710,7 +710,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalTop" TargetType="hc:RangeThumb">
|
||||
<hc:InternalCanvas>
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -741,7 +741,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalBottom" TargetType="hc:RangeThumb">
|
||||
<hc:InternalCanvas>
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -772,7 +772,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipRangeSliderThumbVerticalLeft" TargetType="hc:RangeThumb">
|
||||
<hc:InternalCanvas Orientation="Vertical">
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -803,7 +803,7 @@
|
||||
|
||||
<ControlTemplate x:Key="TipRangeSliderThumbVerticalRight" TargetType="hc:RangeThumb">
|
||||
<hc:InternalCanvas Orientation="Vertical">
|
||||
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||
</hc:InternalCanvas>
|
||||
<ControlTemplate.Triggers>
|
||||
|
||||
Reference in new issue
Block a user