This commit is contained in:
NaBian committed 2020-10-11 12:29:23 +08:00
commit 86f7c30566
53 files changed
+343 -4227

No files matched your search

@@ -132,7 +132,7 @@
<RowDefinition/>
</Grid.RowDefinitions>
<DockPanel LastChildFill="True" Margin="0,0,0,6">
<hc:ButtonGroup Style="{StaticResource ButtonGroupSolid}">
<hc:ButtonGroup Margin="0,0,6,0" Visibility="{Binding ShowSortButton,RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource ButtonGroupSolid}">
<RadioButton Command="interactivity:ControlCommands.SortByCategory" IsChecked="True">
<Rectangle Width="16" Height="16" Fill="{StaticResource SortByCategoryDrawingBrush}"/>
</RadioButton>
@@ -140,7 +140,7 @@
<Rectangle Width="16" Height="16" Fill="{StaticResource SortByNameDrawingBrush}"/>
</RadioButton>
</hc:ButtonGroup>
<hc:SearchBar x:Name="PART_SearchBar" IsRealTime="True" Margin="6,0,0,0" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
<hc:SearchBar x:Name="PART_SearchBar" IsRealTime="True" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/>
</DockPanel>
<ScrollViewer Grid.Row="1">
<hc:PropertyItemsControl x:Name="PART_ItemsControl" Style="{StaticResource PropertyItemsControlBaseStyle}">
@@ -1,15 +1,25 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
xmlns:themes="clr-namespace:HandyControl.Themes">
<ResourceDictionary.MergedDictionaries>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Window.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="MessageBoxButtonStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="MinWidth" Value="88"/>
<Setter Property="Visibility" Value="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}"/>
<Setter Property="Margin" Value="5,0"/>
</Style>
<Style x:Key="MessageBoxPrimaryButtonStyle" BasedOn="{StaticResource ButtonPrimary}" TargetType="Button">
<Setter Property="MinWidth" Value="88"/>
<Setter Property="Visibility" Value="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}"/>
<Setter Property="Margin" Value="5,0"/>
</Style>
<Style TargetType="hc:MessageBox" BasedOn="{StaticResource WindowWin10}">
<Setter Property="MinHeight" Value="172"/>
<Setter Property="ShowInTaskbar" Value="False"/>
@@ -33,7 +43,7 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel WindowChrome.IsHitTestVisibleInChrome="True" UseLayoutRounding="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
<Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" Name="ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
<Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" IsTabStop="False" Name="PART_ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
</StackPanel>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
@@ -75,12 +85,7 @@
<ScrollViewer Grid.Column="1" Grid.Row="0">
<TextBlock Margin="10,39,10,10" Text="{TemplateBinding Message}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</ScrollViewer>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{ex:Lang Key={x:Static langs:LangKeys.Cancel}}" Margin="5,0"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Margin="5,0" Style="{StaticResource ButtonPrimary}"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{ex:Lang Key={x:Static langs:LangKeys.No}}" Margin="5,0"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Yes" Content="{ex:Lang Key={x:Static langs:LangKeys.Yes}}" Margin="5,0" Style="{StaticResource ButtonPrimary}"/>
</StackPanel>
<StackPanel Name="PART_Panel" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center"/>
</Grid>
</Grid>
</Border>
@@ -88,9 +93,9 @@
<Trigger Property="IsActive" Value="False">
<Setter Property="Opacity" Value=".8" TargetName="ContentPresenterMain"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
<Setter Property="Background" TargetName="ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
<Setter Property="Foreground" TargetName="ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
<Trigger Property="IsMouseOver" Value="True" SourceName="PART_ButtonClose">
<Setter Property="Background" TargetName="PART_ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
<Setter Property="Foreground" TargetName="PART_ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>