Merge branch 'master' into patch-5
This commit is contained in:
173 files changed
+2196
-1786
No files matched your search
+9
-5
@@ -29,12 +29,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
## 特别声明
|
||||||
|
|
||||||
|
HandyControl 项目已加入 [dotNET China](https://gitee.com/dotnetchina) 组织。<br/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 面向中国
|
## 面向中国
|
||||||
|
|
||||||
### 招聘
|
|
||||||
|
|
||||||
百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com
|
|
||||||
|
|
||||||
### 码云
|
### 码云
|
||||||
|
|
||||||
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)
|
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)
|
||||||
@@ -51,7 +53,7 @@
|
|||||||
|
|
||||||
| | 西江月群 | 定风波群 |
|
| | 西江月群 | 定风波群 |
|
||||||
|-|:-:|:-:|
|
|-|:-:|:-:|
|
||||||
| 群号码 | [](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) | [](//shang.qq.com/wpa/qunwpa?idkey=5c18622a0f6ee07a6f33afa8cdb85b1f72ea50e878271dfcec919c76b55afee7) | 微信群 |
|
| 群号码 | [](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) | [](//shang.qq.com/wpa/qunwpa?idkey=5c18622a0f6ee07a6f33afa8cdb85b1f72ea50e878271dfcec919c76b55afee7) |
|
||||||
| 二维码 |  |  |
|
| 二维码 |  |  |
|
||||||
|
|
||||||
* 为我们购买防脱洗发水 (支付宝扫码)
|
* 为我们购买防脱洗发水 (支付宝扫码)
|
||||||
@@ -85,6 +87,7 @@
|
|||||||
<a href="https://github.com/cuiliang" target="_blank"><img style="border-radius:50%!important" width="64px" alt="cuiliang" src="https://avatars2.githubusercontent.com/u/1972649?s=64&v=4"></a>
|
<a href="https://github.com/cuiliang" target="_blank"><img style="border-radius:50%!important" width="64px" alt="cuiliang" src="https://avatars2.githubusercontent.com/u/1972649?s=64&v=4"></a>
|
||||||
<a href="https://github.com/lwqwag" target="_blank"><img style="border-radius:50%!important" width="64px" alt="lwqwag" src="https://avatars3.githubusercontent.com/u/29883542?s=64&v=4"></a>
|
<a href="https://github.com/lwqwag" target="_blank"><img style="border-radius:50%!important" width="64px" alt="lwqwag" src="https://avatars3.githubusercontent.com/u/29883542?s=64&v=4"></a>
|
||||||
<a href="https://github.com/Epacik" target="_blank"><img style="border-radius:50%!important" width="64px" alt="Epacik" src="https://avatars.githubusercontent.com/u/23077337?s=64&v=4"></a>
|
<a href="https://github.com/Epacik" target="_blank"><img style="border-radius:50%!important" width="64px" alt="Epacik" src="https://avatars.githubusercontent.com/u/23077337?s=64&v=4"></a>
|
||||||
|
<a href="https://github.com/ChoKaPeek" target="_blank"><img style="border-radius:50%!important" width="64px" alt="ChoKaPeek" src="https://avatars.githubusercontent.com/u/16904907?s=64&v=4"></a>
|
||||||
|
|
||||||
## 赞助者
|
## 赞助者
|
||||||
|
|
||||||
@@ -129,6 +132,7 @@
|
|||||||
<a href="https://github.com/xyghy13" target="_blank"><img style="border-radius:50%!important" width="64px" alt="xyghy13" src="https://avatars.githubusercontent.com/u/27751725?s=64&v=4"></a>
|
<a href="https://github.com/xyghy13" target="_blank"><img style="border-radius:50%!important" width="64px" alt="xyghy13" src="https://avatars.githubusercontent.com/u/27751725?s=64&v=4"></a>
|
||||||
<a href="https://github.com/icarousfff" target="_blank"><img style="border-radius:50%!important" width="64px" alt="icarousfff" src="https://avatars.githubusercontent.com/u/49859230?s=64&v=4"></a>
|
<a href="https://github.com/icarousfff" target="_blank"><img style="border-radius:50%!important" width="64px" alt="icarousfff" src="https://avatars.githubusercontent.com/u/49859230?s=64&v=4"></a>
|
||||||
<a href="https://github.com/qiang9420d" target="_blank"><img style="border-radius:50%!important" width="64px" alt="qiang9420d" src="https://avatars.githubusercontent.com/u/22925262?s=64&v=4"></a>
|
<a href="https://github.com/qiang9420d" target="_blank"><img style="border-radius:50%!important" width="64px" alt="qiang9420d" src="https://avatars.githubusercontent.com/u/22925262?s=64&v=4"></a>
|
||||||
|
<a href="https://github.com/zhongwcool" target="_blank"><img style="border-radius:50%!important" width="64px" alt="zhongwcool" src="https://avatars.githubusercontent.com/u/5747392?s=64&v=4"></a>
|
||||||
|
|
||||||
## 鸣谢
|
## 鸣谢
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,6 @@
|
|||||||
|
|
||||||
## 面向中国
|
## 面向中国
|
||||||
|
|
||||||
### 招聘
|
|
||||||
|
|
||||||
百度地图,招 WPF 研发工程师,坐标上海,有意私聊 836904362@qq.com
|
|
||||||
|
|
||||||
### 码云
|
### 码云
|
||||||
|
|
||||||
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)
|
[https://gitee.com/handyorg/HandyControl/](https://gitee.com/handyorg/HandyControl/)
|
||||||
@@ -51,7 +47,7 @@
|
|||||||
|
|
||||||
| | 西江月群 | 定风波群 |
|
| | 西江月群 | 定风波群 |
|
||||||
|-|:-:|:-:|
|
|-|:-:|:-:|
|
||||||
| 群号码 | [](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) | [](//shang.qq.com/wpa/qunwpa?idkey=5c18622a0f6ee07a6f33afa8cdb85b1f72ea50e878271dfcec919c76b55afee7) | 微信群 |
|
| 群号码 | [](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) | [](//shang.qq.com/wpa/qunwpa?idkey=5c18622a0f6ee07a6f33afa8cdb85b1f72ea50e878271dfcec919c76b55afee7) |
|
||||||
| 二维码 |  |  |
|
| 二维码 |  |  |
|
||||||
|
|
||||||
* 为我们购买防脱洗发水 (支付宝扫码)
|
* 为我们购买防脱洗发水 (支付宝扫码)
|
||||||
@@ -85,6 +81,7 @@
|
|||||||
<a href="https://github.com/cuiliang" target="_blank"><img style="border-radius:50%!important" width="64px" alt="cuiliang" src="https://avatars2.githubusercontent.com/u/1972649?s=64&v=4"></a>
|
<a href="https://github.com/cuiliang" target="_blank"><img style="border-radius:50%!important" width="64px" alt="cuiliang" src="https://avatars2.githubusercontent.com/u/1972649?s=64&v=4"></a>
|
||||||
<a href="https://github.com/lwqwag" target="_blank"><img style="border-radius:50%!important" width="64px" alt="lwqwag" src="https://avatars3.githubusercontent.com/u/29883542?s=64&v=4"></a>
|
<a href="https://github.com/lwqwag" target="_blank"><img style="border-radius:50%!important" width="64px" alt="lwqwag" src="https://avatars3.githubusercontent.com/u/29883542?s=64&v=4"></a>
|
||||||
<a href="https://github.com/Epacik" target="_blank"><img style="border-radius:50%!important" width="64px" alt="Epacik" src="https://avatars.githubusercontent.com/u/23077337?s=64&v=4"></a>
|
<a href="https://github.com/Epacik" target="_blank"><img style="border-radius:50%!important" width="64px" alt="Epacik" src="https://avatars.githubusercontent.com/u/23077337?s=64&v=4"></a>
|
||||||
|
<a href="https://github.com/ChoKaPeek" target="_blank"><img style="border-radius:50%!important" width="64px" alt="ChoKaPeek" src="https://avatars.githubusercontent.com/u/16904907?s=64&v=4"></a>
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
||||||
@@ -129,6 +126,7 @@
|
|||||||
<a href="https://github.com/xyghy13" target="_blank"><img style="border-radius:50%!important" width="64px" alt="xyghy13" src="https://avatars.githubusercontent.com/u/27751725?s=64&v=4"></a>
|
<a href="https://github.com/xyghy13" target="_blank"><img style="border-radius:50%!important" width="64px" alt="xyghy13" src="https://avatars.githubusercontent.com/u/27751725?s=64&v=4"></a>
|
||||||
<a href="https://github.com/icarousfff" target="_blank"><img style="border-radius:50%!important" width="64px" alt="icarousfff" src="https://avatars.githubusercontent.com/u/49859230?s=64&v=4"></a>
|
<a href="https://github.com/icarousfff" target="_blank"><img style="border-radius:50%!important" width="64px" alt="icarousfff" src="https://avatars.githubusercontent.com/u/49859230?s=64&v=4"></a>
|
||||||
<a href="https://github.com/qiang9420d" target="_blank"><img style="border-radius:50%!important" width="64px" alt="qiang9420d" src="https://avatars.githubusercontent.com/u/22925262?s=64&v=4"></a>
|
<a href="https://github.com/qiang9420d" target="_blank"><img style="border-radius:50%!important" width="64px" alt="qiang9420d" src="https://avatars.githubusercontent.com/u/22925262?s=64&v=4"></a>
|
||||||
|
<a href="https://github.com/zhongwcool" target="_blank"><img style="border-radius:50%!important" width="64px" alt="zhongwcool" src="https://avatars.githubusercontent.com/u/5747392?s=64&v=4"></a>
|
||||||
|
|
||||||
## Special thanks to
|
## Special thanks to
|
||||||
|
|
||||||
|
|||||||
@@ -190,10 +190,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup x:Name="PART_Popup" Grid.Row="1" Grid.Column="0" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup x:Name="PART_Popup" Grid.Row="1" Grid.Column="0" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -255,10 +255,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -344,10 +344,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -449,10 +449,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
|
|||||||
@@ -141,10 +141,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -204,10 +204,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -346,10 +346,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -409,10 +409,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="30"/>
|
<ColumnDefinition Width="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -581,10 +581,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -684,10 +684,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -790,10 +790,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -913,10 +913,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -1053,10 +1053,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -1173,10 +1173,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
|
|||||||
@@ -83,56 +83,6 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ListViewScrollViewerStyle" TargetType="ScrollViewer">
|
|
||||||
<Setter Property="Focusable" Value="False"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="ScrollViewer">
|
|
||||||
<ControlTemplate.Resources>
|
|
||||||
<Storyboard x:Key="Storyboard1">
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8"/>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8"/>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
</Storyboard>
|
|
||||||
<Storyboard x:Key="Storyboard2">
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
</Storyboard>
|
|
||||||
</ControlTemplate.Resources>
|
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<GridViewHeaderRowPresenter Grid.ColumnSpan="2" AllowsColumnReorder="{Binding TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
||||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.ColumnSpan="2" Grid.Row="1" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" KeyboardNavigation.DirectionalNavigation="Local" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
||||||
<ScrollBar Style="{StaticResource ScrollBarBaseStyle}" Opacity="0" x:Name="PART_VerticalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
|
||||||
<ScrollBar Style="{StaticResource ScrollBarBaseStyle}" Opacity="0" x:Name="PART_HorizontalScrollBar" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" VerticalAlignment="Bottom" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
|
||||||
</Grid>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<EventTrigger RoutedEvent="MouseEnter">
|
|
||||||
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
|
||||||
</EventTrigger>
|
|
||||||
<EventTrigger RoutedEvent="MouseLeave">
|
|
||||||
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
|
||||||
</EventTrigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="ListView">
|
<Style TargetType="ListView">
|
||||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
@@ -152,8 +102,15 @@
|
|||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<ScrollViewer Style="{StaticResource ListViewScrollViewerStyle}">
|
<ScrollViewer>
|
||||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
|
|||||||
@@ -2039,7 +2039,7 @@
|
|||||||
</Storyboard>
|
</Storyboard>
|
||||||
</ControlTemplate.Resources>
|
</ControlTemplate.Resources>
|
||||||
<Border Height="{TemplateBinding Height}" Background="Transparent">
|
<Border Height="{TemplateBinding Height}" Background="Transparent">
|
||||||
<Rectangle x:Name="rectangle" RadiusX="4" RadiusY="4" VerticalAlignment="Bottom" Height="2" SnapsToDevicePixels="True" Width="{TemplateBinding Width}" Fill="{TemplateBinding Background}">
|
<Rectangle x:Name="rectangle" RadiusX="1" RadiusY="1" VerticalAlignment="Bottom" Height="2" SnapsToDevicePixels="True" Width="{TemplateBinding Width}" Fill="{TemplateBinding Background}">
|
||||||
<Rectangle.RenderTransform>
|
<Rectangle.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<TranslateTransform Y="-2" />
|
<TranslateTransform Y="-2" />
|
||||||
@@ -2125,6 +2125,21 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<ControlTemplate x:Key="ScrollViewerNativeBaseControlTemplate" TargetType="ScrollViewer">
|
<ControlTemplate x:Key="ScrollViewerNativeBaseControlTemplate" TargetType="ScrollViewer">
|
||||||
|
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.RowSpan="2" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0" />
|
||||||
|
<ScrollBar x:Name="PART_VerticalScrollBar" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" />
|
||||||
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
<ControlTemplate x:Key="ScrollViewerNativeAutoHideBaseControlTemplate" TargetType="ScrollViewer">
|
||||||
<ControlTemplate.Resources>
|
<ControlTemplate.Resources>
|
||||||
<Storyboard x:Key="Storyboard1">
|
<Storyboard x:Key="Storyboard1">
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
@@ -2170,9 +2185,29 @@
|
|||||||
<Style x:Key="ScrollViewerNativeBaseStyle" TargetType="ScrollViewer">
|
<Style x:Key="ScrollViewerNativeBaseStyle" TargetType="ScrollViewer">
|
||||||
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="Focusable" Value="False" />
|
<Setter Property="Focusable" Value="False" />
|
||||||
<Setter Property="Template" Value="{StaticResource ScrollViewerNativeBaseControlTemplate}" />
|
<Setter Property="Template" Value="{StaticResource ScrollViewerNativeAutoHideBaseControlTemplate}" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:ScrollViewerAttach.AutoHide" Value="False">
|
||||||
|
<Setter Property="Template" Value="{StaticResource ScrollViewerNativeBaseControlTemplate}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<ControlTemplate x:Key="ScrollViewerBaseControlTemplate" TargetType="hc:ScrollViewer">
|
<ControlTemplate x:Key="ScrollViewerBaseControlTemplate" TargetType="hc:ScrollViewer">
|
||||||
|
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.RowSpan="2" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0" />
|
||||||
|
<ScrollBar x:Name="PART_VerticalScrollBar" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" />
|
||||||
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
<ControlTemplate x:Key="ScrollViewerAutoHideBaseControlTemplate" TargetType="hc:ScrollViewer">
|
||||||
<ControlTemplate.Resources>
|
<ControlTemplate.Resources>
|
||||||
<Storyboard x:Key="Storyboard1">
|
<Storyboard x:Key="Storyboard1">
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
@@ -2218,7 +2253,12 @@
|
|||||||
<Style x:Key="ScrollViewerBaseStyle" TargetType="hc:ScrollViewer">
|
<Style x:Key="ScrollViewerBaseStyle" TargetType="hc:ScrollViewer">
|
||||||
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="Focusable" Value="False" />
|
<Setter Property="Focusable" Value="False" />
|
||||||
<Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}" />
|
<Setter Property="Template" Value="{StaticResource ScrollViewerAutoHideBaseControlTemplate}" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:ScrollViewerAttach.AutoHide" Value="False">
|
||||||
|
<Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="RepeatButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="RepeatButton">
|
<Style x:Key="RepeatButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="RepeatButton">
|
||||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
|
||||||
@@ -2333,7 +2373,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
<Style x:Key="GroupBoxOriginalBaseStyle" BasedOn="{StaticResource GroupBoxBaseStyle}" TargetType="GroupBox">
|
<Style x:Key="GroupBoxOriginalBaseStyle" BasedOn="{StaticResource GroupBoxBaseStyle}" TargetType="GroupBox">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
|
||||||
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
@@ -4587,10 +4626,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -4648,10 +4687,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -4784,10 +4823,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -4845,10 +4884,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5009,10 +5048,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5110,10 +5149,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5214,10 +5253,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5336,10 +5375,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5474,10 +5513,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5593,10 +5632,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border BorderThickness="0,1,0,0" Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -5950,7 +5989,6 @@
|
|||||||
<Setter Property="FontWeight" Value="Normal" />
|
<Setter Property="FontWeight" Value="Normal" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource MenuItemBaseStyle}" />
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="Menu">
|
<ControlTemplate TargetType="Menu">
|
||||||
@@ -6051,7 +6089,7 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@@ -6160,7 +6198,7 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<DockPanel LastChildFill="True" Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@@ -6248,10 +6286,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -6282,10 +6320,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -6337,10 +6375,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock Grid.Row="1" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
<TextBlock Grid.Row="1" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -6398,10 +6436,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -6892,10 +6930,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup x:Name="PART_Popup" Grid.Row="1" Grid.Column="0" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup x:Name="PART_Popup" Grid.Row="1" Grid.Column="0" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -6956,10 +6994,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="30" />
|
<ColumnDefinition Width="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -7043,10 +7081,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -7147,10 +7185,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="Auto" MinWidth="30" />
|
<ColumnDefinition Width="Auto" MinWidth="30" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
<Border Effect="{StaticResource EffectShadow2}" BorderThickness="0,1,0,0" Margin="8,0,8,8" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
@@ -7569,10 +7607,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -7617,10 +7655,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -7686,10 +7724,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Grid.Row="1" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
<TextBlock FontSize="12" Grid.Row="1" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -7761,10 +7799,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -7891,10 +7929,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -7939,10 +7977,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -8008,10 +8046,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Grid.Row="1" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
<TextBlock FontSize="12" Grid.Row="1" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -8083,10 +8121,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -8978,10 +9016,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Foreground="{TemplateBinding Foreground}" Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -9016,10 +9054,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -9076,10 +9114,10 @@
|
|||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1" />
|
||||||
<StackPanel Grid.Row="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="2" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Foreground="{TemplateBinding Foreground}" Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -9142,10 +9180,10 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<StackPanel Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
|
<DockPanel Grid.Column="0" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -9245,10 +9283,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
||||||
<TextBlock x:Name="placeholder" Padding="1" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" />
|
<TextBlock x:Name="placeholder" Padding="1" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
|
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
|
||||||
@@ -9276,10 +9314,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
||||||
<TextBlock Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="placeholder" Visibility="Collapsed" Grid.Column="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" />
|
<TextBlock Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="placeholder" Visibility="Collapsed" Grid.Column="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
|
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
|
||||||
@@ -9362,10 +9400,10 @@
|
|||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel Grid.ColumnSpan="3" LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Grid.Column="0" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1" />
|
<TextBlock FontSize="12" Grid.Column="0" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1" />
|
||||||
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
||||||
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="0" Grid.Row="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}" />
|
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="0" Grid.Row="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}" />
|
||||||
@@ -9420,10 +9458,10 @@
|
|||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<Border Grid.Column="1" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
<Border Grid.Column="1" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
||||||
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}" />
|
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}" />
|
||||||
@@ -9579,7 +9617,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="PropertyItemToolTipBaseStyle" BasedOn="{StaticResource {x:Type ToolTip}}" TargetType="ToolTip">
|
<Style x:Key="PropertyItemToolTipBaseStyle" BasedOn="{StaticResource {x:Type ToolTip}}" TargetType="ToolTip">
|
||||||
<Setter Property="Padding" Value="10" />
|
<Setter Property="Padding" Value="10" />
|
||||||
<Setter Property="hc:BorderElement.CornerRadius" Value="2" />
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ToolTip">
|
<ControlTemplate TargetType="ToolTip">
|
||||||
@@ -10434,10 +10471,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -10482,10 +10519,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -10551,10 +10588,10 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}">
|
||||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="1,0,1,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock Grid.Row="1" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
<TextBlock Grid.Row="1" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" />
|
||||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -10626,10 +10663,10 @@
|
|||||||
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
<DockPanel LastChildFill="True" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" HorizontalAlignment="{Binding Path=(hc:TitleElement.HorizontalAlignment),RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="{Binding Path=(hc:TitleElement.VerticalAlignment),RelativeSource={RelativeSource TemplatedParent}}" Margin="0,7,6,7">
|
||||||
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentPresenter DockPanel.Dock="Right" TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" />
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1" />
|
||||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@@ -11164,7 +11201,6 @@
|
|||||||
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
|
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
<Setter Property="Margin" Value="8,0,8,8" />
|
<Setter Property="Margin" Value="8,0,8,8" />
|
||||||
<Setter Property="ShowConfirmButton" Value="True" />
|
|
||||||
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -11344,7 +11380,7 @@
|
|||||||
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,1,0,0'}" Grid.ColumnSpan="3" Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" Name="PART_BorderTitle">
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter}, ConverterParameter='1,1,0,0'}" Grid.ColumnSpan="3" Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" Name="PART_BorderTitle">
|
||||||
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Foreground="{DynamicResource TextIconBrush}" />
|
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Foreground="{DynamicResource TextIconBrush}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Canvas Grid.Row="1" Grid.ColumnSpan="3" Margin="0,16,0,0" VerticalAlignment="Top" Name="PART_Canvas" Width="178" Height="178">
|
<Canvas Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="0,16,0,0" VerticalAlignment="Top" Name="PART_Canvas" Width="178" Height="178">
|
||||||
<Border Background="{DynamicResource SecondaryRegionBrush}" Width="178" Height="178" CornerRadius="89" />
|
<Border Background="{DynamicResource SecondaryRegionBrush}" Width="178" Height="178" CornerRadius="89" />
|
||||||
<hc:CirclePanel Diameter="130" x:Name="PART_PanelNum" KeepVertical="True" Margin="24,24,0,0" OffsetAngle="-60" />
|
<hc:CirclePanel Diameter="130" x:Name="PART_PanelNum" KeepVertical="True" Margin="24,24,0,0" OffsetAngle="-60" />
|
||||||
<Border Focusable="False" Name="PART_BorderClock" Background="{DynamicResource PrimaryBrush}" RenderTransformOrigin="0.5,1" Height="63" Width="2" Canvas.Left="88" Canvas.Top="26" />
|
<Border Focusable="False" Name="PART_BorderClock" Background="{DynamicResource PrimaryBrush}" RenderTransformOrigin="0.5,1" Height="63" Width="2" Canvas.Left="88" Canvas.Top="26" />
|
||||||
@@ -11754,7 +11790,7 @@
|
|||||||
<Setter Property="Focusable" Value="False" />
|
<Setter Property="Focusable" Value="False" />
|
||||||
<Setter Property="MinHeight" Value="60" />
|
<Setter Property="MinHeight" Value="60" />
|
||||||
<Setter Property="Width" Value="320" />
|
<Setter Property="Width" Value="320" />
|
||||||
<Setter Property="Margin" Value="10,0,0,10" />
|
<Setter Property="Margin" Value="10,10,10,0" />
|
||||||
<Setter Property="MaxWidth" Value="320" />
|
<Setter Property="MaxWidth" Value="320" />
|
||||||
<Setter Property="hc:BorderElement.CornerRadius" Value="8" />
|
<Setter Property="hc:BorderElement.CornerRadius" Value="8" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}" />
|
||||||
@@ -11777,13 +11813,13 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" />
|
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
<Path Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="0,15,0,0" Width="30" Height="30" Data="{TemplateBinding Icon}" Stretch="Uniform" Fill="{TemplateBinding IconBrush}" />
|
<Path FlowDirection="LeftToRight" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="0,15,0,0" Width="30" Height="30" Data="{TemplateBinding Icon}" Stretch="Uniform" Fill="{TemplateBinding IconBrush}" />
|
||||||
<StackPanel VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Margin="0,10,10,10">
|
<StackPanel VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Margin="0,10,10,10">
|
||||||
<TextBlock Text="{TemplateBinding Message}" Style="{StaticResource TextBlockDefault}" HorizontalAlignment="Left" TextWrapping="Wrap" />
|
<TextBlock Text="{TemplateBinding Message}" Style="{StaticResource TextBlockDefault}" HorizontalAlignment="Left" TextWrapping="Wrap" />
|
||||||
<TextBlock Visibility="{Binding ShowDateTime,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" Text="{Binding Time,RelativeSource={RelativeSource AncestorType=hc:Growl},StringFormat=yyyy/MM/dd HH:mm:ss}" Style="{StaticResource TextBlockDefault}" Foreground="{DynamicResource SecondaryTextBrush}" HorizontalAlignment="Left" Margin="0,4,0,0" />
|
<TextBlock Visibility="{Binding ShowDateTime,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" Text="{Binding Time,RelativeSource={RelativeSource AncestorType=hc:Growl},StringFormat=yyyy/MM/dd HH:mm:ss}" Style="{StaticResource TextBlockDefault}" Foreground="{DynamicResource SecondaryTextBrush}" HorizontalAlignment="Left" Margin="0,4,0,0" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button Grid.Row="0" Visibility="Collapsed" Margin="11,0" Name="PART_ButtonClose" Command="interactivity:ControlCommands.Close" Grid.Column="2" Background="Transparent" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="18" Height="18">
|
<Button Grid.Row="0" Visibility="Collapsed" Margin="11,0" Name="PART_ButtonClose" Command="interactivity:ControlCommands.Close" Grid.Column="2" Background="Transparent" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="18" Height="18">
|
||||||
<Path Data="{StaticResource ErrorGeometry}" Stretch="Uniform" Fill="{DynamicResource SecondaryTextBrush}" />
|
<Path FlowDirection="LeftToRight" Data="{StaticResource ErrorGeometry}" Stretch="Uniform" Fill="{DynamicResource SecondaryTextBrush}" />
|
||||||
</Button>
|
</Button>
|
||||||
<UniformGrid Columns="2" Name="PART_PanelMore" IsEnabled="False" Visibility="Collapsed" Grid.Row="1" Grid.ColumnSpan="3" Height="28" Grid.Column="0">
|
<UniformGrid Columns="2" Name="PART_PanelMore" IsEnabled="False" Visibility="Collapsed" Grid.Row="1" Grid.ColumnSpan="3" Height="28" Grid.Column="0">
|
||||||
<Button Command="interactivity:ControlCommands.Cancel" Style="{StaticResource ButtonCustom}" HorizontalAlignment="Stretch" Background="Transparent">
|
<Button Command="interactivity:ControlCommands.Cancel" Style="{StaticResource ButtonCustom}" HorizontalAlignment="Stretch" Background="Transparent">
|
||||||
@@ -11931,55 +11967,6 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ListViewScrollViewerStyle" TargetType="ScrollViewer">
|
|
||||||
<Setter Property="Focusable" Value="False" />
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="ScrollViewer">
|
|
||||||
<ControlTemplate.Resources>
|
|
||||||
<Storyboard x:Key="Storyboard1">
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value=".8" />
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
</Storyboard>
|
|
||||||
<Storyboard x:Key="Storyboard2">
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:.2" Value="0" />
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
|
||||||
</Storyboard>
|
|
||||||
</ControlTemplate.Resources>
|
|
||||||
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<GridViewHeaderRowPresenter Grid.ColumnSpan="2" AllowsColumnReorder="{Binding TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
||||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.ColumnSpan="2" Grid.Row="1" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" KeyboardNavigation.DirectionalNavigation="Local" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
||||||
<ScrollBar Style="{StaticResource ScrollBarBaseStyle}" Opacity="0" x:Name="PART_VerticalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" />
|
|
||||||
<ScrollBar Style="{StaticResource ScrollBarBaseStyle}" Opacity="0" x:Name="PART_HorizontalScrollBar" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" VerticalAlignment="Bottom" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" />
|
|
||||||
</Grid>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<EventTrigger RoutedEvent="MouseEnter">
|
|
||||||
<BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
|
|
||||||
</EventTrigger>
|
|
||||||
<EventTrigger RoutedEvent="MouseLeave">
|
|
||||||
<BeginStoryboard Storyboard="{StaticResource Storyboard2}" />
|
|
||||||
</EventTrigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="ListView">
|
<Style TargetType="ListView">
|
||||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||||
@@ -11999,8 +11986,15 @@
|
|||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
<hc:ToggleBlock IsChecked="{Binding HasItems,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
||||||
<hc:ToggleBlock.CheckedContent>
|
<hc:ToggleBlock.CheckedContent>
|
||||||
<ScrollViewer Style="{StaticResource ListViewScrollViewerStyle}">
|
<ScrollViewer>
|
||||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
<ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</hc:ToggleBlock.CheckedContent>
|
</hc:ToggleBlock.CheckedContent>
|
||||||
<hc:ToggleBlock.UnCheckedContent>
|
<hc:ToggleBlock.UnCheckedContent>
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ namespace HandyControlDemo
|
|||||||
|
|
||||||
GlobalShortcut.Init(new List<KeyBinding>
|
GlobalShortcut.Init(new List<KeyBinding>
|
||||||
{
|
{
|
||||||
new KeyBinding(ViewModelLocator.Instance.Main.GlobalShortcutInfoCmd, Key.I, ModifierKeys.Control | ModifierKeys.Alt),
|
new(ViewModelLocator.Instance.Main.GlobalShortcutInfoCmd, Key.I, ModifierKeys.Control | ModifierKeys.Alt),
|
||||||
new KeyBinding(ViewModelLocator.Instance.Main.GlobalShortcutWarningCmd, Key.E, ModifierKeys.Control | ModifierKeys.Alt)
|
new(ViewModelLocator.Instance.Main.GlobalShortcutWarningCmd, Key.E, ModifierKeys.Control | ModifierKeys.Alt)
|
||||||
});
|
});
|
||||||
|
|
||||||
Dialog.SetToken(this, MessageToken.MainWindow);
|
Dialog.SetToken(this, MessageToken.MainWindow);
|
||||||
|
|||||||
@@ -517,7 +517,7 @@
|
|||||||
<value>TextDialog</value>
|
<value>TextDialog</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PleaseWait" xml:space="preserve">
|
<data name="PleaseWait" xml:space="preserve">
|
||||||
<value>Proszę czekać</value>
|
<value>Proszę czekać...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GrowlDemo" xml:space="preserve">
|
<data name="GrowlDemo" xml:space="preserve">
|
||||||
<value>Growl demo</value>
|
<value>Growl demo</value>
|
||||||
@@ -792,4 +792,7 @@
|
|||||||
<data name="Success" xml:space="preserve">
|
<data name="Success" xml:space="preserve">
|
||||||
<value>Success</value>
|
<value>Success</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Empty" xml:space="preserve">
|
||||||
|
<value>Empty</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -8,7 +8,7 @@ namespace HandyControlDemo.Properties.Langs
|
|||||||
{
|
{
|
||||||
public class LangProvider : INotifyPropertyChanged
|
public class LangProvider : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
internal static LangProvider Instance => ResourceHelper.GetResource<LangProvider>("DemoLangs");
|
internal static LangProvider Instance { get; } = ResourceHelper.GetResource<LangProvider>("DemoLangs");
|
||||||
|
|
||||||
private static string CultureInfoStr;
|
private static string CultureInfoStr;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace HandyControlDemo.Properties.Langs
|
|||||||
{
|
{
|
||||||
public class LangProvider : INotifyPropertyChanged
|
public class LangProvider : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
internal static LangProvider Instance => ResourceHelper.GetResource<LangProvider>("DemoLangs");
|
internal static LangProvider Instance { get; } = ResourceHelper.GetResource<LangProvider>("DemoLangs");
|
||||||
|
|
||||||
private static string CultureInfoStr;
|
private static string CultureInfoStr;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace HandyControlDemo.Resources
|
|||||||
public override ResourceDictionary GetSkin(SkinType skinType) =>
|
public override ResourceDictionary GetSkin(SkinType skinType) =>
|
||||||
ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skinType);
|
ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skinType);
|
||||||
|
|
||||||
public override ResourceDictionary GetTheme() => new ResourceDictionary
|
public override ResourceDictionary GetTheme() => new()
|
||||||
{
|
{
|
||||||
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
|
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace HandyControlDemo.Service
|
|||||||
{
|
{
|
||||||
internal ObservableCollection<TabControlDemoModel> GetTabControlDemoDataList()
|
internal ObservableCollection<TabControlDemoModel> GetTabControlDemoDataList()
|
||||||
{
|
{
|
||||||
return new ObservableCollection<TabControlDemoModel>
|
return new()
|
||||||
{
|
{
|
||||||
new TabControlDemoModel
|
new TabControlDemoModel
|
||||||
{
|
{
|
||||||
@@ -139,7 +139,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal List<AvatarModel> GetBlogDataList()
|
internal List<AvatarModel> GetBlogDataList()
|
||||||
{
|
{
|
||||||
return new List<AvatarModel>
|
return new()
|
||||||
{
|
{
|
||||||
new AvatarModel
|
new AvatarModel
|
||||||
{
|
{
|
||||||
@@ -170,7 +170,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal List<AvatarModel> GetProjectDataList()
|
internal List<AvatarModel> GetProjectDataList()
|
||||||
{
|
{
|
||||||
return new List<AvatarModel>
|
return new()
|
||||||
{
|
{
|
||||||
new AvatarModel
|
new AvatarModel
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal List<AvatarModel> GetWebsiteDataList()
|
internal List<AvatarModel> GetWebsiteDataList()
|
||||||
{
|
{
|
||||||
return new List<AvatarModel>
|
return new()
|
||||||
{
|
{
|
||||||
new AvatarModel
|
new AvatarModel
|
||||||
{
|
{
|
||||||
@@ -208,7 +208,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal ObservableCollection<CardModel> GetCardDataList()
|
internal ObservableCollection<CardModel> GetCardDataList()
|
||||||
{
|
{
|
||||||
return new ObservableCollection<CardModel>
|
return new()
|
||||||
{
|
{
|
||||||
new CardModel
|
new CardModel
|
||||||
{
|
{
|
||||||
@@ -275,7 +275,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal CardModel GetCardData()
|
internal CardModel GetCardData()
|
||||||
{
|
{
|
||||||
return new CardModel
|
return new()
|
||||||
{
|
{
|
||||||
Content = $"/HandyControlDemo;component/Resources/Img/Album/{DateTime.Now.Second % 10 + 1}.jpg"
|
Content = $"/HandyControlDemo;component/Resources/Img/Album/{DateTime.Now.Second % 10 + 1}.jpg"
|
||||||
};
|
};
|
||||||
@@ -283,7 +283,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal List<StepBarDemoModel> GetStepBarDemoDataList()
|
internal List<StepBarDemoModel> GetStepBarDemoDataList()
|
||||||
{
|
{
|
||||||
return new List<StepBarDemoModel>
|
return new()
|
||||||
{
|
{
|
||||||
new StepBarDemoModel
|
new StepBarDemoModel
|
||||||
{
|
{
|
||||||
@@ -310,7 +310,7 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
internal ObservableCollection<CoverViewDemoModel> GetCoverViewDemoDataList()
|
internal ObservableCollection<CoverViewDemoModel> GetCoverViewDemoDataList()
|
||||||
{
|
{
|
||||||
return new ObservableCollection<CoverViewDemoModel>
|
return new()
|
||||||
{
|
{
|
||||||
new CoverViewDemoModel
|
new CoverViewDemoModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace HandyControlDemo.Tools.Converter
|
|||||||
{
|
{
|
||||||
if (value is HatchStyle style)
|
if (value is HatchStyle style)
|
||||||
{
|
{
|
||||||
return _brushGenerator.GetHatchBrush(style, ResourceHelper.GetResource<Color>(ResourceToken.DarkPrimaryColor), ResourceHelper.GetResource<Color>(ResourceToken.BackgroundColor));
|
return _brushGenerator.GetHatchBrush(style, ResourceHelper.GetResource<Color>(ResourceToken.DarkPrimaryColor), Colors.Transparent);
|
||||||
}
|
}
|
||||||
return Brushes.Transparent;
|
return Brushes.Transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace HandyControlDemo.Tools
|
|||||||
{
|
{
|
||||||
private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name;
|
private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name;
|
||||||
|
|
||||||
private static readonly Dictionary<string, object> CacheDic = new Dictionary<string, object>();
|
private static readonly Dictionary<string, object> CacheDic = new();
|
||||||
|
|
||||||
public static void Register(string name, object instance) => CacheDic[name] = instance;
|
public static void Register(string name, object instance) => CacheDic[name] = instance;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</hc:ScrollViewer>
|
</hc:ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||||
<hc:ScrollViewer IsInertiaEnabled="True">
|
<hc:ScrollViewer IsInertiaEnabled="True" hc:ScrollViewerAttach.AutoHide="False">
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||||
<Border Background="{DynamicResource PrimaryBrush}">
|
<Border Background="{DynamicResource PrimaryBrush}">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
|
||||||
DataContext="{Binding SplitButtonDemo,Source={StaticResource Locator}}">
|
DataContext="{Binding SplitButtonDemo,Source={StaticResource Locator}}">
|
||||||
<hc:TransitioningContentControl>
|
<hc:TransitioningContentControl>
|
||||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||||
|
|||||||
@@ -67,17 +67,17 @@ namespace HandyControlDemo.UserControl
|
|||||||
var textEditorCustomStyle = ResourceHelper.GetResource<Style>("TextEditorCustom");
|
var textEditorCustomStyle = ResourceHelper.GetResource<Style>("TextEditorCustom");
|
||||||
_textEditor = new Dictionary<string, TextEditor>
|
_textEditor = new Dictionary<string, TextEditor>
|
||||||
{
|
{
|
||||||
["XAML"] = new TextEditor
|
["XAML"] = new()
|
||||||
{
|
{
|
||||||
Style = textEditorCustomStyle,
|
Style = textEditorCustomStyle,
|
||||||
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("XML")
|
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("XML")
|
||||||
},
|
},
|
||||||
["C#"] = new TextEditor
|
["C#"] = new()
|
||||||
{
|
{
|
||||||
Style = textEditorCustomStyle,
|
Style = textEditorCustomStyle,
|
||||||
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#")
|
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#")
|
||||||
},
|
},
|
||||||
["VM"] = new TextEditor
|
["VM"] = new()
|
||||||
{
|
{
|
||||||
Style = textEditorCustomStyle,
|
Style = textEditorCustomStyle,
|
||||||
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#")
|
SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#")
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
||||||
BorderThickness="0,1,0,0"
|
BorderThickness="0,1,0,0"
|
||||||
BorderBrush="{DynamicResource BorderBrush}"
|
BorderBrush="{DynamicResource BorderBrush}"
|
||||||
Background="{StaticResource CloudDrawingBrush}"
|
Background="{StaticResource CloudDrawingBrush}"
|
||||||
@@ -14,8 +13,5 @@
|
|||||||
<userControl:LeftMainContent/>
|
<userControl:LeftMainContent/>
|
||||||
<userControl:MainContent Grid.Column="1"/>
|
<userControl:MainContent Grid.Column="1"/>
|
||||||
<GridSplitter Margin="0,26,0,26" Grid.Column="0" HorizontalAlignment="Right" Width="4" Background="Transparent"/>
|
<GridSplitter Margin="0,26,0,26" Grid.Column="0" HorizontalAlignment="Right" Width="4" Background="Transparent"/>
|
||||||
<hc:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsInertiaEnabled="True" IsPenetrating="True">
|
|
||||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
|
||||||
</hc:ScrollViewer>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<Path Data="{StaticResource NugetGeometry}" Fill="#30a5dd" Stretch="Uniform"/>
|
<Path Data="{StaticResource NugetGeometry}" Fill="#30a5dd" Stretch="Uniform"/>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://marketplace.visualstudio.com/items?itemName=HandyOrg.handycontrolforvs2019" Header="{ex:Lang Key={x:Static langs:LangKeys.Vsix}}">
|
<MenuItem Command="hc:ControlCommands.OpenLink" CommandParameter="https://marketplace.visualstudio.com/items?itemName=HandyOrg.HandyControl" Header="{ex:Lang Key={x:Static langs:LangKeys.Vsix}}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Path Data="{StaticResource VisualStudioGeometry}" Fill="{DynamicResource PrimaryTextBrush}" Stretch="Uniform"/>
|
<Path Data="{StaticResource VisualStudioGeometry}" Fill="{DynamicResource PrimaryTextBrush}" Stretch="Uniform"/>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ namespace HandyControlDemo.UserControl
|
|||||||
{
|
{
|
||||||
public partial class GeometryDemoCtl
|
public partial class GeometryDemoCtl
|
||||||
{
|
{
|
||||||
private readonly HashSet<string> _lineSet = new HashSet<string>
|
private readonly HashSet<string> _lineSet = new()
|
||||||
{
|
{
|
||||||
"CheckedGeometry"
|
"CheckedGeometry"
|
||||||
};
|
};
|
||||||
|
|
||||||
public ObservableCollection<GeometryItemModel> GeometryItems { get; set; } =
|
public ObservableCollection<GeometryItemModel> GeometryItems { get; set; } =
|
||||||
new ObservableCollection<GeometryItemModel>();
|
new();
|
||||||
|
|
||||||
public GeometryDemoCtl()
|
public GeometryDemoCtl()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultDanger}"/>
|
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultDanger}"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultWarning}"/>
|
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultWarning}"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultInfo}"/>
|
<TextBlock HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultInfo}"/>
|
||||||
<TextBlock hc:TextBlockAttach.AutoTooltip="True" Width="300" HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
<TextBlock hc:TextBlockAttach.AutoTooltip="True" TextTrimming="CharacterEllipsis" Width="300" HorizontalAlignment="Left" Margin="5" Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=20}" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
private readonly string _id = Guid.NewGuid().ToString();
|
private readonly string _id = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
private readonly Stopwatch _stopwatch = new Lazy<Stopwatch>(() => new Stopwatch()).Value;
|
private readonly Stopwatch _stopwatch = new();
|
||||||
|
|
||||||
public ChatBoxViewModel()
|
public ChatBoxViewModel()
|
||||||
{
|
{
|
||||||
@@ -50,10 +50,9 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<ChatInfoModel> ChatInfos { get; set; } = new ObservableCollection<ChatInfoModel>();
|
public ObservableCollection<ChatInfoModel> ChatInfos { get; set; } = new();
|
||||||
|
|
||||||
public RelayCommand<KeyEventArgs> SendStringCmd => new Lazy<RelayCommand<KeyEventArgs>>(() =>
|
public RelayCommand<KeyEventArgs> SendStringCmd => new(SendString);
|
||||||
new RelayCommand<KeyEventArgs>(SendString)).Value;
|
|
||||||
|
|
||||||
private void SendString(KeyEventArgs e)
|
private void SendString(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -73,12 +72,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<RoutedEventArgs> ReadMessageCmd => new Lazy<RelayCommand<RoutedEventArgs>>(() =>
|
public RelayCommand<RoutedEventArgs> ReadMessageCmd => new(ReadMessage);
|
||||||
new RelayCommand<RoutedEventArgs>(ReadMessage)).Value;
|
|
||||||
|
|
||||||
private void ReadMessage(RoutedEventArgs e)
|
private void ReadMessage(RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.OriginalSource is FrameworkElement element && element.Tag is ChatInfoModel info)
|
if (e.OriginalSource is FrameworkElement { Tag: ChatInfoModel info })
|
||||||
{
|
{
|
||||||
if (info.Type == ChatMessageType.Image)
|
if (info.Type == ChatMessageType.Image)
|
||||||
{
|
{
|
||||||
@@ -95,8 +93,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand StartRecordCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand StartRecordCmd => new(StartRecord);
|
||||||
new RelayCommand(StartRecord)).Value;
|
|
||||||
|
|
||||||
private void StartRecord()
|
private void StartRecord()
|
||||||
{
|
{
|
||||||
@@ -111,8 +108,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
_stopwatch.Start();
|
_stopwatch.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand StopRecordCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand StopRecordCmd => new(StopRecord);
|
||||||
new RelayCommand(StopRecord)).Value;
|
|
||||||
|
|
||||||
private void StopRecord()
|
private void StopRecord()
|
||||||
{
|
{
|
||||||
@@ -149,8 +145,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
Messenger.Default.Send(info, MessageToken.SendChatMessage);
|
Messenger.Default.Send(info, MessageToken.SendChatMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand OpenImageCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenImageCmd => new(OpenImage);
|
||||||
new RelayCommand(OpenImage)).Value;
|
|
||||||
|
|
||||||
private void OpenImage()
|
private void OpenImage()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,6 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand CloseCmd => new Lazy<RelayCommand>(() => new RelayCommand(() => CloseAction?.Invoke())).Value;
|
public RelayCommand CloseCmd => new(() => CloseAction?.Invoke());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
@@ -18,7 +17,6 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand CountCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand CountCmd => new(() => Count++);
|
||||||
new RelayCommand(() => Count++)).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
using HandyControlDemo.Service;
|
using HandyControlDemo.Service;
|
||||||
|
|
||||||
@@ -15,16 +14,14 @@ namespace HandyControlDemo.ViewModel
|
|||||||
DataList = dataService.GetCardDataList();
|
DataList = dataService.GetCardDataList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand AddItemCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AddItemCmd => new(() => DataList.Insert(0, _dataService.GetCardData()));
|
||||||
new RelayCommand(() => DataList.Insert(0, _dataService.GetCardData()))).Value;
|
|
||||||
|
|
||||||
public RelayCommand RemoveItemCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand RemoveItemCmd => new(() =>
|
||||||
new RelayCommand(() =>
|
{
|
||||||
|
if (DataList.Count > 0)
|
||||||
{
|
{
|
||||||
if (DataList.Count > 0)
|
DataList.RemoveAt(0);
|
||||||
{
|
}
|
||||||
DataList.RemoveAt(0);
|
});
|
||||||
}
|
|
||||||
})).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,8 +27,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<FrameworkElement> ShowTextCmd => new Lazy<RelayCommand<FrameworkElement>>(() =>
|
public RelayCommand<FrameworkElement> ShowTextCmd => new(ShowText);
|
||||||
new RelayCommand<FrameworkElement>(ShowText)).Value;
|
|
||||||
|
|
||||||
private void ShowText(FrameworkElement element)
|
private void ShowText(FrameworkElement element)
|
||||||
{
|
{
|
||||||
@@ -43,8 +42,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if NET40
|
#if NET40
|
||||||
public RelayCommand<bool> ShowInteractiveDialogCmd => new Lazy<RelayCommand<bool>>(() =>
|
public RelayCommand<bool> ShowInteractiveDialogCmd => new(ShowInteractiveDialog);
|
||||||
new RelayCommand<bool>(ShowInteractiveDialog)).Value;
|
|
||||||
|
|
||||||
private void ShowInteractiveDialog(bool withTimer)
|
private void ShowInteractiveDialog(bool withTimer)
|
||||||
{
|
{
|
||||||
@@ -60,8 +58,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
public RelayCommand<bool> ShowInteractiveDialogCmd => new Lazy<RelayCommand<bool>>(() =>
|
public RelayCommand<bool> ShowInteractiveDialogCmd => new(async withTimer => await ShowInteractiveDialog(withTimer));
|
||||||
new RelayCommand<bool>(async withTimer => await ShowInteractiveDialog(withTimer))).Value;
|
|
||||||
|
|
||||||
private async Task ShowInteractiveDialog(bool withTimer)
|
private async Task ShowInteractiveDialog(bool withTimer)
|
||||||
{
|
{
|
||||||
@@ -78,13 +75,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public RelayCommand NewWindowCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand NewWindowCmd => new(() => new DialogDemoWindow
|
||||||
new RelayCommand(() => new DialogDemoWindow
|
{
|
||||||
{
|
Owner = Application.Current.MainWindow
|
||||||
Owner = Application.Current.MainWindow
|
}.Show());
|
||||||
}.Show())).Value;
|
|
||||||
|
|
||||||
public RelayCommand<string> ShowWithTokenCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> ShowWithTokenCmd => new(token => Dialog.Show(new TextDialog(), token));
|
||||||
new RelayCommand<string>(token => Dialog.Show(new TextDialog(), token))).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@@ -23,94 +22,79 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
#region Window
|
#region Window
|
||||||
|
|
||||||
public RelayCommand InfoCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand InfoCmd => new(() => Growl.Info(Properties.Langs.Lang.GrowlInfo, _token));
|
||||||
new RelayCommand(() => Growl.Info(Properties.Langs.Lang.GrowlInfo, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand SuccessCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SuccessCmd => new(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess, _token));
|
||||||
new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand WarningCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand WarningCmd => new(() => Growl.Warning(new GrowlInfo
|
||||||
new RelayCommand(() => Growl.Warning(new GrowlInfo
|
{
|
||||||
{
|
Message = Properties.Langs.Lang.GrowlWarning,
|
||||||
Message = Properties.Langs.Lang.GrowlWarning,
|
CancelStr = Properties.Langs.Lang.Ignore,
|
||||||
CancelStr = Properties.Langs.Lang.Ignore,
|
ActionBeforeClose = isConfirmed =>
|
||||||
ActionBeforeClose = isConfirmed =>
|
|
||||||
{
|
|
||||||
Growl.Info(isConfirmed.ToString());
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
Token = _token
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ErrorCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand AskCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
|
||||||
{
|
{
|
||||||
Growl.Info(isConfirmed.ToString());
|
Growl.Info(isConfirmed.ToString());
|
||||||
return true;
|
return true;
|
||||||
}, _token))).Value;
|
},
|
||||||
|
Token = _token
|
||||||
|
}));
|
||||||
|
|
||||||
public RelayCommand FatalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand ErrorCmd => new(() => Growl.Error(Properties.Langs.Lang.GrowlError, _token));
|
||||||
new RelayCommand(() => Growl.Fatal(new GrowlInfo
|
|
||||||
{
|
|
||||||
Message = Properties.Langs.Lang.GrowlFatal,
|
|
||||||
ShowDateTime = false,
|
|
||||||
Token = _token
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ClearCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AskCmd => new(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||||
new RelayCommand(() => Growl.Clear(_token))).Value;
|
{
|
||||||
|
Growl.Info(isConfirmed.ToString());
|
||||||
|
return true;
|
||||||
|
}, _token));
|
||||||
|
|
||||||
|
public RelayCommand FatalCmd => new(() => Growl.Fatal(new GrowlInfo
|
||||||
|
{
|
||||||
|
Message = Properties.Langs.Lang.GrowlFatal,
|
||||||
|
ShowDateTime = false,
|
||||||
|
Token = _token
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand ClearCmd => new(() => Growl.Clear(_token));
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Desktop
|
#region Desktop
|
||||||
|
|
||||||
public RelayCommand InfoGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand InfoGlobalCmd => new(() => Growl.InfoGlobal(Properties.Langs.Lang.GrowlInfo));
|
||||||
new RelayCommand(() => Growl.InfoGlobal(Properties.Langs.Lang.GrowlInfo))).Value;
|
|
||||||
|
|
||||||
public RelayCommand SuccessGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SuccessGlobalCmd => new(() => Growl.SuccessGlobal(Properties.Langs.Lang.GrowlSuccess));
|
||||||
new RelayCommand(() => Growl.SuccessGlobal(Properties.Langs.Lang.GrowlSuccess))).Value;
|
|
||||||
|
|
||||||
public RelayCommand WarningGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand WarningGlobalCmd => new(() => Growl.WarningGlobal(new GrowlInfo
|
||||||
new RelayCommand(() => Growl.WarningGlobal(new GrowlInfo
|
{
|
||||||
{
|
Message = Properties.Langs.Lang.GrowlWarning,
|
||||||
Message = Properties.Langs.Lang.GrowlWarning,
|
CancelStr = Properties.Langs.Lang.Ignore,
|
||||||
CancelStr = Properties.Langs.Lang.Ignore,
|
ActionBeforeClose = isConfirmed =>
|
||||||
ActionBeforeClose = isConfirmed =>
|
|
||||||
{
|
|
||||||
Growl.InfoGlobal(isConfirmed.ToString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ErrorGlobalCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.ErrorGlobal(Properties.Langs.Lang.GrowlError))).Value;
|
|
||||||
|
|
||||||
public RelayCommand AskGlobalCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.AskGlobal(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
|
||||||
{
|
{
|
||||||
Growl.InfoGlobal(isConfirmed.ToString());
|
Growl.InfoGlobal(isConfirmed.ToString());
|
||||||
return true;
|
return true;
|
||||||
}))).Value;
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
public RelayCommand FatalGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand ErrorGlobalCmd => new(() => Growl.ErrorGlobal(Properties.Langs.Lang.GrowlError));
|
||||||
new RelayCommand(() => Growl.FatalGlobal(new GrowlInfo
|
|
||||||
{
|
|
||||||
Message = Properties.Langs.Lang.GrowlFatal,
|
|
||||||
ShowDateTime = false
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ClearGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AskGlobalCmd => new(() => Growl.AskGlobal(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||||
new RelayCommand(Growl.ClearGlobal)).Value;
|
{
|
||||||
|
Growl.InfoGlobal(isConfirmed.ToString());
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand FatalGlobalCmd => new(() => Growl.FatalGlobal(new GrowlInfo
|
||||||
|
{
|
||||||
|
Message = Properties.Langs.Lang.GrowlFatal,
|
||||||
|
ShowDateTime = false
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand ClearGlobalCmd => new(Growl.ClearGlobal);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public RelayCommand NewWindowCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand NewWindowCmd => new(() => new GrowlDemoWindow
|
||||||
new RelayCommand(() => new GrowlDemoWindow
|
{
|
||||||
{
|
Owner = Application.Current.MainWindow
|
||||||
Owner = Application.Current.MainWindow
|
}.Show());
|
||||||
}.Show())).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class ImageBrowserDemoViewModel
|
public class ImageBrowserDemoViewModel
|
||||||
{
|
{
|
||||||
public RelayCommand OpenImgCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenImgCmd => new(() =>
|
||||||
new RelayCommand(() =>
|
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show());
|
||||||
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show())).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@@ -9,8 +8,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class NotificationDemoViewModel : ViewModelBase
|
public class NotificationDemoViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenCmd => new(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen));
|
||||||
new RelayCommand(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen))).Value;
|
|
||||||
|
|
||||||
private ShowAnimation _showAnimation;
|
private ShowAnimation _showAnimation;
|
||||||
|
|
||||||
|
|||||||
@@ -93,11 +93,9 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<object> MouseCmd => new Lazy<RelayCommand<object>>(() =>
|
public RelayCommand<object> MouseCmd => new(str => Growl.Info(str.ToString()));
|
||||||
new RelayCommand<object>(str => Growl.Info(str.ToString()))).Value;
|
|
||||||
|
|
||||||
public RelayCommand SendNotificationCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SendNotificationCmd => new(SendNotification);
|
||||||
new RelayCommand(SendNotification)).Value;
|
|
||||||
|
|
||||||
private void SendNotification()
|
private void SendNotification()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@@ -42,9 +41,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 页码改变命令
|
/// 页码改变命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public RelayCommand<FunctionEventArgs<int>> PageUpdatedCmd =>
|
public RelayCommand<FunctionEventArgs<int>> PageUpdatedCmd => new(PageUpdated);
|
||||||
new Lazy<RelayCommand<FunctionEventArgs<int>>>(() =>
|
|
||||||
new RelayCommand<FunctionEventArgs<int>>(PageUpdated)).Value;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 页码改变
|
/// 页码改变
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
|
|
||||||
@@ -7,8 +6,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class SearchBarDemoViewModel : ViewModelBase
|
public class SearchBarDemoViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public RelayCommand<string> SearchCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> SearchCmd => new(Search);
|
||||||
new RelayCommand<string>(Search)).Value;
|
|
||||||
|
|
||||||
private void Search(string key)
|
private void Search(string key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@@ -8,13 +7,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class SideMenuDemoViewModel : ViewModelBase
|
public class SideMenuDemoViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public RelayCommand<FunctionEventArgs<object>> SwitchItemCmd => new Lazy<RelayCommand<FunctionEventArgs<object>>>(() =>
|
public RelayCommand<FunctionEventArgs<object>> SwitchItemCmd => new(SwitchItem);
|
||||||
new RelayCommand<FunctionEventArgs<object>>(SwitchItem)).Value;
|
|
||||||
|
|
||||||
private void SwitchItem(FunctionEventArgs<object> info) => Growl.Info((info.Info as SideMenuItem)?.Header.ToString());
|
private void SwitchItem(FunctionEventArgs<object> info) => Growl.Info((info.Info as SideMenuItem)?.Header.ToString());
|
||||||
|
|
||||||
public RelayCommand<string> SelectCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> SelectCmd => new(Select);
|
||||||
new RelayCommand<string>(Select)).Value;
|
|
||||||
|
|
||||||
private void Select(string header) => Growl.Success(header);
|
private void Select(string header) => Growl.Success(header);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
|
|
||||||
@@ -7,7 +6,6 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class SplitButtonDemoViewModel : ViewModelBase
|
public class SplitButtonDemoViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public RelayCommand<string> SelectCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> SelectCmd => new(str => Growl.Info(str));
|
||||||
new RelayCommand<string>(str => Growl.Info(str))).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControlDemo.UserControl;
|
using HandyControlDemo.UserControl;
|
||||||
|
|
||||||
@@ -7,7 +6,6 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class SpriteDemoViewModel
|
public class SpriteDemoViewModel
|
||||||
{
|
{
|
||||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenCmd => new(() => Sprite.Show(new AppSprite()));
|
||||||
new RelayCommand(() => Sprite.Show(new AppSprite()))).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
@@ -27,12 +26,12 @@ namespace HandyControlDemo.ViewModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 下一步
|
/// 下一步
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public RelayCommand<Panel> NextCmd => new Lazy<RelayCommand<Panel>>(() => new RelayCommand<Panel>(Next)).Value;
|
public RelayCommand<Panel> NextCmd => new(Next);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上一步
|
/// 上一步
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public RelayCommand<Panel> PrevCmd => new Lazy<RelayCommand<Panel>>(() => new RelayCommand<Panel>(Prev)).Value;
|
public RelayCommand<Panel> PrevCmd => new(Prev);
|
||||||
|
|
||||||
private void Next(Panel panel)
|
private void Next(Panel panel)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@@ -12,16 +11,14 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public TabControlDemoViewModel(DataService dataService) => DataList = dataService.GetTabControlDemoDataList();
|
public TabControlDemoViewModel(DataService dataService) => DataList = dataService.GetTabControlDemoDataList();
|
||||||
|
|
||||||
public RelayCommand<CancelRoutedEventArgs> ClosingCmd => new Lazy<RelayCommand<CancelRoutedEventArgs>>(() =>
|
public RelayCommand<CancelRoutedEventArgs> ClosingCmd => new(Closing);
|
||||||
new RelayCommand<CancelRoutedEventArgs>(Closing)).Value;
|
|
||||||
|
|
||||||
private void Closing(CancelRoutedEventArgs args)
|
private void Closing(CancelRoutedEventArgs args)
|
||||||
{
|
{
|
||||||
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closing");
|
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closing");
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<RoutedEventArgs> ClosedCmd => new Lazy<RelayCommand<RoutedEventArgs>>(() =>
|
public RelayCommand<RoutedEventArgs> ClosedCmd => new(Closed);
|
||||||
new RelayCommand<RoutedEventArgs>(Closed)).Value;
|
|
||||||
|
|
||||||
private void Closed(RoutedEventArgs args)
|
private void Closed(RoutedEventArgs args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.ObjectModel;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
@@ -30,21 +29,20 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand AddItemCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AddItemCmd => new(() =>
|
||||||
new RelayCommand(() =>
|
{
|
||||||
|
if (string.IsNullOrEmpty(TagName))
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(TagName))
|
Growl.Warning(Lang.PlsEnterContent);
|
||||||
{
|
return;
|
||||||
Growl.Warning(Lang.PlsEnterContent);
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DataList.Insert(0, new DemoDataModel
|
DataList.Insert(0, new DemoDataModel
|
||||||
{
|
{
|
||||||
IsSelected = DataList.Count % 2 == 0,
|
IsSelected = DataList.Count % 2 == 0,
|
||||||
Name = TagName
|
Name = TagName
|
||||||
});
|
});
|
||||||
TagName = string.Empty;
|
TagName = string.Empty;
|
||||||
})).Value;
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControlDemo.Tools;
|
using HandyControlDemo.Tools;
|
||||||
|
|
||||||
@@ -7,7 +6,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class WindowDemoViewModel
|
public class WindowDemoViewModel
|
||||||
{
|
{
|
||||||
public RelayCommand<string> OpenWindowCmd => new Lazy<RelayCommand<string>>(() => new RelayCommand<string>(OpenWindow)).Value;
|
public RelayCommand<string> OpenWindowCmd => new(OpenWindow);
|
||||||
|
|
||||||
private void OpenWindow(string windowTag)
|
private void OpenWindow(string windowTag)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,24 +89,18 @@ namespace HandyControlDemo.ViewModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 切换例子命令
|
/// 切换例子命令
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public RelayCommand<SelectionChangedEventArgs> SwitchDemoCmd =>
|
public RelayCommand<SelectionChangedEventArgs> SwitchDemoCmd => new(SwitchDemo);
|
||||||
new Lazy<RelayCommand<SelectionChangedEventArgs>>(() =>
|
|
||||||
new RelayCommand<SelectionChangedEventArgs>(SwitchDemo)).Value;
|
|
||||||
|
|
||||||
public RelayCommand OpenPracticalDemoCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenPracticalDemoCmd => new(OpenPracticalDemo);
|
||||||
new RelayCommand(OpenPracticalDemo)).Value;
|
|
||||||
|
|
||||||
public RelayCommand GlobalShortcutInfoCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand GlobalShortcutInfoCmd => new(() => Growl.Info("Global Shortcut Info"));
|
||||||
new RelayCommand(() => Growl.Info("Global Shortcut Info"))).Value;
|
|
||||||
|
|
||||||
public RelayCommand GlobalShortcutWarningCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand GlobalShortcutWarningCmd => new(() => Growl.Warning("Global Shortcut Warning"));
|
||||||
new RelayCommand(() => Growl.Warning("Global Shortcut Warning"))).Value;
|
|
||||||
|
|
||||||
public RelayCommand OpenDocCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenDocCmd => new(() =>
|
||||||
new RelayCommand(() =>
|
{
|
||||||
{
|
ControlCommands.OpenLink.Execute(_dataService.GetDemoUrl(DemoInfoCurrent, DemoItemCurrent));
|
||||||
ControlCommands.OpenLink.Execute(_dataService.GetDemoUrl(DemoInfoCurrent, DemoItemCurrent));
|
});
|
||||||
})).Value;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using GalaSoft.MvvmLight.Messaging;
|
using GalaSoft.MvvmLight.Messaging;
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
@@ -14,8 +13,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
VersionInfo = VersionHelper.GetVersion();
|
VersionInfo = VersionHelper.GetVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<string> OpenViewCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> OpenViewCmd => new(OpenView);
|
||||||
new RelayCommand<string>(OpenView)).Value;
|
|
||||||
|
|
||||||
private void OpenView(string viewName)
|
private void OpenView(string viewName)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public WindowDemoViewModel WindowDemo => SimpleIoc.Default.GetInstance<WindowDemoViewModel>();
|
public WindowDemoViewModel WindowDemo => SimpleIoc.Default.GetInstance<WindowDemoViewModel>();
|
||||||
|
|
||||||
public ItemsDisplayViewModel ContributorsView => new ItemsDisplayViewModel(SimpleIoc.Default.GetInstance<DataService>().GetContributorDataList);
|
public ItemsDisplayViewModel ContributorsView => new(SimpleIoc.Default.GetInstance<DataService>().GetContributorDataList);
|
||||||
|
|
||||||
public ItemsDisplayViewModel BlogsView => SimpleIoc.Default.GetInstance<ItemsDisplayViewModel>("Blogs");
|
public ItemsDisplayViewModel BlogsView => SimpleIoc.Default.GetInstance<ItemsDisplayViewModel>("Blogs");
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public PaginationDemoViewModel PaginationDemo => SimpleIoc.Default.GetInstance<PaginationDemoViewModel>();
|
public PaginationDemoViewModel PaginationDemo => SimpleIoc.Default.GetInstance<PaginationDemoViewModel>();
|
||||||
|
|
||||||
public ChatBoxViewModel ChatBox => new ChatBoxViewModel();
|
public ChatBoxViewModel ChatBox => new();
|
||||||
|
|
||||||
public CoverViewModel CoverView => SimpleIoc.Default.GetInstance<CoverViewModel>();
|
public CoverViewModel CoverView => SimpleIoc.Default.GetInstance<CoverViewModel>();
|
||||||
|
|
||||||
@@ -86,11 +86,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public SideMenuDemoViewModel SideMenuDemo => SimpleIoc.Default.GetInstance<SideMenuDemoViewModel>();
|
public SideMenuDemoViewModel SideMenuDemo => SimpleIoc.Default.GetInstance<SideMenuDemoViewModel>();
|
||||||
|
|
||||||
public TabControlDemoViewModel TabControlDemo => new TabControlDemoViewModel(SimpleIoc.Default.GetInstance<DataService>());
|
public TabControlDemoViewModel TabControlDemo => new(SimpleIoc.Default.GetInstance<DataService>());
|
||||||
|
|
||||||
public NonClientAreaViewModel NoUser => SimpleIoc.Default.GetInstance<NonClientAreaViewModel>();
|
public NonClientAreaViewModel NoUser => SimpleIoc.Default.GetInstance<NonClientAreaViewModel>();
|
||||||
|
|
||||||
public CardDemoViewModel CardDemo => new CardDemoViewModel(SimpleIoc.Default.GetInstance<DataService>());
|
public CardDemoViewModel CardDemo => new(SimpleIoc.Default.GetInstance<DataService>());
|
||||||
|
|
||||||
public SpriteDemoViewModel SpriteDemo => SimpleIoc.Default.GetInstance<SpriteDemoViewModel>();
|
public SpriteDemoViewModel SpriteDemo => SimpleIoc.Default.GetInstance<SpriteDemoViewModel>();
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public SplitButtonDemoViewModel SplitButtonDemo => SimpleIoc.Default.GetInstance<SplitButtonDemoViewModel>();
|
public SplitButtonDemoViewModel SplitButtonDemo => SimpleIoc.Default.GetInstance<SplitButtonDemoViewModel>();
|
||||||
|
|
||||||
public TagDemoViewModel TagDemo => new TagDemoViewModel(SimpleIoc.Default.GetInstance<DataService>());
|
public TagDemoViewModel TagDemo => new(SimpleIoc.Default.GetInstance<DataService>());
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace HandyControl.Collections
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class ManualObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged
|
public class ManualObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
private readonly SimpleMonitor _monitor = new SimpleMonitor();
|
private readonly SimpleMonitor _monitor = new();
|
||||||
|
|
||||||
private const string CountString = "Count";
|
private const string CountString = "Count";
|
||||||
|
|
||||||
|
|||||||
@@ -258,50 +258,45 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnShowRowNumberChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
|
private static void OnShowRowNumberChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(target is DataGrid dataGrid)) return;
|
if (target is not DataGrid dataGrid) return;
|
||||||
var show = (bool) e.NewValue;
|
var show = (bool) e.NewValue;
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
{
|
{
|
||||||
dataGrid.LoadingRow += DataGrid_LoadingRow;
|
dataGrid.LoadingRow += DataGrid_LoadingRow;
|
||||||
dataGrid.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
|
dataGrid.ItemContainerGenerator.ItemsChanged += ItemContainerGeneratorItemsChanged;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dataGrid.LoadingRow -= DataGrid_LoadingRow;
|
dataGrid.LoadingRow -= DataGrid_LoadingRow;
|
||||||
dataGrid.ItemContainerGenerator.ItemsChanged -= ItemContainerGenerator_ItemsChanged;
|
dataGrid.ItemContainerGenerator.ItemsChanged -= ItemContainerGeneratorItemsChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateItems(dataGrid.ItemContainerGenerator, dataGrid.Items.Count, show);
|
void ItemContainerGeneratorItemsChanged(object sender, ItemsChangedEventArgs e)
|
||||||
}
|
|
||||||
|
|
||||||
private static void ItemContainerGenerator_ItemsChanged(object sender, ItemsChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (!(sender is ItemContainerGenerator generator)) return;
|
|
||||||
UpdateItems(generator, e.ItemCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void UpdateItems(ItemContainerGenerator generator, int itemsCount, bool show = true)
|
|
||||||
{
|
|
||||||
if (show)
|
|
||||||
{
|
{
|
||||||
for (var i = 0; i < itemsCount; i++)
|
var generator = dataGrid.ItemContainerGenerator;
|
||||||
|
var itemsCount = dataGrid.Items.Count;
|
||||||
|
|
||||||
|
if (show)
|
||||||
{
|
{
|
||||||
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
for (var i = 0; i < itemsCount; i++)
|
||||||
if (row != null)
|
|
||||||
{
|
{
|
||||||
row.Header = (i + 1).ToString();
|
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
||||||
|
if (row != null)
|
||||||
|
{
|
||||||
|
row.Header = (i + 1).ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
|
||||||
{
|
|
||||||
for (var i = 0; i < itemsCount; i++)
|
|
||||||
{
|
{
|
||||||
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
for (var i = 0; i < itemsCount; i++)
|
||||||
if (row != null)
|
|
||||||
{
|
{
|
||||||
row.Header = null;
|
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
||||||
|
if (row != null)
|
||||||
|
{
|
||||||
|
row.Header = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +332,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void SetCanUnselectAllWithBlankArea(DependencyObject element, bool value)
|
public static void SetCanUnselectAllWithBlankArea(DependencyObject element, bool value)
|
||||||
=> element.SetValue(CanUnselectAllWithBlankAreaProperty, value);
|
=> element.SetValue(CanUnselectAllWithBlankAreaProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetCanUnselectAllWithBlankArea(DependencyObject element)
|
public static bool GetCanUnselectAllWithBlankArea(DependencyObject element)
|
||||||
=> (bool) element.GetValue(CanUnselectAllWithBlankAreaProperty);
|
=> (bool) element.GetValue(CanUnselectAllWithBlankAreaProperty);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace HandyControl.Controls
|
|||||||
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
|
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
|
||||||
|
|
||||||
public static void SetAutoWidth(DependencyObject element, bool value)
|
public static void SetAutoWidth(DependencyObject element, bool value)
|
||||||
=> element.SetValue(AutoWidthProperty, value);
|
=> element.SetValue(AutoWidthProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetAutoWidth(DependencyObject element)
|
public static bool GetAutoWidth(DependencyObject element)
|
||||||
=> (bool) element.GetValue(AutoWidthProperty);
|
=> (bool) element.GetValue(AutoWidthProperty);
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
public class GridAttach
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty NameProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"Name", typeof(string), typeof(GridAttach), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public static void SetName(DependencyObject element, string value)
|
||||||
|
=> element.SetValue(NameProperty, value);
|
||||||
|
|
||||||
|
public static string GetName(DependencyObject element)
|
||||||
|
=> (string) element.GetValue(NameProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty RowNameProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"RowName", typeof(string), typeof(GridAttach), new PropertyMetadata(default(string), OnRowNameChanged));
|
||||||
|
|
||||||
|
private static void OnRowNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (d is FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
if (e.NewValue is string rowName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(rowName))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frameworkElement.Parent is Grid grid)
|
||||||
|
{
|
||||||
|
for (var i = 0; i < grid.RowDefinitions.Count; i++)
|
||||||
|
{
|
||||||
|
var gridRowDefinition = grid.RowDefinitions[i];
|
||||||
|
var gridRowName = GetName(gridRowDefinition);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(gridRowName) &&
|
||||||
|
gridRowName.Equals(rowName, StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
Grid.SetRow(frameworkElement, i);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetRowName(DependencyObject element, string value)
|
||||||
|
=> element.SetValue(RowNameProperty, value);
|
||||||
|
|
||||||
|
public static string GetRowName(DependencyObject element)
|
||||||
|
=> (string) element.GetValue(RowNameProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty ColumnNameProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"ColumnName", typeof(string), typeof(GridAttach), new PropertyMetadata(default(string), OnColumnNameChanged));
|
||||||
|
|
||||||
|
private static void OnColumnNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (d is FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
if (e.NewValue is string columnName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(columnName))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frameworkElement.Parent is Grid grid)
|
||||||
|
{
|
||||||
|
for (var i = 0; i < grid.ColumnDefinitions.Count; i++)
|
||||||
|
{
|
||||||
|
var gridColumnDefinition = grid.ColumnDefinitions[i];
|
||||||
|
var gridColumnName = GetName(gridColumnDefinition);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(gridColumnName) &&
|
||||||
|
gridColumnName.Equals(columnName, StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
Grid.SetColumn(frameworkElement, i);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetColumnName(DependencyObject element, string value)
|
||||||
|
=> element.SetValue(ColumnNameProperty, value);
|
||||||
|
|
||||||
|
public static string GetColumnName(DependencyObject element)
|
||||||
|
=> (string) element.GetValue(ColumnNameProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,13 +16,10 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
var topLine = (FrameworkElement) d;
|
var topLine = (FrameworkElement) d;
|
||||||
|
|
||||||
if (e.NewValue is Popup popup)
|
if (e.NewValue is Popup { TemplatedParent: MenuItem menuItem })
|
||||||
{
|
{
|
||||||
if (popup.TemplatedParent is MenuItem menuItem)
|
SetTopLine(menuItem, topLine);
|
||||||
{
|
menuItem.Loaded += MenuItem_Loaded;
|
||||||
SetTopLine(menuItem, topLine);
|
|
||||||
menuItem.Loaded += MenuItem_Loaded;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using HandyControl.Data;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
public class ScrollViewerAttach
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty AutoHideProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AutoHide", typeof(bool), typeof(ScrollViewerAttach), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.Inherits));
|
||||||
|
|
||||||
|
public static void SetAutoHide(DependencyObject element, bool value)
|
||||||
|
=> element.SetValue(AutoHideProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAutoHide(DependencyObject element)
|
||||||
|
=> (bool) element.GetValue(AutoHideProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Media;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
|
using HandyControl.Tools.Helper;
|
||||||
|
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
@@ -15,13 +18,11 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if ((bool) e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
ctl.TextTrimming = TextTrimming.WordEllipsis;
|
|
||||||
UpdateTooltip(ctl);
|
UpdateTooltip(ctl);
|
||||||
ctl.SizeChanged += TextBlock_SizeChanged;
|
ctl.SizeChanged += TextBlock_SizeChanged;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ctl.ClearValue(TextBlock.TextTrimmingProperty);
|
|
||||||
ctl.SizeChanged -= TextBlock_SizeChanged;
|
ctl.SizeChanged -= TextBlock_SizeChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,8 +47,25 @@ namespace HandyControl.Controls
|
|||||||
textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
textBlock.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||||
var width = textBlock.DesiredSize.Width - textBlock.Margin.Left - textBlock.Margin.Right;
|
var width = textBlock.DesiredSize.Width - textBlock.Margin.Left - textBlock.Margin.Right;
|
||||||
|
|
||||||
ToolTipService.SetToolTip(textBlock,
|
// the code Math.Abs(CalcTextWidth(textBlock) - width) > 1 is not elegant end even bugly,
|
||||||
textBlock.RenderSize.Width > width || textBlock.ActualWidth < width ? textBlock.Text : null);
|
// while it does solve the problem of Tooltip failure in some cases
|
||||||
|
if (textBlock.RenderSize.Width > width || textBlock.ActualWidth < width || Math.Abs(CalcTextWidth(textBlock) - width) > 1)
|
||||||
|
{
|
||||||
|
ToolTipService.SetToolTip(textBlock, textBlock.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ToolTipService.SetToolTip(textBlock, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static double CalcTextWidth(TextBlock textBlock)
|
||||||
|
{
|
||||||
|
var formattedText = TextHelper.CreateFormattedText(textBlock.Text, textBlock.FlowDirection,
|
||||||
|
new Typeface(textBlock.FontFamily, textBlock.FontStyle, textBlock.FontWeight, textBlock.FontStretch),
|
||||||
|
textBlock.FontSize);
|
||||||
|
|
||||||
|
return formattedText.WidthIncludingTrailingWhitespace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void SetHideWhenClosing(DependencyObject element, bool value)
|
public static void SetHideWhenClosing(DependencyObject element, bool value)
|
||||||
=> element.SetValue(HideWhenClosingProperty, value);
|
=> element.SetValue(HideWhenClosingProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetHideWhenClosing(DependencyObject element)
|
public static bool GetHideWhenClosing(DependencyObject element)
|
||||||
=> (bool) element.GetValue(HideWhenClosingProperty);
|
=> (bool) element.GetValue(HideWhenClosingProperty);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnInstanceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnInstanceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(d is FrameworkElement target)) return;
|
if (d is not FrameworkElement target) return;
|
||||||
var element = (AdornerElement) e.NewValue;
|
var element = (AdornerElement) e.NewValue;
|
||||||
element.OnInstanceChanged(target);
|
element.OnInstanceChanged(target);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(d is UIElement target)) return;
|
if (d is not UIElement target) return;
|
||||||
|
|
||||||
target.PreviewMouseLeftButtonDown -= Target_PreviewMouseLeftButtonDown;
|
target.PreviewMouseLeftButtonDown -= Target_PreviewMouseLeftButtonDown;
|
||||||
target.PreviewMouseLeftButtonUp -= Target_PreviewMouseLeftButtonUp;
|
target.PreviewMouseLeftButtonUp -= Target_PreviewMouseLeftButtonUp;
|
||||||
|
|||||||
@@ -60,6 +60,6 @@ namespace HandyControl.Controls
|
|||||||
return mySize;
|
return mySize;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Size ConvertThickness2Size(Thickness th) => new Size(th.Left + th.Right, th.Top + th.Bottom);
|
private static Size ConvertThickness2Size(Thickness th) => new(th.Left + th.Right, th.Top + th.Bottom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,9 +44,9 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private DispatcherTimer _updateTimer;
|
private DispatcherTimer _updateTimer;
|
||||||
|
|
||||||
private readonly List<double> _widthList = new List<double>();
|
private readonly List<double> _widthList = new();
|
||||||
|
|
||||||
private readonly Dictionary<object, CarouselItem> _entryDic = new Dictionary<object, CarouselItem>();
|
private readonly Dictionary<object, CarouselItem> _entryDic = new();
|
||||||
|
|
||||||
private bool _isRefresh;
|
private bool _isRefresh;
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 预设的颜色(一共18个,两行)
|
/// 预设的颜色(一共18个,两行)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly List<string> _colorPresetList = new List<string>
|
private readonly List<string> _colorPresetList = new()
|
||||||
{
|
{
|
||||||
"#f44336",
|
"#f44336",
|
||||||
"#e91e63",
|
"#e91e63",
|
||||||
@@ -127,7 +127,7 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 颜色范围集合
|
/// 颜色范围集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly List<ColorRange> _colorRangeList = new List<ColorRange>
|
private readonly List<ColorRange> _colorRangeList = new()
|
||||||
{
|
{
|
||||||
new ColorRange
|
new ColorRange
|
||||||
{
|
{
|
||||||
@@ -164,7 +164,7 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 颜色分隔集合
|
/// 颜色分隔集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly List<Color> _colorSeparateList = new List<Color>
|
private readonly List<Color> _colorSeparateList = new()
|
||||||
{
|
{
|
||||||
Color.FromRgb(255, 0, 0),
|
Color.FromRgb(255, 0, 0),
|
||||||
Color.FromRgb(255, 0, 255),
|
Color.FromRgb(255, 0, 255),
|
||||||
@@ -469,7 +469,7 @@ namespace HandyControl.Controls
|
|||||||
var button = new Button
|
var button = new Button
|
||||||
{
|
{
|
||||||
Margin = new Thickness(6),
|
Margin = new Thickness(6),
|
||||||
Style = ResourceHelper.GetResource<Style>(ResourceToken.ButtonCustom),
|
Style = ResourceHelper.GetResourceInternal<Style>(ResourceToken.ButtonCustom),
|
||||||
Content = new Border
|
Content = new Border
|
||||||
{
|
{
|
||||||
Background = brush,
|
Background = brush,
|
||||||
@@ -549,7 +549,7 @@ namespace HandyControl.Controls
|
|||||||
var cIndex = _colorSeparateList.IndexOf(Color.FromRgb(list[0], list[1], list[2]));
|
var cIndex = _colorSeparateList.IndexOf(Color.FromRgb(list[0], list[1], list[2]));
|
||||||
int sub;
|
int sub;
|
||||||
var direc = 0;
|
var direc = 0;
|
||||||
if (cIndex < 5 && cIndex > 0)
|
if (cIndex is < 5 and > 0)
|
||||||
{
|
{
|
||||||
var nextColorList = _colorSeparateList[cIndex + 1].ToList();
|
var nextColorList = _colorSeparateList[cIndex + 1].ToList();
|
||||||
var prevColorList = _colorSeparateList[cIndex - 1].ToList();
|
var prevColorList = _colorSeparateList[cIndex - 1].ToList();
|
||||||
@@ -680,29 +680,18 @@ namespace HandyControl.Controls
|
|||||||
private void NumericUpDownRgb_OnValueChanged(object sender, FunctionEventArgs<double> e)
|
private void NumericUpDownRgb_OnValueChanged(object sender, FunctionEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||||
if (e.OriginalSource is NumericUpDown ctl && ctl.Tag is string tag)
|
if (e.OriginalSource is NumericUpDown { Tag: string tag })
|
||||||
{
|
{
|
||||||
var color = SelectedBrush.Color;
|
var color = SelectedBrush.Color;
|
||||||
IsNeedUpdateInfo = false;
|
IsNeedUpdateInfo = false;
|
||||||
|
|
||||||
switch (tag)
|
SelectedBrush = tag switch
|
||||||
{
|
{
|
||||||
case "R":
|
"R" => new SolidColorBrush(Color.FromArgb(color.A, (byte) e.Info, color.G, color.B)),
|
||||||
{
|
"G" => new SolidColorBrush(Color.FromArgb(color.A, color.R, (byte) e.Info, color.B)),
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, (byte) e.Info, color.G, color.B));
|
"B" => new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, (byte) e.Info)),
|
||||||
break;
|
_ => SelectedBrush
|
||||||
}
|
};
|
||||||
case "G":
|
|
||||||
{
|
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, (byte) e.Info, color.B));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "B":
|
|
||||||
{
|
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, (byte) e.Info));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IsNeedUpdateInfo = true;
|
IsNeedUpdateInfo = true;
|
||||||
}
|
}
|
||||||
@@ -722,10 +711,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void ToggleButtonDropper_Click(object sender, RoutedEventArgs e)
|
private void ToggleButtonDropper_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (_colorDropper == null)
|
_colorDropper ??= new ColorDropper(this);
|
||||||
{
|
|
||||||
_colorDropper = new ColorDropper(this);
|
|
||||||
}
|
|
||||||
// ReSharper disable once PossibleInvalidOperationException
|
// ReSharper disable once PossibleInvalidOperationException
|
||||||
_colorDropper.Update(_toggleButtonDropper.IsChecked.Value);
|
_colorDropper.Update(_toggleButtonDropper.IsChecked.Value);
|
||||||
}
|
}
|
||||||
@@ -748,6 +734,6 @@ namespace HandyControl.Controls
|
|||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanDispose { get; } = true;
|
public bool CanDispose => true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,12 +69,12 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 存储所有的内容
|
/// 存储所有的内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<int, object> _contentDic = new Dictionary<int, object>();
|
private readonly Dictionary<int, object> _contentDic = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前在显示范围内的项
|
/// 当前在显示范围内的项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<int, CoverFlowItem> _itemShowDic = new Dictionary<int, CoverFlowItem>();
|
private readonly Dictionary<int, CoverFlowItem> _itemShowDic = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 相机
|
/// 相机
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
var textureCoordinates = new PointCollection
|
var textureCoordinates = new PointCollection
|
||||||
{
|
{
|
||||||
new Point(0, 1),
|
new(0, 1),
|
||||||
new Point(1, 1),
|
new(1, 1),
|
||||||
new Point(1, 0),
|
new(1, 0),
|
||||||
new Point(0, 0),
|
new(0, 0),
|
||||||
new Point(1, 0),
|
new(1, 0),
|
||||||
new Point(1, 1)
|
new(1, 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
var normals = new Vector3DCollection
|
var normals = new Vector3DCollection
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private IEnumerable _itemsSourceInternal;
|
private IEnumerable _itemsSourceInternal;
|
||||||
|
|
||||||
private readonly Dictionary<object, CoverViewItem> _entryDic = new Dictionary<object, CoverViewItem>();
|
private readonly Dictionary<object, CoverViewItem> _entryDic = new();
|
||||||
|
|
||||||
private bool _isRefresh;
|
private bool _isRefresh;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private AdornerContainer _container;
|
private AdornerContainer _container;
|
||||||
|
|
||||||
private static readonly Dictionary<string, FrameworkElement> ContainerDic = new Dictionary<string, FrameworkElement>();
|
private static readonly Dictionary<string, FrameworkElement> ContainerDic = new();
|
||||||
|
|
||||||
public static readonly DependencyProperty IsClosedProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IsClosedProperty = DependencyProperty.Register(
|
||||||
"IsClosed", typeof(bool), typeof(Dialog), new PropertyMetadata(ValueBoxes.FalseBox));
|
"IsClosed", typeof(bool), typeof(Dialog), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Documents;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
@@ -25,7 +26,9 @@ namespace HandyControl.Controls
|
|||||||
#region Constants
|
#region Constants
|
||||||
|
|
||||||
private const string ElementPanelMore = "PART_PanelMore";
|
private const string ElementPanelMore = "PART_PanelMore";
|
||||||
|
|
||||||
private const string ElementGridMain = "PART_GridMain";
|
private const string ElementGridMain = "PART_GridMain";
|
||||||
|
|
||||||
private const string ElementButtonClose = "PART_ButtonClose";
|
private const string ElementButtonClose = "PART_ButtonClose";
|
||||||
|
|
||||||
#endregion Constants
|
#endregion Constants
|
||||||
@@ -56,7 +59,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private DispatcherTimer _timerClose;
|
private DispatcherTimer _timerClose;
|
||||||
|
|
||||||
private static readonly Dictionary<string, Panel> PanelDic = new Dictionary<string, Panel>();
|
private static readonly Dictionary<string, Panel> PanelDic = new();
|
||||||
|
|
||||||
#endregion Data
|
#endregion Data
|
||||||
|
|
||||||
@@ -176,15 +179,6 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
|
||||||
"Type", typeof(InfoType), typeof(Growl), new PropertyMetadata(default(InfoType)));
|
"Type", typeof(InfoType), typeof(Growl), new PropertyMetadata(default(InfoType)));
|
||||||
|
|
||||||
public static readonly DependencyProperty GrowlParentProperty = DependencyProperty.RegisterAttached(
|
|
||||||
"GrowlParent", typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
|
|
||||||
{
|
|
||||||
if ((bool) args.NewValue && o is Panel panel)
|
|
||||||
{
|
|
||||||
SetGrowlPanel(panel);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
public static readonly DependencyProperty TokenProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty TokenProperty = DependencyProperty.RegisterAttached(
|
||||||
"Token", typeof(string), typeof(Growl), new PropertyMetadata(default(string), OnTokenChanged));
|
"Token", typeof(string), typeof(Growl), new PropertyMetadata(default(string), OnTokenChanged));
|
||||||
|
|
||||||
@@ -209,10 +203,28 @@ namespace HandyControl.Controls
|
|||||||
public static string GetToken(DependencyObject element)
|
public static string GetToken(DependencyObject element)
|
||||||
=> (string) element.GetValue(TokenProperty);
|
=> (string) element.GetValue(TokenProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty GrowlParentProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"GrowlParent", typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
|
||||||
|
{
|
||||||
|
if ((bool) args.NewValue && o is Panel panel)
|
||||||
|
{
|
||||||
|
SetGrowlPanel(panel);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
public static void SetGrowlParent(DependencyObject element, bool value) => element.SetValue(GrowlParentProperty, ValueBoxes.BooleanBox(value));
|
public static void SetGrowlParent(DependencyObject element, bool value) => element.SetValue(GrowlParentProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetGrowlParent(DependencyObject element) => (bool) element.GetValue(GrowlParentProperty);
|
public static bool GetGrowlParent(DependencyObject element) => (bool) element.GetValue(GrowlParentProperty);
|
||||||
|
|
||||||
|
private static readonly DependencyProperty IsCreatedAutomaticallyProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"IsCreatedAutomatically", typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||||
|
|
||||||
|
private static void SetIsCreatedAutomatically(DependencyObject element, bool value)
|
||||||
|
=> element.SetValue(IsCreatedAutomaticallyProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
|
private static bool GetIsCreatedAutomatically(DependencyObject element)
|
||||||
|
=> (bool) element.GetValue(IsCreatedAutomaticallyProperty);
|
||||||
|
|
||||||
public InfoType Type
|
public InfoType Type
|
||||||
{
|
{
|
||||||
get => (InfoType) GetValue(TypeProperty);
|
get => (InfoType) GetValue(TypeProperty);
|
||||||
@@ -316,7 +328,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PanelElement.SetFluidMoveBehavior(panel, ResourceHelper.GetResource<FluidMoveBehavior>(ResourceToken.BehaviorXY400));
|
PanelElement.SetFluidMoveBehavior(panel, ResourceHelper.GetResourceInternal<FluidMoveBehavior>(ResourceToken.BehaviorXY400));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
@@ -331,7 +343,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
var transform = new TranslateTransform
|
var transform = new TranslateTransform
|
||||||
{
|
{
|
||||||
X = MaxWidth
|
X = FlowDirection == FlowDirection.LeftToRight ? MaxWidth : -MaxWidth
|
||||||
};
|
};
|
||||||
_gridMain.RenderTransform = transform;
|
_gridMain.RenderTransform = transform;
|
||||||
transform.BeginAnimation(TranslateTransform.XProperty, AnimationHelper.CreateAnimation(0));
|
transform.BeginAnimation(TranslateTransform.XProperty, AnimationHelper.CreateAnimation(0));
|
||||||
@@ -340,28 +352,28 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void ShowGlobal(GrowlInfo growlInfo)
|
private static void ShowGlobal(GrowlInfo growlInfo)
|
||||||
{
|
{
|
||||||
if (GrowlWindow == null)
|
|
||||||
{
|
|
||||||
GrowlWindow = new GrowlWindow();
|
|
||||||
GrowlWindow.Show();
|
|
||||||
InitGrowlPanel(GrowlWindow.GrowlPanel);
|
|
||||||
GrowlWindow.Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
GrowlWindow.Show(true);
|
|
||||||
|
|
||||||
Application.Current.Dispatcher?.Invoke(
|
Application.Current.Dispatcher?.Invoke(
|
||||||
#if NET40
|
#if NET40
|
||||||
new Action(
|
new Action(
|
||||||
#endif
|
#endif
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
|
if (GrowlWindow == null)
|
||||||
|
{
|
||||||
|
GrowlWindow = new GrowlWindow();
|
||||||
|
GrowlWindow.Show();
|
||||||
|
InitGrowlPanel(GrowlWindow.GrowlPanel);
|
||||||
|
GrowlWindow.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
GrowlWindow.Show(true);
|
||||||
|
|
||||||
var ctl = new Growl
|
var ctl = new Growl
|
||||||
{
|
{
|
||||||
Message = growlInfo.Message,
|
Message = growlInfo.Message,
|
||||||
Time = DateTime.Now,
|
Time = DateTime.Now,
|
||||||
Icon = ResourceHelper.GetResource<Geometry>(growlInfo.IconKey),
|
Icon = ResourceHelper.GetResourceInternal<Geometry>(growlInfo.IconKey),
|
||||||
IconBrush = ResourceHelper.GetResource<Brush>(growlInfo.IconBrushKey),
|
IconBrush = ResourceHelper.GetResourceInternal<Brush>(growlInfo.IconBrushKey),
|
||||||
_showCloseButton = growlInfo.ShowCloseButton,
|
_showCloseButton = growlInfo.ShowCloseButton,
|
||||||
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
||||||
_staysOpen = growlInfo.StaysOpen,
|
_staysOpen = growlInfo.StaysOpen,
|
||||||
@@ -369,7 +381,8 @@ namespace HandyControl.Controls
|
|||||||
ConfirmStr = growlInfo.ConfirmStr,
|
ConfirmStr = growlInfo.ConfirmStr,
|
||||||
CancelStr = growlInfo.CancelStr,
|
CancelStr = growlInfo.CancelStr,
|
||||||
Type = growlInfo.Type,
|
Type = growlInfo.Type,
|
||||||
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
_waitTime = Math.Max(growlInfo.WaitTime, 2),
|
||||||
|
FlowDirection = growlInfo.FlowDirection
|
||||||
};
|
};
|
||||||
GrowlWindow.GrowlPanel.Children.Insert(0, ctl);
|
GrowlWindow.GrowlPanel.Children.Insert(0, ctl);
|
||||||
}
|
}
|
||||||
@@ -395,8 +408,8 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
Message = growlInfo.Message,
|
Message = growlInfo.Message,
|
||||||
Time = DateTime.Now,
|
Time = DateTime.Now,
|
||||||
Icon = ResourceHelper.GetResource<Geometry>(growlInfo.IconKey),
|
Icon = ResourceHelper.GetResourceInternal<Geometry>(growlInfo.IconKey),
|
||||||
IconBrush = ResourceHelper.GetResource<Brush>(growlInfo.IconBrushKey),
|
IconBrush = ResourceHelper.GetResourceInternal<Brush>(growlInfo.IconBrushKey),
|
||||||
_showCloseButton = growlInfo.ShowCloseButton,
|
_showCloseButton = growlInfo.ShowCloseButton,
|
||||||
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
ActionBeforeClose = growlInfo.ActionBeforeClose,
|
||||||
_staysOpen = growlInfo.StaysOpen,
|
_staysOpen = growlInfo.StaysOpen,
|
||||||
@@ -406,6 +419,7 @@ namespace HandyControl.Controls
|
|||||||
Type = growlInfo.Type,
|
Type = growlInfo.Type,
|
||||||
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
_waitTime = Math.Max(growlInfo.WaitTime, 2)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(growlInfo.Token))
|
if (!string.IsNullOrEmpty(growlInfo.Token))
|
||||||
{
|
{
|
||||||
if (PanelDic.TryGetValue(growlInfo.Token, out var panel))
|
if (PanelDic.TryGetValue(growlInfo.Token, out var panel))
|
||||||
@@ -415,6 +429,8 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// GrowlPanel is null, we create it automatically
|
||||||
|
GrowlPanel ??= CreateDefaultPanel();
|
||||||
GrowlPanel?.Children.Insert(0, ctl);
|
GrowlPanel?.Children.Insert(0, ctl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -424,6 +440,64 @@ namespace HandyControl.Controls
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Panel CreateDefaultPanel()
|
||||||
|
{
|
||||||
|
FrameworkElement element = WindowHelper.GetActiveWindow();
|
||||||
|
var decorator = VisualHelper.GetChild<AdornerDecorator>(element);
|
||||||
|
|
||||||
|
if (decorator != null)
|
||||||
|
{
|
||||||
|
var layer = decorator.AdornerLayer;
|
||||||
|
if (layer != null)
|
||||||
|
{
|
||||||
|
var panel = new StackPanel
|
||||||
|
{
|
||||||
|
VerticalAlignment = VerticalAlignment.Top
|
||||||
|
};
|
||||||
|
|
||||||
|
InitGrowlPanel(panel);
|
||||||
|
SetIsCreatedAutomatically(panel, true);
|
||||||
|
|
||||||
|
var scrollViewer = new ScrollViewer
|
||||||
|
{
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Right,
|
||||||
|
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
|
||||||
|
IsInertiaEnabled = true,
|
||||||
|
IsPenetrating = true,
|
||||||
|
Content = panel
|
||||||
|
};
|
||||||
|
|
||||||
|
var container = new AdornerContainer(layer)
|
||||||
|
{
|
||||||
|
Child = scrollViewer
|
||||||
|
};
|
||||||
|
|
||||||
|
layer.Add(container);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void RemoveDefaultPanel(Panel panel)
|
||||||
|
{
|
||||||
|
FrameworkElement element = WindowHelper.GetActiveWindow();
|
||||||
|
var decorator = VisualHelper.GetChild<AdornerDecorator>(element);
|
||||||
|
|
||||||
|
if (decorator != null)
|
||||||
|
{
|
||||||
|
var layer = decorator.AdornerLayer;
|
||||||
|
var adorner = VisualHelper.GetParent<Adorner>(panel);
|
||||||
|
|
||||||
|
if (adorner != null)
|
||||||
|
{
|
||||||
|
layer?.Remove(adorner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void InitGrowlInfo(ref GrowlInfo growlInfo, InfoType infoType)
|
private static void InitGrowlInfo(ref GrowlInfo growlInfo, InfoType infoType)
|
||||||
{
|
{
|
||||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||||
@@ -487,18 +561,6 @@ namespace HandyControl.Controls
|
|||||||
growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
|
growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
|
||||||
growlInfo.StaysOpen = true;
|
growlInfo.StaysOpen = true;
|
||||||
growlInfo.ShowCloseButton = false;
|
growlInfo.ShowCloseButton = false;
|
||||||
Application.Current.Dispatcher?.Invoke(
|
|
||||||
#if NET40
|
|
||||||
new Action(
|
|
||||||
#endif
|
|
||||||
() =>
|
|
||||||
{
|
|
||||||
if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
|
|
||||||
}
|
|
||||||
#if NET40
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -769,7 +831,7 @@ namespace HandyControl.Controls
|
|||||||
ShowGlobal(growlInfo);
|
ShowGlobal(growlInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonClose_OnClick(object sender, RoutedEventArgs e) => Close();
|
private void ButtonClose_OnClick(object sender, RoutedEventArgs e) => Close(true, false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭
|
/// 关闭
|
||||||
@@ -784,17 +846,29 @@ namespace HandyControl.Controls
|
|||||||
_timerClose?.Stop();
|
_timerClose?.Stop();
|
||||||
var transform = new TranslateTransform();
|
var transform = new TranslateTransform();
|
||||||
_gridMain.RenderTransform = transform;
|
_gridMain.RenderTransform = transform;
|
||||||
var animation = AnimationHelper.CreateAnimation(ActualWidth);
|
var animation = AnimationHelper.CreateAnimation(FlowDirection == FlowDirection.LeftToRight ? ActualWidth : -ActualWidth);
|
||||||
animation.Completed += (s, e) =>
|
animation.Completed += (s, e) =>
|
||||||
{
|
{
|
||||||
if (Parent is Panel panel)
|
if (Parent is Panel panel)
|
||||||
{
|
{
|
||||||
panel.Children.Remove(this);
|
panel.Children.Remove(this);
|
||||||
|
|
||||||
if (GrowlWindow?.GrowlPanel != null && GrowlWindow.GrowlPanel.Children.Count == 0)
|
if (GrowlWindow != null)
|
||||||
{
|
{
|
||||||
GrowlWindow.Close();
|
if (GrowlWindow.GrowlPanel != null && GrowlWindow.GrowlPanel.Children.Count == 0)
|
||||||
GrowlWindow = null;
|
{
|
||||||
|
GrowlWindow.Close();
|
||||||
|
GrowlWindow = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (GrowlPanel != null && GrowlPanel.Children.Count == 0 && GetIsCreatedAutomatically(GrowlPanel))
|
||||||
|
{
|
||||||
|
// If the count of children is zero, we need to remove the panel, provided that the panel was created automatically
|
||||||
|
RemoveDefaultPanel(GrowlPanel);
|
||||||
|
GrowlPanel = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -824,16 +898,7 @@ namespace HandyControl.Controls
|
|||||||
/// 清除
|
/// 清除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="panel"></param>
|
/// <param name="panel"></param>
|
||||||
private static void Clear(Panel panel)
|
private static void Clear(Panel panel) => panel?.Children.Clear();
|
||||||
{
|
|
||||||
if (panel == null) return;
|
|
||||||
panel.Children.Clear();
|
|
||||||
if (panel.ContextMenu != null)
|
|
||||||
{
|
|
||||||
panel.ContextMenu.IsOpen = false;
|
|
||||||
panel.ContextMenu.Opacity = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清除
|
/// 清除
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
GrowlPanel = new StackPanel
|
GrowlPanel = new StackPanel
|
||||||
{
|
{
|
||||||
VerticalAlignment = VerticalAlignment.Top,
|
VerticalAlignment = VerticalAlignment.Top
|
||||||
Margin = new Thickness(0, 10, 10, 10)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Content = new ScrollViewer
|
Content = new ScrollViewer
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public class GifImage : Image, IDisposable
|
public class GifImage : Image, IDisposable
|
||||||
{
|
{
|
||||||
private static readonly Guid GifGuid = new Guid("{b96b3caa-0728-11d3-9d7b-0000f81ef32e}");
|
private static readonly Guid GifGuid = new("{b96b3caa-0728-11d3-9d7b-0000f81ef32e}");
|
||||||
|
|
||||||
private static readonly Guid GifSingleFrameGuid = new Guid("{b96b3cb0-0728-11d3-9d7b-0000f81ef32e}");
|
private static readonly Guid GifSingleFrameGuid = new("{b96b3cb0-0728-11d3-9d7b-0000f81ef32e}");
|
||||||
|
|
||||||
internal IntPtr NativeImage;
|
internal IntPtr NativeImage;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图片保存对话框
|
/// 图片保存对话框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly SaveFileDialog SaveFileDialog = new SaveFileDialog
|
private static readonly SaveFileDialog SaveFileDialog = new()
|
||||||
{
|
{
|
||||||
Filter = $"{Lang.PngImg}|*.png"
|
Filter = $"{Lang.PngImg}|*.png"
|
||||||
};
|
};
|
||||||
@@ -160,6 +160,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private DispatcherTimer _dispatcher;
|
private DispatcherTimer _dispatcher;
|
||||||
|
|
||||||
|
private bool _isLoaded;
|
||||||
|
|
||||||
#endregion Data
|
#endregion Data
|
||||||
|
|
||||||
#region ctor
|
#region ctor
|
||||||
@@ -174,7 +176,11 @@ namespace HandyControl.Controls
|
|||||||
CommandBindings.Add(new CommandBinding(ControlCommands.RotateLeft, ButtonRotateLeft_OnClick));
|
CommandBindings.Add(new CommandBinding(ControlCommands.RotateLeft, ButtonRotateLeft_OnClick));
|
||||||
CommandBindings.Add(new CommandBinding(ControlCommands.RotateRight, ButtonRotateRight_OnClick));
|
CommandBindings.Add(new CommandBinding(ControlCommands.RotateRight, ButtonRotateRight_OnClick));
|
||||||
|
|
||||||
Loaded += (s, e) => Init();
|
Loaded += (s, e) =>
|
||||||
|
{
|
||||||
|
_isLoaded = true;
|
||||||
|
Init();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -445,7 +451,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
if (ImageSource == null || !IsLoaded) return;
|
if (ImageSource == null || !_isLoaded) return;
|
||||||
|
|
||||||
if (ImageSource.IsDownloading)
|
if (ImageSource.IsDownloading)
|
||||||
{
|
{
|
||||||
@@ -464,13 +470,13 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
if (!_isOblique)
|
if (!_isOblique)
|
||||||
{
|
{
|
||||||
width = ImageSource.Width;
|
width = ImageSource.PixelWidth;
|
||||||
height = ImageSource.Height;
|
height = ImageSource.PixelHeight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
width = ImageSource.Height;
|
width = ImageSource.PixelHeight;
|
||||||
height = ImageSource.Width;
|
height = ImageSource.PixelWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageWidth = width;
|
ImageWidth = width;
|
||||||
@@ -514,7 +520,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (_dispatcher == null) return;
|
if (_dispatcher == null) return;
|
||||||
|
|
||||||
if (ImageSource == null || !IsLoaded)
|
if (ImageSource == null || !_isLoaded)
|
||||||
{
|
{
|
||||||
_dispatcher.Stop();
|
_dispatcher.Stop();
|
||||||
_dispatcher.Tick -= Dispatcher_Tick;
|
_dispatcher.Tick -= Dispatcher_Tick;
|
||||||
|
|||||||
@@ -116,7 +116,15 @@ namespace HandyControl.Controls
|
|||||||
public CheckComboBox()
|
public CheckComboBox()
|
||||||
{
|
{
|
||||||
AddHandler(Controls.Tag.ClosedEvent, new RoutedEventHandler(Tags_OnClosed));
|
AddHandler(Controls.Tag.ClosedEvent, new RoutedEventHandler(Tags_OnClosed));
|
||||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) => SelectedItems.Clear()));
|
|
||||||
|
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||||
|
{
|
||||||
|
SetCurrentValue(SelectedValueProperty, null);
|
||||||
|
SetCurrentValue(SelectedItemProperty, null);
|
||||||
|
SetCurrentValue(SelectedIndexProperty, -1);
|
||||||
|
SelectedItems.Clear();
|
||||||
|
}));
|
||||||
|
|
||||||
ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged;
|
ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +208,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void Tags_OnClosed(object sender, RoutedEventArgs e)
|
private void Tags_OnClosed(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.OriginalSource is Tag tag && tag.Tag is CheckComboBoxItem checkComboBoxItem)
|
if (e.OriginalSource is Tag { Tag: CheckComboBoxItem checkComboBoxItem })
|
||||||
{
|
{
|
||||||
checkComboBoxItem.SetCurrentValue(IsSelectedProperty, false);
|
checkComboBoxItem.SetCurrentValue(IsSelectedProperty, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,13 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
|
||||||
"IsDropDownOpen", typeof(bool), typeof(DateTimePicker), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
|
"IsDropDownOpen", typeof(bool), typeof(DateTimePicker), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
|
||||||
|
|
||||||
private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue) => d is DateTimePicker dp && !dp.IsEnabled ? false : baseValue;
|
private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue) =>
|
||||||
|
d is DateTimePicker
|
||||||
|
{
|
||||||
|
IsEnabled: false
|
||||||
|
}
|
||||||
|
? false
|
||||||
|
: baseValue;
|
||||||
|
|
||||||
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -172,7 +178,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnSelectedDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnSelectedDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(d is DateTimePicker dp)) return;
|
if (d is not DateTimePicker dp) return;
|
||||||
|
|
||||||
if (dp.SelectedDateTime.HasValue)
|
if (dp.SelectedDateTime.HasValue)
|
||||||
{
|
{
|
||||||
@@ -555,7 +561,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void PopupPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void PopupPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Popup popup && !popup.StaysOpen)
|
if (sender is Popup { StaysOpen: false })
|
||||||
{
|
{
|
||||||
if (_dropDownButton?.InputHitTest(e.GetPosition(_dropDownButton)) != null)
|
if (_dropDownButton?.InputHitTest(e.GetPosition(_dropDownButton)) != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -302,21 +302,18 @@ namespace HandyControl.Controls
|
|||||||
ActualPasswordBox.SetBinding(System.Windows.Controls.PasswordBox.SelectionOpacityProperty, new Binding(SelectionOpacityProperty.Name) { Source = this });
|
ActualPasswordBox.SetBinding(System.Windows.Controls.PasswordBox.SelectionOpacityProperty, new Binding(SelectionOpacityProperty.Name) { Source = this });
|
||||||
ActualPasswordBox.SetBinding(System.Windows.Controls.PasswordBox.CaretBrushProperty, new Binding(CaretBrushProperty.Name) { Source = this });
|
ActualPasswordBox.SetBinding(System.Windows.Controls.PasswordBox.CaretBrushProperty, new Binding(CaretBrushProperty.Name) { Source = this });
|
||||||
|
|
||||||
if (_password != null)
|
if (_password is { Length: > 0 })
|
||||||
{
|
{
|
||||||
if (_password.Length > 0)
|
var valuePtr = IntPtr.Zero;
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var valuePtr = IntPtr.Zero;
|
valuePtr = Marshal.SecureStringToGlobalAllocUnicode(_password);
|
||||||
try
|
ActualPasswordBox.Password = Marshal.PtrToStringUni(valuePtr) ?? throw new InvalidOperationException();
|
||||||
{
|
}
|
||||||
valuePtr = Marshal.SecureStringToGlobalAllocUnicode(_password);
|
finally
|
||||||
ActualPasswordBox.Password = Marshal.PtrToStringUni(valuePtr) ?? throw new InvalidOperationException();
|
{
|
||||||
}
|
Marshal.ZeroFreeGlobalAllocUnicode(valuePtr);
|
||||||
finally
|
_password.Clear();
|
||||||
{
|
|
||||||
Marshal.ZeroFreeGlobalAllocUnicode(valuePtr);
|
|
||||||
_password.Clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,13 @@ namespace HandyControl.Controls
|
|||||||
typeof(TimePicker),
|
typeof(TimePicker),
|
||||||
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
|
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
|
||||||
|
|
||||||
private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue) => d is TimePicker dp && !dp.IsEnabled ? false : baseValue;
|
private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue) =>
|
||||||
|
d is TimePicker
|
||||||
|
{
|
||||||
|
IsEnabled: false
|
||||||
|
}
|
||||||
|
? false
|
||||||
|
: baseValue;
|
||||||
|
|
||||||
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -183,7 +189,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(d is TimePicker dp)) return;
|
if (d is not TimePicker dp) return;
|
||||||
|
|
||||||
if (dp.SelectedTime.HasValue)
|
if (dp.SelectedTime.HasValue)
|
||||||
{
|
{
|
||||||
@@ -340,16 +346,14 @@ namespace HandyControl.Controls
|
|||||||
private static void OnClockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnClockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (TimePicker) d;
|
var ctl = (TimePicker) d;
|
||||||
var oldClock = e.OldValue as ClockBase;
|
|
||||||
var newClock = e.NewValue as ClockBase;
|
|
||||||
|
|
||||||
if (oldClock != null)
|
if (e.OldValue is ClockBase oldClock)
|
||||||
{
|
{
|
||||||
oldClock.SelectedTimeChanged -= ctl.Clock_SelectedTimeChanged;
|
oldClock.SelectedTimeChanged -= ctl.Clock_SelectedTimeChanged;
|
||||||
oldClock.Confirmed -= ctl.Clock_Confirmed;
|
oldClock.Confirmed -= ctl.Clock_Confirmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newClock != null)
|
if (e.NewValue is ClockBase newClock)
|
||||||
{
|
{
|
||||||
newClock.ShowConfirmButton = true;
|
newClock.ShowConfirmButton = true;
|
||||||
newClock.SelectedTimeChanged += ctl.Clock_SelectedTimeChanged;
|
newClock.SelectedTimeChanged += ctl.Clock_SelectedTimeChanged;
|
||||||
@@ -589,7 +593,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void PopupPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void PopupPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Popup popup && !popup.StaysOpen)
|
if (sender is Popup { StaysOpen: false })
|
||||||
{
|
{
|
||||||
if (_dropDownButton?.InputHitTest(e.GetPosition(_dropDownButton)) != null)
|
if (_dropDownButton?.InputHitTest(e.GetPosition(_dropDownButton)) != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace HandyControl.Controls
|
|||||||
"DotDelayTime", typeof(double), typeof(LoadingBase),
|
"DotDelayTime", typeof(double), typeof(LoadingBase),
|
||||||
new FrameworkPropertyMetadata(80.0, FrameworkPropertyMetadataOptions.AffectsRender));
|
new FrameworkPropertyMetadata(80.0, FrameworkPropertyMetadataOptions.AffectsRender));
|
||||||
|
|
||||||
protected readonly Canvas PrivateCanvas = new Canvas
|
protected readonly Canvas PrivateCanvas = new()
|
||||||
{
|
{
|
||||||
ClipToBounds = true
|
ClipToBounds = true
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,19 +12,10 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public class AnimationPath : Shape
|
public class AnimationPath : Shape
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 故事板
|
|
||||||
/// </summary>
|
|
||||||
private Storyboard _storyboard;
|
private Storyboard _storyboard;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 路径长度
|
|
||||||
/// </summary>
|
|
||||||
private double _pathLength;
|
private double _pathLength;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 路径
|
|
||||||
/// </summary>
|
|
||||||
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(nameof(Data),
|
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(nameof(Data),
|
||||||
typeof(Geometry), typeof(AnimationPath), new FrameworkPropertyMetadata(null,
|
typeof(Geometry), typeof(AnimationPath), new FrameworkPropertyMetadata(null,
|
||||||
OnPropertiesChanged));
|
OnPropertiesChanged));
|
||||||
@@ -37,9 +28,6 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 路径
|
|
||||||
/// </summary>
|
|
||||||
public Geometry Data
|
public Geometry Data
|
||||||
{
|
{
|
||||||
get => (Geometry) GetValue(DataProperty);
|
get => (Geometry) GetValue(DataProperty);
|
||||||
@@ -48,31 +36,19 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
protected override Geometry DefiningGeometry => Data ?? Geometry.Empty;
|
protected override Geometry DefiningGeometry => Data ?? Geometry.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 路径长度
|
|
||||||
/// </summary>
|
|
||||||
public static readonly DependencyProperty PathLengthProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty PathLengthProperty = DependencyProperty.Register(
|
||||||
"PathLength", typeof(double), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, OnPropertiesChanged));
|
"PathLength", typeof(double), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, OnPropertiesChanged));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 路径长度
|
|
||||||
/// </summary>
|
|
||||||
public double PathLength
|
public double PathLength
|
||||||
{
|
{
|
||||||
get => (double) GetValue(PathLengthProperty);
|
get => (double) GetValue(PathLengthProperty);
|
||||||
set => SetValue(PathLengthProperty, value);
|
set => SetValue(PathLengthProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动画间隔时间
|
|
||||||
/// </summary>
|
|
||||||
public static readonly DependencyProperty DurationProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty DurationProperty = DependencyProperty.Register(
|
||||||
"Duration", typeof(Duration), typeof(AnimationPath), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(2)),
|
"Duration", typeof(Duration), typeof(AnimationPath), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(2)),
|
||||||
OnPropertiesChanged));
|
OnPropertiesChanged));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动画间隔时间
|
|
||||||
/// </summary>
|
|
||||||
public Duration Duration
|
public Duration Duration
|
||||||
{
|
{
|
||||||
get => (Duration) GetValue(DurationProperty);
|
get => (Duration) GetValue(DurationProperty);
|
||||||
@@ -94,27 +70,31 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否正在播放动画
|
|
||||||
/// </summary>
|
|
||||||
public bool IsPlaying
|
public bool IsPlaying
|
||||||
{
|
{
|
||||||
get => (bool) GetValue(IsPlayingProperty);
|
get => (bool) GetValue(IsPlayingProperty);
|
||||||
set => SetValue(IsPlayingProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(IsPlayingProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty RepeatBehaviorProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty RepeatBehaviorProperty =
|
||||||
"RepeatBehavior", typeof(RepeatBehavior), typeof(AnimationPath), new PropertyMetadata(RepeatBehavior.Forever));
|
Timeline.RepeatBehaviorProperty.AddOwner(typeof(AnimationPath),
|
||||||
|
new PropertyMetadata(RepeatBehavior.Forever));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动画重复行为
|
|
||||||
/// </summary>
|
|
||||||
public RepeatBehavior RepeatBehavior
|
public RepeatBehavior RepeatBehavior
|
||||||
{
|
{
|
||||||
get => (RepeatBehavior) GetValue(RepeatBehaviorProperty);
|
get => (RepeatBehavior) GetValue(RepeatBehaviorProperty);
|
||||||
set => SetValue(RepeatBehaviorProperty, value);
|
set => SetValue(RepeatBehaviorProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty FillBehaviorProperty =
|
||||||
|
Timeline.FillBehaviorProperty.AddOwner(typeof(AnimationPath), new PropertyMetadata(FillBehavior.Stop));
|
||||||
|
|
||||||
|
public FillBehavior FillBehavior
|
||||||
|
{
|
||||||
|
get { return (FillBehavior) GetValue(FillBehaviorProperty); }
|
||||||
|
set { SetValue(FillBehaviorProperty, value); }
|
||||||
|
}
|
||||||
|
|
||||||
static AnimationPath()
|
static AnimationPath()
|
||||||
{
|
{
|
||||||
StretchProperty.AddOwner(typeof(AnimationPath), new FrameworkPropertyMetadata(Stretch.Uniform,
|
StretchProperty.AddOwner(typeof(AnimationPath), new FrameworkPropertyMetadata(Stretch.Uniform,
|
||||||
@@ -126,25 +106,16 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public AnimationPath() => Loaded += (s, e) => UpdatePath();
|
public AnimationPath() => Loaded += (s, e) => UpdatePath();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动画完成事件
|
|
||||||
/// </summary>
|
|
||||||
public static readonly RoutedEvent CompletedEvent =
|
public static readonly RoutedEvent CompletedEvent =
|
||||||
EventManager.RegisterRoutedEvent("Completed", RoutingStrategy.Bubble,
|
EventManager.RegisterRoutedEvent("Completed", RoutingStrategy.Bubble,
|
||||||
typeof(EventHandler), typeof(AnimationPath));
|
typeof(EventHandler), typeof(AnimationPath));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 动画完成事件
|
|
||||||
/// </summary>
|
|
||||||
public event EventHandler Completed
|
public event EventHandler Completed
|
||||||
{
|
{
|
||||||
add => AddHandler(CompletedEvent, value);
|
add => AddHandler(CompletedEvent, value);
|
||||||
remove => RemoveHandler(CompletedEvent, value);
|
remove => RemoveHandler(CompletedEvent, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新路径
|
|
||||||
/// </summary>
|
|
||||||
private void UpdatePath()
|
private void UpdatePath()
|
||||||
{
|
{
|
||||||
if (!Duration.HasTimeSpan || !IsPlaying) return;
|
if (!Duration.HasTimeSpan || !IsPlaying) return;
|
||||||
@@ -160,7 +131,6 @@ namespace HandyControl.Controls
|
|||||||
_pathLength
|
_pathLength
|
||||||
});
|
});
|
||||||
|
|
||||||
//定义动画
|
|
||||||
if (_storyboard != null)
|
if (_storyboard != null)
|
||||||
{
|
{
|
||||||
_storyboard.Stop();
|
_storyboard.Stop();
|
||||||
@@ -168,25 +138,26 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
_storyboard = new Storyboard
|
_storyboard = new Storyboard
|
||||||
{
|
{
|
||||||
RepeatBehavior = RepeatBehavior
|
RepeatBehavior = RepeatBehavior,
|
||||||
|
FillBehavior = FillBehavior
|
||||||
};
|
};
|
||||||
_storyboard.Completed += Storyboard_Completed;
|
_storyboard.Completed += Storyboard_Completed;
|
||||||
|
|
||||||
var frames = new DoubleAnimationUsingKeyFrames();
|
var frames = new DoubleAnimationUsingKeyFrames();
|
||||||
//开始位置
|
|
||||||
var frame0 = new LinearDoubleKeyFrame
|
var frameIn = new LinearDoubleKeyFrame
|
||||||
{
|
{
|
||||||
Value = _pathLength,
|
Value = _pathLength,
|
||||||
KeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero)
|
KeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero)
|
||||||
};
|
};
|
||||||
//结束位置
|
frames.KeyFrames.Add(frameIn);
|
||||||
var frame1 = new LinearDoubleKeyFrame
|
|
||||||
|
var frameOut = new LinearDoubleKeyFrame
|
||||||
{
|
{
|
||||||
Value = -_pathLength,
|
Value = FillBehavior == FillBehavior.Stop ? -_pathLength : 0,
|
||||||
KeyTime = KeyTime.FromTimeSpan(Duration.TimeSpan)
|
KeyTime = KeyTime.FromTimeSpan(Duration.TimeSpan)
|
||||||
};
|
};
|
||||||
frames.KeyFrames.Add(frame0);
|
frames.KeyFrames.Add(frameOut);
|
||||||
frames.KeyFrames.Add(frame1);
|
|
||||||
|
|
||||||
Storyboard.SetTarget(frames, this);
|
Storyboard.SetTarget(frames, this);
|
||||||
Storyboard.SetTargetProperty(frames, new PropertyPath(StrokeDashOffsetProperty));
|
Storyboard.SetTargetProperty(frames, new PropertyPath(StrokeDashOffsetProperty));
|
||||||
|
|||||||
@@ -63,7 +63,14 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
|
||||||
"Maximum", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnValueChanged));
|
"Maximum", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnMaximumChanged));
|
||||||
|
|
||||||
|
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var ctl = (Badge) d;
|
||||||
|
var v = ctl.Value;
|
||||||
|
ctl.SetCurrentValue(TextProperty, v <= ctl.Maximum ? v.ToString() : $"{ctl.Maximum}+");
|
||||||
|
}
|
||||||
|
|
||||||
public int Maximum
|
public int Maximum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(BorderDashOffsetProperty, value);
|
set => SetValue(BorderDashOffsetProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Size ConvertThickness2Size(Thickness th) => new Size(th.Left + th.Right, th.Top + th.Bottom);
|
private static Size ConvertThickness2Size(Thickness th) => new(th.Left + th.Right, th.Top + th.Bottom);
|
||||||
|
|
||||||
private static Rect DeflateRect(Rect rt, Thickness thick) => new Rect(rt.Left + thick.Left,
|
private static Rect DeflateRect(Rect rt, Thickness thick) => new(rt.Left + thick.Left,
|
||||||
rt.Top + thick.Top,
|
rt.Top + thick.Top,
|
||||||
Math.Max(0.0, rt.Width - thick.Left - thick.Right),
|
Math.Max(0.0, rt.Width - thick.Left - thick.Right),
|
||||||
Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
|
Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace HandyControl.Controls
|
|||||||
"ShowEmpty", typeof(bool), typeof(Empty), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
|
"ShowEmpty", typeof(bool), typeof(Empty), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
|
||||||
|
|
||||||
public static void SetShowEmpty(DependencyObject element, bool value)
|
public static void SetShowEmpty(DependencyObject element, bool value)
|
||||||
=> element.SetValue(ShowEmptyProperty, value);
|
=> element.SetValue(ShowEmptyProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetShowEmpty(DependencyObject element)
|
public static bool GetShowEmpty(DependencyObject element)
|
||||||
=> (bool) element.GetValue(ShowEmptyProperty);
|
=> (bool) element.GetValue(ShowEmptyProperty);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
Stretch = Stretch.UniformToFill
|
Stretch = Stretch.UniformToFill
|
||||||
}
|
}
|
||||||
: ResourceHelper.GetResource<Brush>("SecondaryRegionBrush");
|
: ResourceHelper.GetResourceInternal<Brush>("SecondaryRegionBrush");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageSource Source
|
public ImageSource Source
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private const string ElementVisualBrush = "PART_VisualBrush";
|
private const string ElementVisualBrush = "PART_VisualBrush";
|
||||||
|
|
||||||
private VisualBrush _visualBrush = new VisualBrush();
|
private VisualBrush _visualBrush = new();
|
||||||
|
|
||||||
private readonly TranslateTransform _translateTransform;
|
private readonly TranslateTransform _translateTransform;
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(VerticalOffsetProperty, value);
|
set => SetValue(VerticalOffsetProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Magnifier Default => new Magnifier();
|
public static Magnifier Default => new();
|
||||||
|
|
||||||
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
|
||||||
"Scale", typeof(double), typeof(Magnifier), new PropertyMetadata(5.0, OnScaleChanged), ValidateHelper.IsInRangeOfPosDouble);
|
"Scale", typeof(double), typeof(Magnifier), new PropertyMetadata(5.0, OnScaleChanged), ValidateHelper.IsInRangeOfPosDouble);
|
||||||
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
layer.Remove(_adornerContainer);
|
layer.Remove(_adornerContainer);
|
||||||
}
|
}
|
||||||
else if (_adornerContainer != null && _adornerContainer.Parent is AdornerLayer parent)
|
else if (_adornerContainer is { Parent: AdornerLayer parent })
|
||||||
{
|
{
|
||||||
parent.Remove(_adornerContainer);
|
parent.Remove(_adornerContainer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private bool _added;
|
private bool _added;
|
||||||
|
|
||||||
private readonly object _syncObj = new object();
|
private readonly object _syncObj = new();
|
||||||
|
|
||||||
private readonly int _id;
|
private readonly int _id;
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static int NextId;
|
private static int NextId;
|
||||||
|
|
||||||
private static readonly Dictionary<string, NotifyIcon> NotifyIconDic = new Dictionary<string, NotifyIcon>();
|
private static readonly Dictionary<string, NotifyIcon> NotifyIconDic = new();
|
||||||
|
|
||||||
static NotifyIcon()
|
static NotifyIcon()
|
||||||
{
|
{
|
||||||
@@ -192,21 +192,14 @@ namespace HandyControl.Controls
|
|||||||
szInfo = content ?? string.Empty
|
szInfo = content ?? string.Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (infoType)
|
data.dwInfoFlags = infoType switch
|
||||||
{
|
{
|
||||||
case NotifyIconInfoType.Info:
|
NotifyIconInfoType.Info => InteropValues.NIIF_INFO,
|
||||||
data.dwInfoFlags = InteropValues.NIIF_INFO;
|
NotifyIconInfoType.Warning => InteropValues.NIIF_WARNING,
|
||||||
break;
|
NotifyIconInfoType.Error => InteropValues.NIIF_ERROR,
|
||||||
case NotifyIconInfoType.Warning:
|
NotifyIconInfoType.None => InteropValues.NIIF_NONE,
|
||||||
data.dwInfoFlags = InteropValues.NIIF_WARNING;
|
_ => data.dwInfoFlags
|
||||||
break;
|
};
|
||||||
case NotifyIconInfoType.Error:
|
|
||||||
data.dwInfoFlags = InteropValues.NIIF_ERROR;
|
|
||||||
break;
|
|
||||||
case NotifyIconInfoType.None:
|
|
||||||
data.dwInfoFlags = InteropValues.NIIF_NONE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
|
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ namespace HandyControl.Controls
|
|||||||
/// 最大页数
|
/// 最大页数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty MaxPageCountProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty MaxPageCountProperty = DependencyProperty.Register(
|
||||||
"MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosInt);
|
"MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosIntIncludeZero);
|
||||||
|
|
||||||
private static object CoerceMaxPageCount(DependencyObject d, object basevalue)
|
private static object CoerceMaxPageCount(DependencyObject d, object basevalue)
|
||||||
{
|
{
|
||||||
@@ -157,11 +157,11 @@ namespace HandyControl.Controls
|
|||||||
/// 当前页
|
/// 当前页
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register(
|
||||||
"PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosInt);
|
"PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosIntIncludeZero);
|
||||||
|
|
||||||
private static object CoercePageIndex(DependencyObject d, object basevalue)
|
private static object CoercePageIndex(DependencyObject d, object basevalue)
|
||||||
{
|
{
|
||||||
if (!(d is Pagination pagination)) return 1;
|
if (d is not Pagination pagination) return 1;
|
||||||
|
|
||||||
var intValue = (int) basevalue;
|
var intValue = (int) basevalue;
|
||||||
return intValue < 1
|
return intValue < 1
|
||||||
@@ -383,16 +383,16 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private RadioButton CreateButton(int page)
|
private RadioButton CreateButton(int page)
|
||||||
{
|
{
|
||||||
return new RadioButton
|
return new()
|
||||||
{
|
{
|
||||||
Style = ResourceHelper.GetResource<Style>(ResourceToken.PaginationButtonStyle),
|
Style = ResourceHelper.GetResourceInternal<Style>(ResourceToken.PaginationButtonStyle),
|
||||||
Content = page.ToString()
|
Content = page.ToString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)
|
private void ToggleButton_OnChecked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(e.OriginalSource is RadioButton button)) return;
|
if (e.OriginalSource is not RadioButton button) return;
|
||||||
if (button.IsChecked == false) return;
|
if (button.IsChecked == false) return;
|
||||||
PageIndex = int.Parse(button.Content.ToString());
|
PageIndex = int.Parse(button.Content.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(IsOpenProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(IsOpenProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Poptip Default => new Poptip();
|
public static Poptip Default => new();
|
||||||
|
|
||||||
protected sealed override void OnTargetChanged(FrameworkElement element, bool isNew)
|
protected sealed override void OnTargetChanged(FrameworkElement element, bool isNew)
|
||||||
{
|
{
|
||||||
@@ -287,7 +287,7 @@ namespace HandyControl.Controls
|
|||||||
private void Element_MouseEnter(object sender, MouseEventArgs e)
|
private void Element_MouseEnter(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
||||||
if (hitMode != HitMode.Hover || hitMode == HitMode.None) return;
|
if (hitMode != HitMode.Hover) return;
|
||||||
|
|
||||||
SwitchPoptip(true);
|
SwitchPoptip(true);
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ namespace HandyControl.Controls
|
|||||||
private void Element_MouseLeave(object sender, MouseEventArgs e)
|
private void Element_MouseLeave(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
||||||
if (hitMode != HitMode.Hover || hitMode == HitMode.None) return;
|
if (hitMode != HitMode.Hover) return;
|
||||||
|
|
||||||
SwitchPoptip(false);
|
SwitchPoptip(false);
|
||||||
}
|
}
|
||||||
@@ -303,7 +303,7 @@ namespace HandyControl.Controls
|
|||||||
private void Element_GotFocus(object sender, RoutedEventArgs e)
|
private void Element_GotFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
||||||
if (hitMode != HitMode.Focus || hitMode == HitMode.None) return;
|
if (hitMode != HitMode.Focus) return;
|
||||||
|
|
||||||
SwitchPoptip(true);
|
SwitchPoptip(true);
|
||||||
}
|
}
|
||||||
@@ -311,7 +311,7 @@ namespace HandyControl.Controls
|
|||||||
private void Element_LostFocus(object sender, RoutedEventArgs e)
|
private void Element_LostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
var hitMode = GetIsInstance(Target) ? HitMode : GetHitMode(Target);
|
||||||
if (hitMode != HitMode.Focus || hitMode == HitMode.None) return;
|
if (hitMode != HitMode.Focus) return;
|
||||||
|
|
||||||
SwitchPoptip(false);
|
SwitchPoptip(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,14 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
private FrameworkElement _contentPresenter;
|
private FrameworkElement _contentPresenter;
|
||||||
|
|
||||||
|
private static Storyboard StoryboardBuildInDefault;
|
||||||
|
|
||||||
|
private Storyboard _storyboardBuildIn;
|
||||||
|
|
||||||
public TransitioningContentControl()
|
public TransitioningContentControl()
|
||||||
{
|
{
|
||||||
Loaded += TransitioningContentControl_Loaded;
|
Loaded += TransitioningContentControl_Loaded;
|
||||||
IsVisibleChanged += TransitioningContentControl_IsVisibleChanged;
|
Unloaded += TransitioningContentControl_Unloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty TransitionModeProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty TransitionModeProperty = DependencyProperty.Register(
|
||||||
@@ -23,7 +27,13 @@ namespace HandyControl.Controls
|
|||||||
private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (TransitioningContentControl) d;
|
var ctl = (TransitioningContentControl) d;
|
||||||
ctl.StartTransition();
|
ctl.OnTransitionModeChanged((TransitionMode) e.NewValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTransitionModeChanged(TransitionMode newValue)
|
||||||
|
{
|
||||||
|
_storyboardBuildIn = ResourceHelper.GetResourceInternal<Storyboard>($"{newValue}Transition");
|
||||||
|
StartTransition();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransitionMode TransitionMode
|
public TransitionMode TransitionMode
|
||||||
@@ -43,19 +53,33 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void TransitioningContentControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) => StartTransition();
|
private void TransitioningContentControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) => StartTransition();
|
||||||
|
|
||||||
private void TransitioningContentControl_Loaded(object sender, RoutedEventArgs e) => StartTransition();
|
private void TransitioningContentControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
StartTransition();
|
||||||
|
IsVisibleChanged += TransitioningContentControl_IsVisibleChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TransitioningContentControl_Unloaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
IsVisibleChanged -= TransitioningContentControl_IsVisibleChanged;
|
||||||
|
}
|
||||||
|
|
||||||
private void StartTransition()
|
private void StartTransition()
|
||||||
{
|
{
|
||||||
if (Visibility != Visibility.Visible || _contentPresenter == null) return;
|
if (!IsArrangeValid || _contentPresenter == null) return;
|
||||||
|
|
||||||
if (TransitionStoryboard != null)
|
if (TransitionStoryboard != null)
|
||||||
{
|
{
|
||||||
TransitionStoryboard.Begin(_contentPresenter);
|
TransitionStoryboard.Begin(_contentPresenter);
|
||||||
}
|
}
|
||||||
else if (Application.Current != null)
|
else if (_storyboardBuildIn != null)
|
||||||
{
|
{
|
||||||
ResourceHelper.GetResource<Storyboard>($"{TransitionMode.ToString()}Transition")?.Begin(_contentPresenter);
|
_storyboardBuildIn?.Begin(_contentPresenter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StoryboardBuildInDefault ??= ResourceHelper.GetResourceInternal<Storyboard>($"{default(TransitionMode)}Transition");
|
||||||
|
StoryboardBuildInDefault?.Begin(_contentPresenter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using HandyControl.Tools;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
public class ElementGroup : SimpleStackPanel
|
||||||
|
{
|
||||||
|
private static readonly Dictionary<Orientation, Dictionary<ChildLocation, CornerRadius>> CornerRadiusDict;
|
||||||
|
|
||||||
|
static ElementGroup()
|
||||||
|
{
|
||||||
|
var defaultCornerRadius = ResourceHelper.GetResourceInternal<CornerRadius>("DefaultCornerRadius");
|
||||||
|
|
||||||
|
CornerRadiusDict = new Dictionary<Orientation, Dictionary<ChildLocation, CornerRadius>>
|
||||||
|
{
|
||||||
|
[Orientation.Horizontal] = new()
|
||||||
|
{
|
||||||
|
[ChildLocation.Single] = defaultCornerRadius,
|
||||||
|
[ChildLocation.First] = new CornerRadius(defaultCornerRadius.TopLeft, 0, 0, defaultCornerRadius.BottomLeft),
|
||||||
|
[ChildLocation.Middle] = new CornerRadius(),
|
||||||
|
[ChildLocation.Last] = new CornerRadius(0, defaultCornerRadius.TopRight, defaultCornerRadius.BottomRight, 0)
|
||||||
|
},
|
||||||
|
[Orientation.Vertical] = new()
|
||||||
|
{
|
||||||
|
[ChildLocation.Single] = defaultCornerRadius,
|
||||||
|
[ChildLocation.First] = new CornerRadius(defaultCornerRadius.TopLeft, defaultCornerRadius.TopRight, 0, 0),
|
||||||
|
[ChildLocation.Middle] = new CornerRadius(),
|
||||||
|
[ChildLocation.Last] = new CornerRadius(0, 0, defaultCornerRadius.BottomRight, defaultCornerRadius.BottomLeft)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved)
|
||||||
|
{
|
||||||
|
base.OnVisualChildrenChanged(visualAdded, visualRemoved);
|
||||||
|
|
||||||
|
if (visualAdded is UIElement elementAdded)
|
||||||
|
{
|
||||||
|
elementAdded.GotFocus += ElementAdded_GotFocus;
|
||||||
|
elementAdded.LostFocus += ElementAdded_LostFocus;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (visualRemoved is UIElement elementRemoved)
|
||||||
|
{
|
||||||
|
elementRemoved.GotFocus -= ElementAdded_GotFocus;
|
||||||
|
elementRemoved.LostFocus -= ElementAdded_LostFocus;
|
||||||
|
}
|
||||||
|
|
||||||
|
var childrenCount = InternalChildren.Count;
|
||||||
|
if (childrenCount == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var orientation = Orientation;
|
||||||
|
|
||||||
|
if (childrenCount == 1)
|
||||||
|
{
|
||||||
|
UpdateChildCornerRadius(InternalChildren[0], CornerRadiusDict[orientation][ChildLocation.Single]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UpdateChildCornerRadius(InternalChildren[0], CornerRadiusDict[orientation][ChildLocation.First]);
|
||||||
|
|
||||||
|
var childMargin = orientation == Orientation.Horizontal
|
||||||
|
? new Thickness(-1, 0, 0, 0)
|
||||||
|
: new Thickness(0, -1, 0, 0);
|
||||||
|
|
||||||
|
for (var childIndex = 1; childIndex < childrenCount; childIndex++)
|
||||||
|
{
|
||||||
|
var child = InternalChildren[childIndex];
|
||||||
|
child.SetCurrentValue(MarginProperty, childMargin);
|
||||||
|
UpdateChildCornerRadius(child, CornerRadiusDict[orientation][ChildLocation.Middle]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var lastChild = InternalChildren[childrenCount - 1];
|
||||||
|
lastChild.SetCurrentValue(MarginProperty, childMargin);
|
||||||
|
UpdateChildCornerRadius(lastChild, CornerRadiusDict[orientation][ChildLocation.Last]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UpdateChildCornerRadius(DependencyObject child, CornerRadius cornerRadius)
|
||||||
|
{
|
||||||
|
if (child is Border border)
|
||||||
|
{
|
||||||
|
border.SetCurrentValue(Border.CornerRadiusProperty, cornerRadius);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BorderElement.SetCornerRadius(child, cornerRadius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ElementAdded_LostFocus(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is UIElement element)
|
||||||
|
{
|
||||||
|
SetZIndex(element, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ElementAdded_GotFocus(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is UIElement element)
|
||||||
|
{
|
||||||
|
SetZIndex(element, int.MaxValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum ChildLocation
|
||||||
|
{
|
||||||
|
Single,
|
||||||
|
First,
|
||||||
|
Middle,
|
||||||
|
Last
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private int _lineCount;
|
private int _lineCount;
|
||||||
|
|
||||||
private readonly List<FlexItemInfo> _orderList = new List<FlexItemInfo>();
|
private readonly List<FlexItemInfo> _orderList = new();
|
||||||
|
|
||||||
#region Item
|
#region Item
|
||||||
|
|
||||||
@@ -648,7 +648,12 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public int Index { get; }
|
public int Index { get; }
|
||||||
|
|
||||||
public int CompareTo(FlexItemInfo other) => Order.CompareTo(other.Order);
|
public int CompareTo(FlexItemInfo other)
|
||||||
|
{
|
||||||
|
var orderCompare = Order.CompareTo(other.Order);
|
||||||
|
if (orderCompare != 0) return orderCompare;
|
||||||
|
return Index.CompareTo(other.Index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct FlexLineInfo
|
private struct FlexLineInfo
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace HandyControl.Controls
|
|||||||
private static bool OnSpanValidate(object value)
|
private static bool OnSpanValidate(object value)
|
||||||
{
|
{
|
||||||
var v = (int) value;
|
var v = (int) value;
|
||||||
return v >= 1 && v <= 24;
|
return v is >= 1 and <= 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Span
|
public int Span
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace HandyControl.Controls
|
|||||||
return double.IsNaN(v) || v >= 0.0d && !double.IsPositiveInfinity(v);
|
return double.IsNaN(v) || v >= 0.0d && !double.IsPositiveInfinity(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ArrangeLine(double v, double lineV, int start, int end, bool useItemU, double itemU, double spacing)
|
private void ArrangeWrapLine(double v, double lineV, int start, int end, bool useItemU, double itemU, double spacing)
|
||||||
{
|
{
|
||||||
double u = 0;
|
double u = 0;
|
||||||
var isHorizontal = _orientation == Orientation.Horizontal;
|
var isHorizontal = _orientation == Orientation.Horizontal;
|
||||||
@@ -104,6 +104,26 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ArrangeLine(double lineV, bool useItemU, double itemU, double spacing)
|
||||||
|
{
|
||||||
|
double u = 0;
|
||||||
|
var isHorizontal = _orientation == Orientation.Horizontal;
|
||||||
|
|
||||||
|
var children = InternalChildren;
|
||||||
|
for (var i = 0; i < children.Count; i++)
|
||||||
|
{
|
||||||
|
var child = children[i];
|
||||||
|
if (child == null) continue;
|
||||||
|
|
||||||
|
var childSize = new UVSize(_orientation, child.DesiredSize.Width, child.DesiredSize.Height);
|
||||||
|
var layoutSlotU = useItemU ? itemU : childSize.U;
|
||||||
|
|
||||||
|
child.Arrange(isHorizontal ? new Rect(u, 0, layoutSlotU, lineV) : new Rect(0, u, lineV, layoutSlotU));
|
||||||
|
|
||||||
|
u += layoutSlotU + spacing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override Size MeasureOverride(Size constraint)
|
protected override Size MeasureOverride(Size constraint)
|
||||||
{
|
{
|
||||||
var curLineSize = new UVSize(_orientation);
|
var curLineSize = new UVSize(_orientation);
|
||||||
@@ -123,35 +143,69 @@ namespace HandyControl.Controls
|
|||||||
var children = InternalChildren;
|
var children = InternalChildren;
|
||||||
var isFirst = true;
|
var isFirst = true;
|
||||||
|
|
||||||
for (int i = 0, count = children.Count; i < count; i++)
|
if (childWrapping == VisualWrapping.Wrap)
|
||||||
{
|
{
|
||||||
var child = children[i];
|
for (int i = 0, count = children.Count; i < count; i++)
|
||||||
if (child == null) continue;
|
|
||||||
|
|
||||||
child.Measure(childConstraint);
|
|
||||||
|
|
||||||
var sz = new UVSize(
|
|
||||||
_orientation,
|
|
||||||
itemWidthSet ? itemWidth : child.DesiredSize.Width,
|
|
||||||
itemHeightSet ? itemHeight : child.DesiredSize.Height);
|
|
||||||
|
|
||||||
if (childWrapping == VisualWrapping.Wrap && MathHelper.GreaterThan(curLineSize.U + sz.U + spacing, uvConstraint.U))
|
|
||||||
{
|
{
|
||||||
panelSize.U = Math.Max(curLineSize.U, panelSize.U);
|
var child = children[i];
|
||||||
panelSize.V += curLineSize.V + spacing;
|
if (child == null) continue;
|
||||||
curLineSize = sz;
|
|
||||||
|
|
||||||
if (MathHelper.GreaterThan(sz.U, uvConstraint.U))
|
child.Measure(childConstraint);
|
||||||
|
|
||||||
|
var sz = new UVSize(
|
||||||
|
_orientation,
|
||||||
|
itemWidthSet ? itemWidth : child.DesiredSize.Width,
|
||||||
|
itemHeightSet ? itemHeight : child.DesiredSize.Height);
|
||||||
|
|
||||||
|
if (MathHelper.GreaterThan(curLineSize.U + sz.U + spacing, uvConstraint.U))
|
||||||
{
|
{
|
||||||
panelSize.U = Math.Max(sz.U, panelSize.U);
|
panelSize.U = Math.Max(curLineSize.U, panelSize.U);
|
||||||
panelSize.V += sz.V + spacing;
|
panelSize.V += curLineSize.V + spacing;
|
||||||
curLineSize = new UVSize(_orientation);
|
curLineSize = sz;
|
||||||
}
|
|
||||||
|
|
||||||
isFirst = true;
|
if (MathHelper.GreaterThan(sz.U, uvConstraint.U))
|
||||||
|
{
|
||||||
|
panelSize.U = Math.Max(sz.U, panelSize.U);
|
||||||
|
panelSize.V += sz.V + spacing;
|
||||||
|
curLineSize = new UVSize(_orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
isFirst = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
curLineSize.U += isFirst ? sz.U : sz.U + spacing;
|
||||||
|
curLineSize.V = Math.Max(sz.V, curLineSize.V);
|
||||||
|
|
||||||
|
isFirst = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var layoutSlotSize = constraint;
|
||||||
|
|
||||||
|
if (_orientation == Orientation.Horizontal)
|
||||||
|
{
|
||||||
|
layoutSlotSize.Width = double.PositiveInfinity;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
layoutSlotSize.Height = double.PositiveInfinity;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0, count = children.Count; i < count; ++i)
|
||||||
|
{
|
||||||
|
var child = children[i];
|
||||||
|
if (child == null) continue;
|
||||||
|
|
||||||
|
child.Measure(layoutSlotSize);
|
||||||
|
|
||||||
|
var sz = new UVSize(
|
||||||
|
_orientation,
|
||||||
|
itemWidthSet ? itemWidth : child.DesiredSize.Width,
|
||||||
|
itemHeightSet ? itemHeight : child.DesiredSize.Height);
|
||||||
|
|
||||||
curLineSize.U += isFirst ? sz.U : sz.U + spacing;
|
curLineSize.U += isFirst ? sz.U : sz.U + spacing;
|
||||||
curLineSize.V = Math.Max(sz.V, curLineSize.V);
|
curLineSize.V = Math.Max(sz.V, curLineSize.V);
|
||||||
|
|
||||||
@@ -183,46 +237,53 @@ namespace HandyControl.Controls
|
|||||||
var children = InternalChildren;
|
var children = InternalChildren;
|
||||||
var isFirst = true;
|
var isFirst = true;
|
||||||
|
|
||||||
for (int i = 0, count = children.Count; i < count; i++)
|
if (childWrapping == VisualWrapping.Wrap)
|
||||||
{
|
{
|
||||||
var child = children[i];
|
for (int i = 0, count = children.Count; i < count; i++)
|
||||||
if (child == null) continue;
|
|
||||||
|
|
||||||
var sz = new UVSize(
|
|
||||||
_orientation,
|
|
||||||
itemWidthSet ? itemWidth : child.DesiredSize.Width,
|
|
||||||
itemHeightSet ? itemHeight : child.DesiredSize.Height);
|
|
||||||
|
|
||||||
if (childWrapping == VisualWrapping.Wrap && MathHelper.GreaterThan(curLineSize.U + sz.U + spacing, uvFinalSize.U))
|
|
||||||
{
|
{
|
||||||
ArrangeLine(accumulatedV, curLineSize.V, firstInLine, i, useItemU, itemU, spacing);
|
var child = children[i];
|
||||||
|
if (child == null) continue;
|
||||||
|
|
||||||
accumulatedV += curLineSize.V + spacing;
|
var sz = new UVSize(
|
||||||
curLineSize = sz;
|
_orientation,
|
||||||
|
itemWidthSet ? itemWidth : child.DesiredSize.Width,
|
||||||
|
itemHeightSet ? itemHeight : child.DesiredSize.Height);
|
||||||
|
|
||||||
if (MathHelper.GreaterThan(sz.U, uvFinalSize.U))
|
if (MathHelper.GreaterThan(curLineSize.U + sz.U + spacing, uvFinalSize.U))
|
||||||
{
|
{
|
||||||
ArrangeLine(accumulatedV, sz.V, i, ++i, useItemU, itemU, spacing);
|
ArrangeWrapLine(accumulatedV, curLineSize.V, firstInLine, i, useItemU, itemU, spacing);
|
||||||
|
|
||||||
accumulatedV += sz.V + spacing;
|
accumulatedV += curLineSize.V + spacing;
|
||||||
curLineSize = new UVSize(_orientation);
|
curLineSize = sz;
|
||||||
|
|
||||||
|
if (MathHelper.GreaterThan(sz.U, uvFinalSize.U))
|
||||||
|
{
|
||||||
|
ArrangeWrapLine(accumulatedV, sz.V, i, ++i, useItemU, itemU, spacing);
|
||||||
|
|
||||||
|
accumulatedV += sz.V + spacing;
|
||||||
|
curLineSize = new UVSize(_orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
firstInLine = i;
|
||||||
|
isFirst = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
curLineSize.U += isFirst ? sz.U : sz.U + spacing;
|
||||||
|
curLineSize.V = Math.Max(sz.V, curLineSize.V);
|
||||||
|
|
||||||
firstInLine = i;
|
isFirst = false;
|
||||||
isFirst = true;
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
curLineSize.U += isFirst ? sz.U : sz.U + spacing;
|
|
||||||
curLineSize.V = Math.Max(sz.V, curLineSize.V);
|
|
||||||
|
|
||||||
isFirst = false;
|
if (firstInLine < children.Count)
|
||||||
|
{
|
||||||
|
ArrangeWrapLine(accumulatedV, curLineSize.V, firstInLine, children.Count, useItemU, itemU, spacing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (firstInLine < children.Count)
|
|
||||||
{
|
{
|
||||||
ArrangeLine(accumulatedV, curLineSize.V, firstInLine, children.Count, useItemU, itemU, spacing);
|
ArrangeLine(uvFinalSize.V, useItemU, itemU, spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
return finalSize;
|
return finalSize;
|
||||||
|
|||||||
+6
-6
@@ -14,9 +14,9 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new System.Windows.Controls.ComboBox
|
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new System.Windows.Controls.ComboBox
|
||||||
{
|
{
|
||||||
Style = ResourceHelper.GetResource<Style>("ComboBoxCapsule"),
|
Style = ResourceHelper.GetResourceInternal<Style>("ComboBoxCapsule"),
|
||||||
ItemsSource = Enum.GetValues(propertyItem.PropertyType),
|
ItemsSource = Enum.GetValues(propertyItem.PropertyType),
|
||||||
ItemTemplateSelector = ResourceHelper.GetResource<DataTemplateSelector>("HorizontalAlignmentPathTemplateSelector"),
|
ItemTemplateSelector = ResourceHelper.GetResourceInternal<DataTemplateSelector>("HorizontalAlignmentPathTemplateSelector"),
|
||||||
HorizontalAlignment = HorizontalAlignment.Left
|
HorizontalAlignment = HorizontalAlignment.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -48,16 +48,16 @@ namespace HandyControl.Controls
|
|||||||
switch (horizontalAlignment)
|
switch (horizontalAlignment)
|
||||||
{
|
{
|
||||||
case HorizontalAlignment.Left:
|
case HorizontalAlignment.Left:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignLeftGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignLeftGeometry"));
|
||||||
break;
|
break;
|
||||||
case HorizontalAlignment.Center:
|
case HorizontalAlignment.Center:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignHCenterGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignHCenterGeometry"));
|
||||||
break;
|
break;
|
||||||
case HorizontalAlignment.Right:
|
case HorizontalAlignment.Right:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignRightGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignRightGeometry"));
|
||||||
break;
|
break;
|
||||||
case HorizontalAlignment.Stretch:
|
case HorizontalAlignment.Stretch:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignHStretchGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignHStretchGeometry"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -15,6 +15,6 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public override BindingMode GetBindingMode(PropertyItem propertyItem) => BindingMode.OneWay;
|
public override BindingMode GetBindingMode(PropertyItem propertyItem) => BindingMode.OneWay;
|
||||||
|
|
||||||
protected override IValueConverter GetConverter(PropertyItem propertyItem) => ResourceHelper.GetResource<IValueConverter>("Object2StringConverter");
|
protected override IValueConverter GetConverter(PropertyItem propertyItem) => ResourceHelper.GetResourceInternal<IValueConverter>("Object2StringConverter");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -8,7 +8,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new ToggleButton
|
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new ToggleButton
|
||||||
{
|
{
|
||||||
Style = ResourceHelper.GetResource<Style>("ToggleButtonSwitch"),
|
Style = ResourceHelper.GetResourceInternal<Style>("ToggleButtonSwitch"),
|
||||||
HorizontalAlignment = HorizontalAlignment.Left,
|
HorizontalAlignment = HorizontalAlignment.Left,
|
||||||
IsEnabled = !propertyItem.IsReadOnly
|
IsEnabled = !propertyItem.IsReadOnly
|
||||||
};
|
};
|
||||||
|
|||||||
+6
-6
@@ -14,9 +14,9 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new System.Windows.Controls.ComboBox
|
public override FrameworkElement CreateElement(PropertyItem propertyItem) => new System.Windows.Controls.ComboBox
|
||||||
{
|
{
|
||||||
Style = ResourceHelper.GetResource<Style>("ComboBoxCapsule"),
|
Style = ResourceHelper.GetResourceInternal<Style>("ComboBoxCapsule"),
|
||||||
ItemsSource = Enum.GetValues(propertyItem.PropertyType),
|
ItemsSource = Enum.GetValues(propertyItem.PropertyType),
|
||||||
ItemTemplateSelector = ResourceHelper.GetResource<DataTemplateSelector>("VerticalAlignmentPathTemplateSelector"),
|
ItemTemplateSelector = ResourceHelper.GetResourceInternal<DataTemplateSelector>("VerticalAlignmentPathTemplateSelector"),
|
||||||
HorizontalAlignment = HorizontalAlignment.Left
|
HorizontalAlignment = HorizontalAlignment.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -48,16 +48,16 @@ namespace HandyControl.Controls
|
|||||||
switch (verticalAlignment)
|
switch (verticalAlignment)
|
||||||
{
|
{
|
||||||
case VerticalAlignment.Top:
|
case VerticalAlignment.Top:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignTopGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignTopGeometry"));
|
||||||
break;
|
break;
|
||||||
case VerticalAlignment.Center:
|
case VerticalAlignment.Center:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignVCenterGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignVCenterGeometry"));
|
||||||
break;
|
break;
|
||||||
case VerticalAlignment.Bottom:
|
case VerticalAlignment.Bottom:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignBottomGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignBottomGeometry"));
|
||||||
break;
|
break;
|
||||||
case VerticalAlignment.Stretch:
|
case VerticalAlignment.Stretch:
|
||||||
factory.SetValue(Path.DataProperty, ResourceHelper.GetResource<Geometry>("AlignVStretchGeometry"));
|
factory.SetValue(Path.DataProperty, ResourceHelper.GetResourceInternal<Geometry>("AlignVStretchGeometry"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
|||||||
CommandBindings.Add(new CommandBinding(ControlCommands.SortByName, SortByName, (s, e) => e.CanExecute = ShowSortButton));
|
CommandBindings.Add(new CommandBinding(ControlCommands.SortByName, SortByName, (s, e) => e.CanExecute = ShowSortButton));
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual PropertyResolver PropertyResolver { get; } = new PropertyResolver();
|
public virtual PropertyResolver PropertyResolver { get; } = new();
|
||||||
|
|
||||||
public static readonly RoutedEvent SelectedObjectChangedEvent =
|
public static readonly RoutedEvent SelectedObjectChangedEvent =
|
||||||
EventManager.RegisterRoutedEvent("SelectedObjectChanged", RoutingStrategy.Bubble,
|
EventManager.RegisterRoutedEvent("SelectedObjectChanged", RoutingStrategy.Bubble,
|
||||||
@@ -181,7 +181,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual PropertyItem CreatePropertyItem(PropertyDescriptor propertyDescriptor) => new PropertyItem
|
protected virtual PropertyItem CreatePropertyItem(PropertyDescriptor propertyDescriptor) => new()
|
||||||
{
|
{
|
||||||
Category = PropertyResolver.ResolveCategory(propertyDescriptor),
|
Category = PropertyResolver.ResolveCategory(propertyDescriptor),
|
||||||
DisplayName = PropertyResolver.ResolveDisplayName(propertyDescriptor),
|
DisplayName = PropertyResolver.ResolveDisplayName(propertyDescriptor),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public class PropertyResolver
|
public class PropertyResolver
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<Type, EditorTypeCode> TypeCodeDic = new Dictionary<Type, EditorTypeCode>
|
private static readonly Dictionary<Type, EditorTypeCode> TypeCodeDic = new()
|
||||||
{
|
{
|
||||||
[typeof(string)] = EditorTypeCode.PlainText,
|
[typeof(string)] = EditorTypeCode.PlainText,
|
||||||
[typeof(sbyte)] = EditorTypeCode.SByteNumber,
|
[typeof(sbyte)] = EditorTypeCode.SByteNumber,
|
||||||
@@ -99,10 +99,10 @@ namespace HandyControl.Controls
|
|||||||
_ => new ReadOnlyTextPropertyEditor()
|
_ => new ReadOnlyTextPropertyEditor()
|
||||||
}
|
}
|
||||||
: type.IsSubclassOf(typeof(Enum))
|
: type.IsSubclassOf(typeof(Enum))
|
||||||
? (PropertyEditorBase) new EnumPropertyEditor()
|
? new EnumPropertyEditor()
|
||||||
: new ReadOnlyTextPropertyEditor();
|
: new ReadOnlyTextPropertyEditor();
|
||||||
|
|
||||||
public virtual PropertyEditorBase CreateEditor(Type type) => new ReadOnlyTextPropertyEditor();
|
public virtual PropertyEditorBase CreateEditor(Type type) => Activator.CreateInstance(type) as PropertyEditorBase ?? new ReadOnlyTextPropertyEditor();
|
||||||
|
|
||||||
private enum EditorTypeCode
|
private enum EditorTypeCode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private BitmapSource _imageSource;
|
private BitmapSource _imageSource;
|
||||||
|
|
||||||
private static readonly Guid BmpGuid = new Guid("{b96b3cab-0728-11d3-9d7b-0000f81ef32e}");
|
private static readonly Guid BmpGuid = new("{b96b3cab-0728-11d3-9d7b-0000f81ef32e}");
|
||||||
|
|
||||||
#region const
|
#region const
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public ScreenshotWindow(Screenshot screenshot)
|
public ScreenshotWindow(Screenshot screenshot)
|
||||||
{
|
{
|
||||||
Style = ResourceHelper.GetResource<Style>(ResourceToken.Window4ScreenshotStyle);
|
Style = ResourceHelper.GetResourceInternal<Style>(ResourceToken.Window4ScreenshotStyle);
|
||||||
_screenshot = screenshot;
|
_screenshot = screenshot;
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ namespace HandyControl.Controls
|
|||||||
if (Role == SideMenuItemRole.Header && ItemsHost.Children.Count > 0)
|
if (Role == SideMenuItemRole.Header && ItemsHost.Children.Count > 0)
|
||||||
{
|
{
|
||||||
var item = ItemsHost.Children.OfType<SideMenuItem>().FirstOrDefault();
|
var item = ItemsHost.Children.OfType<SideMenuItem>().FirstOrDefault();
|
||||||
if (item != null && !item.IsSelected)
|
if (item is { IsSelected: false })
|
||||||
{
|
{
|
||||||
item.OnSelected(new RoutedEventArgs(SelectedEvent, item));
|
item.OnSelected(new RoutedEventArgs(SelectedEvent, item));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
layer.Remove(_adorner);
|
layer.Remove(_adorner);
|
||||||
}
|
}
|
||||||
else if (_adorner != null && _adorner.Parent is AdornerLayer parent)
|
else if (_adorner is { Parent: AdornerLayer parent })
|
||||||
{
|
{
|
||||||
parent.Remove(_adorner);
|
parent.Remove(_adorner);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
|
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (IsMoveToPointEnabled && _track.ThumbStart != null && !_track.ThumbStart.IsMouseOver && _track.ThumbEnd != null && !_track.ThumbEnd.IsMouseOver)
|
if (IsMoveToPointEnabled && _track.ThumbStart is { IsMouseOver: false } && _track.ThumbEnd is { IsMouseOver: false })
|
||||||
{
|
{
|
||||||
// Here we need to determine whether it's closer to the starting point or the end point.
|
// Here we need to determine whether it's closer to the starting point or the end point.
|
||||||
var pt = e.MouseDevice.GetPosition(_track);
|
var pt = e.MouseDevice.GetPosition(_track);
|
||||||
@@ -301,7 +301,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
// If ticks collection is available, use it.
|
// If ticks collection is available, use it.
|
||||||
// Note that ticks may be unsorted.
|
// Note that ticks may be unsorted.
|
||||||
if (Ticks != null && Ticks.Count > 0)
|
if (Ticks is { Count: > 0 })
|
||||||
{
|
{
|
||||||
foreach (var tick in Ticks)
|
foreach (var tick in Ticks)
|
||||||
{
|
{
|
||||||
@@ -341,7 +341,7 @@ namespace HandyControl.Controls
|
|||||||
var previous = Minimum;
|
var previous = Minimum;
|
||||||
var next = Maximum;
|
var next = Maximum;
|
||||||
|
|
||||||
if (Ticks != null && Ticks.Count > 0)
|
if (Ticks is { Count: > 0 })
|
||||||
{
|
{
|
||||||
foreach (var tick in Ticks)
|
foreach (var tick in Ticks)
|
||||||
{
|
{
|
||||||
@@ -429,7 +429,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
// Show AutoToolTip if needed.
|
// Show AutoToolTip if needed.
|
||||||
|
|
||||||
if (!(e.OriginalSource is RangeThumb thumb)) return;
|
if (e.OriginalSource is not RangeThumb thumb) return;
|
||||||
_thumbCurrent = thumb;
|
_thumbCurrent = thumb;
|
||||||
_originThumbPoint = Mouse.GetPosition(_thumbCurrent);
|
_originThumbPoint = Mouse.GetPosition(_thumbCurrent);
|
||||||
_thumbCurrent.StartDrag();
|
_thumbCurrent.StartDrag();
|
||||||
@@ -531,7 +531,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
protected virtual void OnThumbDragDelta(DragDeltaEventArgs e)
|
protected virtual void OnThumbDragDelta(DragDeltaEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(e.OriginalSource is Thumb thumb)) return;
|
if (e.OriginalSource is not Thumb thumb) return;
|
||||||
var isStart = thumb.Equals(_track.ThumbStart);
|
var isStart = thumb.Equals(_track.ThumbStart);
|
||||||
if (!isStart)
|
if (!isStart)
|
||||||
{
|
{
|
||||||
@@ -579,7 +579,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
// Show AutoToolTip if needed.
|
// Show AutoToolTip if needed.
|
||||||
|
|
||||||
if (!(e.OriginalSource is Thumb thumb) || AutoToolTipPlacement == AutoToolTipPlacement.None)
|
if (e.OriginalSource is not Thumb thumb || AutoToolTipPlacement == AutoToolTipPlacement.None)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -397,10 +397,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (oldValue != newValue)
|
if (oldValue != newValue)
|
||||||
{
|
{
|
||||||
if (_visualChildren == null)
|
_visualChildren ??= new Visual[5];
|
||||||
{
|
|
||||||
_visualChildren = new Visual[5];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oldValue != null)
|
if (oldValue != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
for (var i = 0; i < Items.Count; i++)
|
for (var i = 0; i < Items.Count; i++)
|
||||||
{
|
{
|
||||||
if (!(ItemContainerGenerator.ContainerFromIndex(i) is TabItem item)) return;
|
if (ItemContainerGenerator.ContainerFromIndex(i) is not TabItem item) return;
|
||||||
item.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
item.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||||
item.TabPanel = HeaderPanel;
|
item.TabPanel = HeaderPanel;
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,7 @@ namespace HandyControl.Controls
|
|||||||
_buttonOverflow.Menu.Items.Clear();
|
_buttonOverflow.Menu.Items.Clear();
|
||||||
for (var i = 0; i < Items.Count; i++)
|
for (var i = 0; i < Items.Count; i++)
|
||||||
{
|
{
|
||||||
if (!(ItemContainerGenerator.ContainerFromIndex(i) is TabItem item)) continue;
|
if (ItemContainerGenerator.ContainerFromIndex(i) is not TabItem item) continue;
|
||||||
|
|
||||||
var menuItem = new MenuItem
|
var menuItem = new MenuItem
|
||||||
{
|
{
|
||||||
@@ -350,14 +350,10 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
list.Remove(actualItem);
|
list.Remove(actualItem);
|
||||||
list.Insert(0, actualItem);
|
list.Insert(0, actualItem);
|
||||||
if (IsAnimationEnabled)
|
HeaderPanel.SetValue(TabPanel.FluidMoveDurationPropertyKey,
|
||||||
{
|
IsAnimationEnabled
|
||||||
HeaderPanel.SetValue(TabPanel.FluidMoveDurationPropertyKey, new Duration(TimeSpan.FromMilliseconds(200)));
|
? new Duration(TimeSpan.FromMilliseconds(200))
|
||||||
}
|
: new Duration(TimeSpan.FromMilliseconds(0)));
|
||||||
else
|
|
||||||
{
|
|
||||||
HeaderPanel.SetValue(TabPanel.FluidMoveDurationPropertyKey, new Duration(TimeSpan.FromMilliseconds(0)));
|
|
||||||
}
|
|
||||||
HeaderPanel.ForceUpdate = true;
|
HeaderPanel.ForceUpdate = true;
|
||||||
HeaderPanel.Measure(new Size(HeaderPanel.DesiredSize.Width, ActualHeight));
|
HeaderPanel.Measure(new Size(HeaderPanel.DesiredSize.Width, ActualHeight));
|
||||||
HeaderPanel.ForceUpdate = false;
|
HeaderPanel.ForceUpdate = false;
|
||||||
@@ -396,7 +392,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
var argsClosing = new CancelRoutedEventArgs(TabItem.ClosingEvent, item);
|
var argsClosing = new CancelRoutedEventArgs(TabItem.ClosingEvent, item);
|
||||||
|
|
||||||
if (!(ItemContainerGenerator.ContainerFromItem(item) is TabItem tabItem)) continue;
|
if (ItemContainerGenerator.ContainerFromItem(item) is not TabItem tabItem) continue;
|
||||||
|
|
||||||
tabItem.RaiseEvent(argsClosing);
|
tabItem.RaiseEvent(argsClosing);
|
||||||
if (argsClosing.Cancel) return;
|
if (argsClosing.Cancel) return;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ namespace HandyControl.Controls
|
|||||||
menu.SetBinding(VisibilityProperty, new Binding(ShowContextMenuProperty.Name)
|
menu.SetBinding(VisibilityProperty, new Binding(ShowContextMenuProperty.Name)
|
||||||
{
|
{
|
||||||
Source = this,
|
Source = this,
|
||||||
Converter = ResourceHelper.GetResource<IValueConverter>(ResourceToken.Boolean2VisibilityConverter)
|
Converter = ResourceHelper.GetResourceInternal<IValueConverter>(ResourceToken.Boolean2VisibilityConverter)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace HandyControl.Controls
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 选项卡字典
|
/// 选项卡字典
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal Dictionary<int, TabItem> ItemDic = new Dictionary<int, TabItem>();
|
internal Dictionary<int, TabItem> ItemDic = new();
|
||||||
|
|
||||||
public static readonly DependencyPropertyKey FluidMoveDurationPropertyKey =
|
public static readonly DependencyPropertyKey FluidMoveDurationPropertyKey =
|
||||||
DependencyProperty.RegisterReadOnly("FluidMoveDuration", typeof(Duration), typeof(TabPanel),
|
DependencyProperty.RegisterReadOnly("FluidMoveDuration", typeof(Duration), typeof(TabPanel),
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
|
using HandyControl.Tools.Helper;
|
||||||
|
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
@@ -201,27 +201,8 @@ namespace HandyControl.Controls
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET40 || NET45 || NET451 || NET452 || NET46|| NET461
|
_formattedText = TextHelper.CreateFormattedText(Text, FlowDirection,
|
||||||
_formattedText = new FormattedText(
|
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize);
|
||||||
Text,
|
|
||||||
CultureInfo.CurrentUICulture,
|
|
||||||
FlowDirection,
|
|
||||||
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch),
|
|
||||||
FontSize, Fill);
|
|
||||||
#else
|
|
||||||
var source = PresentationSource.FromVisual(this);
|
|
||||||
var dpi = 1.0;
|
|
||||||
if (source?.CompositionTarget != null)
|
|
||||||
{
|
|
||||||
dpi = 96.0 * source.CompositionTarget.TransformToDevice.M11 / 96.0;
|
|
||||||
}
|
|
||||||
_formattedText = new FormattedText(
|
|
||||||
Text,
|
|
||||||
CultureInfo.CurrentUICulture,
|
|
||||||
FlowDirection,
|
|
||||||
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch),
|
|
||||||
FontSize, Fill, dpi);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UpdateFormattedText();
|
UpdateFormattedText();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
|
using HandyControl.Tools.Helper;
|
||||||
|
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
@@ -129,27 +129,8 @@ namespace HandyControl.Controls
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET40 || NET45 || NET451 || NET452 || NET46|| NET461
|
_formattedText = TextHelper.CreateFormattedText(Text, FlowDirection,
|
||||||
_formattedText = new FormattedText(
|
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize);
|
||||||
Text,
|
|
||||||
CultureInfo.CurrentUICulture,
|
|
||||||
FlowDirection,
|
|
||||||
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch),
|
|
||||||
FontSize, Foreground);
|
|
||||||
#else
|
|
||||||
var source = PresentationSource.FromVisual(this);
|
|
||||||
var dpi = 1.0;
|
|
||||||
if (source?.CompositionTarget != null)
|
|
||||||
{
|
|
||||||
dpi = 96.0 * source.CompositionTarget.TransformToDevice.M11 / 96.0;
|
|
||||||
}
|
|
||||||
_formattedText = new FormattedText(
|
|
||||||
Text,
|
|
||||||
CultureInfo.CurrentUICulture,
|
|
||||||
FlowDirection,
|
|
||||||
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch),
|
|
||||||
FontSize, Foreground, dpi);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UpdateFormattedText();
|
UpdateFormattedText();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,11 +173,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
if (_isHandlerSuspended == null)
|
_isHandlerSuspended ??= new Dictionary<DependencyProperty, bool>(2);
|
||||||
{
|
|
||||||
_isHandlerSuspended = new Dictionary<DependencyProperty, bool>(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
_isHandlerSuspended[property] = true;
|
_isHandlerSuspended[property] = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
@@ -110,6 +111,7 @@ namespace HandyControl.Controls
|
|||||||
selector.ItemsSource = list;
|
selector.ItemsSource = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "MergeIntoPattern")]
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (_hourList.SelectedIndex >= 0 && _hourList.SelectedIndex < 24 &&
|
if (_hourList.SelectedIndex >= 0 && _hourList.SelectedIndex < 24 &&
|
||||||
|
|||||||
Loaded 100 of 173 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user