update to v1.3.2

This commit is contained in:
NaBian 2018-10-10 16:38:52 +08:00
parent bd3608a73e
commit ac3e41e9e6
57 changed files with 634 additions and 318 deletions

View File

@ -1,3 +1,10 @@
2018.10.09 Version 1.3.2
* new style
- add TabControl
* fixed bug
- ColorPicker's text is gone.
2018.10.09 Version 1.3.1
* new style
- add TextBox

View File

@ -13,32 +13,32 @@
<EventTrigger RoutedEvent="FrameworkElement.MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="GridTop" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:.1"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="GridTop" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="FrameworkElement.MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="GridTop" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:.1"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="GridTop" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</UserControl.Triggers>
<Grid ClipToBounds="True">
<ListBox HorizontalAlignment="Left" Name="ListBoxMain" BorderThickness="0" ItemsSource="{Binding ItemsSource,ElementName=UserControlMain}" Style="{StaticResource StackPanelListBox}"></ListBox>
<ListBox HorizontalAlignment="Left" Name="ListBoxMain" BorderThickness="0" ItemsSource="{Binding ItemsSource,ElementName=UserControlMain}" Style="{StaticResource StackPanelListBox}"/>
<Grid Name="GridTop" Opacity="0">
<Button Click="ButtonPrev_OnClick" Name="ButtonPrev" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="30,0,0,0" Style="{StaticResource ButtonCustom}">
<Border Width="50" Height="100" Background="#44000000" CornerRadius="2">
<Path Margin="16" Fill="White" Style="{StaticResource LeftPathStyle}"></Path>
<Path Margin="16" Fill="White" Style="{StaticResource LeftPathStyle}"/>
</Border>
</Button>
<Button Click="ButtonNext_OnClick" Name="ButtonNext" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,30,0" Style="{StaticResource ButtonCustom}">
<Border Width="50" Height="100" Background="#44000000" CornerRadius="2">
<Path Margin="16" Fill="White" Style="{StaticResource RightPathStyle}"></Path>
<Path Margin="16" Fill="White" Style="{StaticResource RightPathStyle}"/>
</Border>
</Button>
</Grid>
<StackPanel Button.Click="ButtonPages_OnClick" Name="PanelPage" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,20"></StackPanel>
<StackPanel Button.Click="ButtonPages_OnClick" Name="PanelPage" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,20"/>
</Grid>
</UserControl>

View File

@ -17,9 +17,9 @@
<RowDefinition Height="62"/>
<RowDefinition Height="62"/>
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Grid.RowSpan="4" Background="White" CornerRadius="{Binding CornerRadius,ElementName=UserControlMain}"></Border>
<Border BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Grid.RowSpan="4" Background="White" CornerRadius="{Binding CornerRadius,ElementName=UserControlMain}"/>
<Grid Margin="1" Grid.Row="0" Name="GridColor">
<Border Background="{Binding BackColor,ElementName=UserControlMain}"></Border>
<Border Background="{Binding BackColor,ElementName=UserControlMain}"/>
<Border>
<Border.Background>
<ImageBrush ImageSource="/HandyControl;component/Resources/colorPickerBack.png"/>
@ -50,45 +50,45 @@
<ColumnDefinition/>
<ColumnDefinition Width="28"/>
</Grid.ColumnDefinitions>
<Border Width="60" Height="32" CornerRadius="2" Background="{StaticResource ColorPickerOpacityBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"></Border>
<Border Grid.Row="0" Grid.Column="0" Width="60" Height="32" CornerRadius="2" Background="{Binding SelectedBrush,ElementName=UserControlMain}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"></Border>
<Slider Name="SliderColor" LargeChange="0.01" SmallChange="0.01" Grid.ColumnSpan="2" ValueChanged="SliderColor_OnValueChanged" Value="6" Maximum="6" Background="{StaticResource ColorPickerRainbowBrush}" Margin="10,1,0,0" Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"></Slider>
<Slider Grid.ColumnSpan="2" IsSnapToTickEnabled="True" Name="SliderOpacity" ValueChanged="SliderOpacity_OnValueChanged" Value="255" Maximum="255" SmallChange="1" Foreground="{Binding SelectedBrushWithoutOpacity,ElementName=UserControlMain}" Background="{StaticResource ColorPickerOpacityBrush}" Margin="10,0,0,0" Grid.Row="0" Grid.Column="1" VerticalAlignment="Bottom" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"></Slider>
<Border Width="60" Height="32" CornerRadius="2" Background="{StaticResource ColorPickerOpacityBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"/>
<Border Grid.Row="0" Grid.Column="0" Width="60" Height="32" CornerRadius="2" Background="{Binding SelectedBrush,ElementName=UserControlMain}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"/>
<Slider Name="SliderColor" LargeChange="0.01" SmallChange="0.01" Grid.ColumnSpan="2" ValueChanged="SliderColor_OnValueChanged" Value="6" Maximum="6" Background="{StaticResource ColorPickerRainbowBrush}" Margin="10,1,0,0" Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"/>
<Slider Grid.ColumnSpan="2" IsSnapToTickEnabled="True" Name="SliderOpacity" ValueChanged="SliderOpacity_OnValueChanged" Value="255" Maximum="255" SmallChange="1" Foreground="{Binding SelectedBrushWithoutOpacity,ElementName=UserControlMain}" Background="{StaticResource ColorPickerOpacityBrush}" Margin="10,0,0,0" Grid.Row="0" Grid.Column="1" VerticalAlignment="Bottom" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"/>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,14,0,0" VerticalAlignment="Top" Visibility="{Binding ShowList[0],ElementName=UserControlMain,Converter={StaticResource Boolean2VisibilityConverter}}">
<controls:InfoTextBox Text="{Binding SelectedBrush,ElementName=UserControlMain,Mode=TwoWay,Converter={StaticResource Color2HexStrConverter},UpdateSourceTrigger=LostFocus}" FontSize="10" ShowSmallCornerRadius="True" MaxLength="10" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" ></controls:InfoTextBox>
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="HEX" HorizontalAlignment="Center"></TextBlock>
<TextBox Padding="0" HorizontalContentAlignment="Center" Width="176" Text="{Binding SelectedBrush,ElementName=UserControlMain,Mode=TwoWay,Converter={StaticResource Color2HexStrConverter},UpdateSourceTrigger=LostFocus}" FontSize="10" MaxLength="10" Height="24" />
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="HEX" HorizontalAlignment="Center"/>
</StackPanel>
<UniformGrid controls:InfoNumericUpDown.ValueChanged="InfoNumericUpDownRgb_OnValueChanged" Visibility="{Binding ShowList[1],ElementName=UserControlMain,Converter={StaticResource Boolean2VisibilityConverter}}" Rows="1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="-2,14,-2,0" VerticalAlignment="Top">
<StackPanel Margin="2,0">
<controls:InfoNumericUpDown Tag="R" x:Name="ChannelR" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" ></controls:InfoNumericUpDown>
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="R" HorizontalAlignment="Center"></TextBlock>
<controls:InfoNumericUpDown Tag="R" x:Name="ChannelR" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" />
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="R" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Margin="2,0">
<controls:InfoNumericUpDown Tag="G" x:Name="ChannelG" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" ></controls:InfoNumericUpDown>
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="G" HorizontalAlignment="Center"></TextBlock>
<controls:InfoNumericUpDown Tag="G" x:Name="ChannelG" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" />
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="G" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Margin="2,0">
<controls:InfoNumericUpDown Tag="B" x:Name="ChannelB" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" ></controls:InfoNumericUpDown>
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="B" HorizontalAlignment="Center"></TextBlock>
<controls:InfoNumericUpDown Tag="B" x:Name="ChannelB" Value="255" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" />
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="B" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Margin="2,0">
<controls:InfoNumericUpDown Value="{Binding Value,ElementName=SliderOpacity,Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" ></controls:InfoNumericUpDown>
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="A" HorizontalAlignment="Center"></TextBlock>
<controls:InfoNumericUpDown Value="{Binding Value,ElementName=SliderOpacity,Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" TextPadding="0" FontSize="10" ShowSmallCornerRadius="True" ShowClearButton="False" HorizontalTextAlignment="Center" IsNeedly="False" Height="24" />
<TextBlock Foreground="{StaticResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="A" HorizontalAlignment="Center"/>
</StackPanel>
</UniformGrid>
<Button Click="ButtonSwitch_OnClick" Padding="6" FontSize="8" BorderThickness="0" Foreground="#323534" HorizontalAlignment="Right" Height="24" Width="20" Grid.Column="2" Grid.Row="1">
<Button.Content>
<Path Fill="#323534" Style="{StaticResource UpDownPathStyle}"></Path>
<Path Fill="#323534" Style="{StaticResource UpDownPathStyle}"/>
</Button.Content>
</Button>
</Grid>
<Border Grid.Row="2" BorderThickness="0,1,0,0" BorderBrush="{StaticResource BorderBrush}">
<WrapPanel Name="PanelColor" Margin="12,12,0,12" HorizontalAlignment="Center"></WrapPanel>
<WrapPanel Name="PanelColor" Margin="12,12,0,12" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{StaticResource BorderBrush}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Click="ButtonCancel_OnClick" Content="{x:Static langs:Lang.Cancel}" Width="80" Margin="0,0,16,0"></Button>
<Button Click="ButtonSure_OnClick" Content="{x:Static langs:Lang.Confirm}" Width="80" Style="{StaticResource ButtonPrimary}"></Button>
<Button Click="ButtonCancel_OnClick" Content="{x:Static langs:Lang.Cancel}" Width="80" Margin="0,0,16,0"/>
<Button Click="ButtonSure_OnClick" Content="{x:Static langs:Lang.Confirm}" Width="80" Style="{StaticResource ButtonPrimary}"/>
</StackPanel>
</Border>
</Grid>

View File

@ -40,21 +40,21 @@
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="#E5DEDEDE" CornerRadius="8" Width="320"></Border>
<Path Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="0,15,0,0" Width="30" Height="30" Data="{Binding Icon,ElementName=UserControlThis}" Stretch="Uniform" Fill="{Binding IconBrush,ElementName=UserControlThis}"></Path>
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="#E5DEDEDE" CornerRadius="8" Width="320"/>
<Path Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="0,15,0,0" Width="30" Height="30" Data="{Binding Icon,ElementName=UserControlThis}" Stretch="Uniform" Fill="{Binding IconBrush,ElementName=UserControlThis}"/>
<StackPanel Grid.Row="0" Grid.Column="1" Margin="0,12,10,10">
<TextBlock Text="{Binding Message,ElementName=UserControlThis}" Style="{StaticResource TextBlockDefault}" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
<TextBlock Text="{Binding Time,ElementName=UserControlThis,StringFormat=yyyy/MM/dd HH:mm:ss}" Style="{StaticResource TextBlockDefault}" Foreground="{StaticResource SecondaryTextBrush}" HorizontalAlignment="Left" Margin="0,4,0,0"></TextBlock>
<TextBlock Text="{Binding Message,ElementName=UserControlThis}" Style="{StaticResource TextBlockDefault}" HorizontalAlignment="Left" TextWrapping="Wrap"/>
<TextBlock Text="{Binding Time,ElementName=UserControlThis,StringFormat=yyyy/MM/dd HH:mm:ss}" Style="{StaticResource TextBlockDefault}" Foreground="{StaticResource SecondaryTextBrush}" HorizontalAlignment="Left" Margin="0,4,0,0"/>
</StackPanel>
<Button Grid.Row="0" Visibility="Collapsed" Margin="11,0" Name="ButtonClose" Click="ButtonClose_OnClick" Grid.Column="2" Background="Transparent" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="18" Height="18">
<Path Data="{StaticResource ErrorGeometry}" Stretch="Uniform" Fill="{StaticResource SecondaryTextBrush}"></Path>
<Path Data="{StaticResource ErrorGeometry}" Stretch="Uniform" Fill="{StaticResource SecondaryTextBrush}"/>
</Button>
<StackPanel Name="PanelMore" IsEnabled="False" Visibility="Collapsed" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="3" Height="28" Grid.Column="0">
<Button Click="ButtonCancel_OnClick" Style="{StaticResource ButtonCustom}" Width="160">
<TextBlock Text="{x:Static langs:Lang.Cancel}" HorizontalAlignment="Center" Foreground="{StaticResource DangerBrush}"></TextBlock>
<TextBlock Text="{x:Static langs:Lang.Cancel}" HorizontalAlignment="Center" Foreground="{StaticResource DangerBrush}"/>
</Button>
<Button Click="ButtonOk_OnClick" Style="{StaticResource ButtonCustom}" Width="160">
<TextBlock Text="{x:Static langs:Lang.Confirm}" HorizontalAlignment="Center" Foreground="{StaticResource PrimaryBrush}"></TextBlock>
<TextBlock Text="{x:Static langs:Lang.Confirm}" HorizontalAlignment="Center" Foreground="{StaticResource PrimaryBrush}"/>
</Button>
</StackPanel>
</Grid>

View File

@ -44,10 +44,10 @@
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Name="StackPanelTitle" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
<TextBlock Visibility="{Binding IsNeedly,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Margin="0,0,6,0" Text="*" Foreground="{DynamicResource DangerBrush}"></TextBlock>
<TextBlock Style="{StaticResource TextBlockDefault}" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource String2VisibilityConverter}}" Margin="0,0,10,0" Text="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBlock>
<TextBlock Visibility="{Binding IsNeedly,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Margin="0,0,6,0" Text="*" Foreground="{DynamicResource DangerBrush}"/>
<TextBlock Style="{StaticResource TextBlockDefault}" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource String2VisibilityConverter}}" Margin="0,0,10,0" Text="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"/>
</StackPanel>
<TextBlock Margin="4,0,0,1" Grid.Row="1" Name="TextBlockError" Grid.Column="1" VerticalAlignment="Bottom" FontSize="12" Foreground="{DynamicResource DangerBrush}" Text="{Binding ErrorStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBlock>
<TextBlock Margin="4,0,0,1" Grid.Row="1" Name="TextBlockError" Grid.Column="1" VerticalAlignment="Bottom" FontSize="12" Foreground="{DynamicResource DangerBrush}" Text="{Binding ErrorStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"/>
<Border Grid.Row="1" Name="Border" Background="White" Grid.Column="1" CornerRadius="{Binding CornerRadius,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" BorderThickness="1" BorderBrush="Transparent">
<Grid>
<Grid.ColumnDefinitions>
@ -56,10 +56,10 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding PlaceHolder,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalAlignment="Left" Padding="10,0" FontSize="14" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityReConverter}}" VerticalAlignment="Center" Foreground="{DynamicResource ThirdlyTextBrush}"/>
<TextBox Grid.Column="0" MouseWheel="MyTextBox_OnMouseWheel" HorizontalContentAlignment="{Binding HorizontalTextAlignment,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" TextChanged="InputBox_OnTextChanged" MouseLeave="InputBox_OnMouseLeave" MouseEnter="InputBox_OnMouseEnter" GotFocus="InputBox_OnGotFocus" LostFocus="InputBox_OnLostFocus" Name="MyTextBox" Margin="4,0" BorderThickness="0" VerticalContentAlignment="Center" Padding="{Binding TextPadding,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Text="{Binding Value,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},UpdateSourceTrigger=PropertyChanged}" Background="{x:Null}"></TextBox>
<Button Padding="7" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityConverter}}" Focusable="True" Grid.Column="1" Name="ButtonClear" Click="ButtonClear_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right"></Button>
<Button Visibility="{Binding ShowUpDownButton,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Padding="7,7,7,3" Focusable="True" Grid.Column="2" Click="ButtonUp_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right" VerticalAlignment="Top" Height="17"></Button>
<Button Visibility="{Binding ShowUpDownButton,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Padding="7,3,7,7" Focusable="True" Grid.Column="2" Click="ButtonDown_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="17"></Button>
<TextBox Style="{x:Null}" Grid.Column="0" MouseWheel="MyTextBox_OnMouseWheel" HorizontalContentAlignment="{Binding HorizontalTextAlignment,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" TextChanged="InputBox_OnTextChanged" MouseLeave="InputBox_OnMouseLeave" MouseEnter="InputBox_OnMouseEnter" GotFocus="InputBox_OnGotFocus" LostFocus="InputBox_OnLostFocus" Name="MyTextBox" Margin="4,0" BorderThickness="0" VerticalContentAlignment="Center" Padding="{Binding TextPadding,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Text="{Binding Value,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},UpdateSourceTrigger=PropertyChanged}" Background="{x:Null}"/>
<Button Padding="7" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityConverter}}" Focusable="True" Grid.Column="1" Name="ButtonClear" Click="ButtonClear_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right"/>
<Button Visibility="{Binding ShowUpDownButton,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Padding="7,7,7,3" Focusable="True" Grid.Column="2" Click="ButtonUp_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right" VerticalAlignment="Top" Height="17"/>
<Button Visibility="{Binding ShowUpDownButton,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Padding="7,3,7,7" Focusable="True" Grid.Column="2" Click="ButtonDown_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="17"/>
</Grid>
</Border>
</Grid>

View File

@ -43,10 +43,10 @@
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Name="StackPanelTitle" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
<TextBlock Visibility="{Binding IsNeedly,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Margin="0,0,6,0" Text="*" Foreground="{DynamicResource DangerBrush}"></TextBlock>
<TextBlock Style="{StaticResource TextBlockDefault}" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource String2VisibilityConverter}}" Margin="0,0,10,0" Text="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBlock>
<TextBlock Visibility="{Binding IsNeedly,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Margin="0,0,6,0" Text="*" Foreground="{DynamicResource DangerBrush}"/>
<TextBlock Style="{StaticResource TextBlockDefault}" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=Self},Converter={StaticResource String2VisibilityConverter}}" Margin="0,0,10,0" Text="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"/>
</StackPanel>
<TextBlock Margin="4,0,0,1" Grid.Row="1" Name="TextBlockError" Grid.Column="1" VerticalAlignment="Bottom" FontSize="12" Foreground="{DynamicResource DangerBrush}" Text="{Binding ErrorStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBlock>
<TextBlock Margin="4,0,0,1" Grid.Row="1" Name="TextBlockError" Grid.Column="1" VerticalAlignment="Bottom" FontSize="12" Foreground="{DynamicResource DangerBrush}" Text="{Binding ErrorStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"/>
<Border Grid.Row="1" Name="Border" Background="White" Grid.Column="1" CornerRadius="{Binding CornerRadius,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" BorderThickness="1" BorderBrush="Transparent">
<Grid>
<Grid.ColumnDefinitions>
@ -54,8 +54,8 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding PlaceHolder,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalAlignment="Left" Padding="10,0" FontSize="14" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityReConverter}}" VerticalAlignment="Center" Foreground="{DynamicResource ThirdlyTextBrush}"/>
<TextBox MaxLines="1" MaxLength="{Binding MaxLength,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalContentAlignment="{Binding HorizontalTextAlignment,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Grid.Column="0" TextChanged="InputBox_OnTextChanged" MouseLeave="InputBox_OnMouseLeave" MouseEnter="InputBox_OnMouseEnter" GotFocus="InputBox_OnGotFocus" LostFocus="InputBox_OnLostFocus" Name="MyTextBox" Margin="4,0" BorderThickness="0" VerticalContentAlignment="Center" Padding="{Binding TextPadding,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Text="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},UpdateSourceTrigger=PropertyChanged}" Background="{x:Null}"></TextBox>
<Button Padding="7" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityConverter}}" Focusable="True" Grid.Column="1" Name="ButtonClear" Click="ButtonClear_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right"></Button>
<TextBox MaxLines="1" MaxLength="{Binding MaxLength,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalContentAlignment="{Binding HorizontalTextAlignment,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Grid.Column="0" TextChanged="InputBox_OnTextChanged" MouseLeave="InputBox_OnMouseLeave" MouseEnter="InputBox_OnMouseEnter" GotFocus="InputBox_OnGotFocus" LostFocus="InputBox_OnLostFocus" Name="MyTextBox" Margin="4,0" BorderThickness="0" VerticalContentAlignment="Center" Padding="{Binding TextPadding,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" Text="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},UpdateSourceTrigger=PropertyChanged}" Background="{x:Null}"/>
<Button Padding="7" Visibility="{Binding Text,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource String2VisibilityConverter}}" Focusable="True" Grid.Column="1" Name="ButtonClear" Click="ButtonClear_OnClick" Foreground="{DynamicResource ThirdlyTextBrush}" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Style="{StaticResource ButtonIcon}" Width="36" HorizontalAlignment="Right"/>
</Grid>
</Border>
</Grid>

View File

@ -18,22 +18,22 @@
<!--向左切换-->
<Button Name="LeftButton" Click="ButtonPrev_OnClick" Margin="5,0" VerticalAlignment="Center" Background="{x:Null}" Style="{StaticResource ButtonCustom}">
<Border CornerRadius="2" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Width="30" Height="30" Background="White">
<Path Margin="10" Fill="{StaticResource PrimaryTextBrush}" Style="{StaticResource LeftPathStyle}"></Path>
<Path Margin="10" Fill="{StaticResource PrimaryTextBrush}" Style="{StaticResource LeftPathStyle}"/>
</Border>
</Button>
<StackPanel HorizontalAlignment="Center" Grid.Column="1" RadioButton.Checked="ToggleButton_OnChecked" Orientation="Horizontal">
<RadioButton Name="FirstButton" Tag="1" IsChecked="True" Style="{StaticResource PaginationButtonStyle}"></RadioButton>
<TextBlock Name="LeftTextBlock" Margin="10,0" FontSize="16" Text="..." Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<RadioButton Name="FirstButton" Tag="1" IsChecked="True" Style="{StaticResource PaginationButtonStyle}"/>
<TextBlock Name="LeftTextBlock" Margin="10,0" FontSize="16" Text="..." Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<StackPanel Name="MainPanel" Orientation="Horizontal"></StackPanel>
<StackPanel Name="MainPanel" Orientation="Horizontal"/>
<TextBlock Name="RightTextBlock" Margin="10,0" FontSize="16" Text="..." Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<RadioButton Name="LastButton" Tag="10" Style="{StaticResource PaginationButtonStyle}"></RadioButton>
<TextBlock Name="RightTextBlock" Margin="10,0" FontSize="16" Text="..." Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<RadioButton Name="LastButton" Tag="10" Style="{StaticResource PaginationButtonStyle}"/>
</StackPanel>
<!--向右切换-->
<Button Grid.Column="2" Name="RightButton" Click="ButtonNext_OnClick" Margin="5,0" VerticalAlignment="Center" Background="{x:Null}" Style="{StaticResource ButtonCustom}">
<Border BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" CornerRadius="2" Width="30" Height="30" Background="White">
<Path Margin="10" Fill="{StaticResource PrimaryTextBrush}" Style="{StaticResource RightPathStyle}" RenderTransformOrigin="0.5,0.5"></Path>
<Path Margin="10" Fill="{StaticResource PrimaryTextBrush}" Style="{StaticResource RightPathStyle}" RenderTransformOrigin="0.5,0.5"/>
</Border>
</Button>
</Grid>

View File

@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<Grid>
<ProgressBar HorizontalAlignment="Center" Name="ProgressBarBack" VerticalAlignment="Top" Margin="0,10,0,0" Style="{StaticResource ProgressBarFlat}" Background="{DynamicResource ThirdlyTextBrush}"></ProgressBar>
<UniformGrid Name="UniformGridMain" Rows="1"></UniformGrid>
<ProgressBar HorizontalAlignment="Center" Name="ProgressBarBack" VerticalAlignment="Top" Margin="0,10,0,0" Style="{StaticResource ProgressBarFlat}" Background="{DynamicResource ThirdlyTextBrush}"/>
<UniformGrid Name="UniformGridMain" Rows="1"/>
</Grid>
</UserControl>

View File

@ -9,9 +9,9 @@
Margin="10,0">
<StackPanel>
<Border Background="White" HorizontalAlignment="Center" CornerRadius="12" BorderThickness="2" BorderBrush="{Binding Foreground,ElementName=UserControlMain}" Height="24" MinWidth="24">
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Index,ElementName=UserControlMain}"></TextBlock>
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Index,ElementName=UserControlMain}"/>
</Border>
<TextBlock Margin="0,10,0,0" Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockSubTitleBold}" Text="{Binding IndexStr,ElementName=UserControlMain}"></TextBlock>
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Margin="0,4,0,0" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Title,ElementName=UserControlMain}"></TextBlock>
<TextBlock Margin="0,10,0,0" Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockSubTitleBold}" Text="{Binding IndexStr,ElementName=UserControlMain}"/>
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Margin="0,4,0,0" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Title,ElementName=UserControlMain}"/>
</StackPanel>
</UserControl>

View File

@ -37,12 +37,12 @@
</UserControl.Triggers>
<Grid>
<Border BorderThickness="0,0,0,4" BorderBrush="White" VerticalAlignment="Top" Height="52">
<TextBlock FontSize="16" Text="{Binding SelectedTime,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},StringFormat=yyyy-MM-dd HH:mm:ss}" VerticalAlignment="Top" Margin="0,14,0,0" HorizontalAlignment="Center"></TextBlock>
<TextBlock FontSize="16" Text="{Binding SelectedTime,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},StringFormat=yyyy-MM-dd HH:mm:ss}" VerticalAlignment="Top" Margin="0,14,0,0" HorizontalAlignment="Center"/>
</Border>
<TextBlock Visibility="{Binding ShowSpeStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Text="{Binding SpeStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,14,10,0"></TextBlock>
<TextBlock Visibility="Collapsed" Name="TextBlockSelected" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,2,0,0"></TextBlock>
<Border Width="1" Background="{DynamicResource DangerBrush}"></Border>
<Canvas Name="CanvasSpe" VerticalAlignment="Bottom" Height="28" ></Canvas>
<TextBlock Visibility="{Binding ShowSpeStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},Converter={StaticResource Boolean2VisibilityConverter}}" Text="{Binding SpeStr,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,14,10,0"/>
<TextBlock Visibility="Collapsed" Name="TextBlockSelected" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,2,0,0"/>
<Border Width="1" Background="{DynamicResource DangerBrush}"/>
<Canvas Name="CanvasSpe" VerticalAlignment="Bottom" Height="28" />
<Border PreviewMouseLeftButtonUp="BorderTop_OnPreviewMouseLeftButtonUp" MouseLeftButtonDown="BorderTop_OnMouseLeftButtonDown" Name="BorderTop" Background="Transparent" Cursor="Hand">
<interactivity:Interaction.Behaviors>
<tools:MouseDragElementBehaviorEx LockY="True" x:Name="DragElementBehavior" DragBegun="DragElementBehavior_OnDragBegun" DragFinished="MouseDragElementBehavior_OnDragFinished" Dragging="MouseDragElementBehavior_OnDragging"/>

View File

@ -44,21 +44,21 @@
</Border>
<Border UseLayoutRounding="True" Name="BorderBottom" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="#44000000">
<StackPanel Margin="30,10" VerticalAlignment="Center" Orientation="Horizontal">
<Button Click="ButtonSave_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3"></Button>
<Button Click="ButtonWindowsOpen_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3"></Button>
<Button Click="ButtonSave_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3"/>
<Button Click="ButtonWindowsOpen_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3"/>
<Border Margin="10,2" Style="{StaticResource BorderHorizontallySplitter}"></Border>
<Border Margin="10,2" Style="{StaticResource BorderHorizontallySplitter}"/>
<Button Click="ButtonReduce_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3"></Button>
<TextBlock Margin="6,0" Text="{Binding ScaleStr,ElementName=UserControlMain}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}"></TextBlock>
<Button Click="ButtonEnlarge_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3"></Button>
<Button Click="ButtonReduce_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3"/>
<TextBlock Margin="6,0" Text="{Binding ScaleStr,ElementName=UserControlMain}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}"/>
<Button Click="ButtonEnlarge_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3"/>
<Button Background="Transparent" Click="ButtonActual_OnClick" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="White">
<Border BorderThickness="1" BorderBrush="White" Padding="2">
<TextBlock Text="1:1"></TextBlock>
<TextBlock Text="1:1"/>
</Border>
</Button>
<Border Margin="10,2" Style="{StaticResource BorderHorizontallySplitter}"></Border>
<Button Click="ButtonRotateLeft_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3"></Button>
<Border Margin="10,2" Style="{StaticResource BorderHorizontallySplitter}"/>
<Button Click="ButtonRotateLeft_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3"/>
<Button Click="ButtonRotateRight_OnClick" Margin="6,0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3" RenderTransformOrigin="0.5,0.5">
<Button.RenderTransform>
<TransformGroup>
@ -66,16 +66,16 @@
</TransformGroup>
</Button.RenderTransform>
</Button>
<ToggleButton Foreground="{StaticResource TextIconBrush}" IsChecked="{Binding IsFullScreen,ElementName=UserControlMain}" Click="ButtonScreenChange_OnClick" Margin="6,0" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"></ToggleButton>
<ToggleButton Foreground="{StaticResource TextIconBrush}" IsChecked="{Binding IsFullScreen,ElementName=UserControlMain}" Click="ButtonScreenChange_OnClick" Margin="6,0" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
</StackPanel>
</Border>
<Grid Name="GridTop" Opacity="0" Background="#44000000" MouseLeftButtonDown="CanvasBack_OnMouseLeftButtonDown" VerticalAlignment="Top" Grid.Row="0">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock Text="{Binding ImgPath,ElementName=UserControlMain}" Foreground="White" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="{Binding ImgSize,ElementName=UserControlMain,Converter={StaticResource Long2FileSizeConverter}}" Foreground="White" Margin="30,0,0,0"></TextBlock>
<TextBlock Text="{Binding ImgPath,ElementName=UserControlMain}" Foreground="White" Margin="10,0,0,0"/>
<TextBlock Text="{Binding ImgSize,ElementName=UserControlMain,Converter={StaticResource Long2FileSizeConverter}}" Foreground="White" Margin="30,0,0,0"/>
</StackPanel>
<Button WindowChrome.IsHitTestVisibleInChrome="True" Click="ButtonClose_OnClick" Background="Red" Grid.Row="0" Padding="14" controls:IconElement.Geometry="{StaticResource DeleteGeometry}" Style="{StaticResource ButtonIcon}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="40" Height="40"></Button>
<Button WindowChrome.IsHitTestVisibleInChrome="True" Click="ButtonClose_OnClick" Background="Red" Grid.Row="0" Padding="14" controls:IconElement.Geometry="{StaticResource DeleteGeometry}" Style="{StaticResource ButtonIcon}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="40" Height="40"/>
</Grid>
</Grid>
</controls:WindowBorderless>

View File

@ -16,7 +16,7 @@
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.2"></DoubleAnimation>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
@ -46,12 +46,12 @@
<StackPanel Name="MyStackPanel" Margin="0,0,0,32" Orientation="Horizontal" Background="White" HorizontalAlignment="Center">
<Button Name="ButtonCancle" Visibility="{Binding ShowCancel,ElementName=MyWindow,Converter={StaticResource Boolean2VisibilityConverter}}" Click="ButtonCancle_OnClick" Margin="0,0,16,0" Background="Transparent" Style="{StaticResource ButtonCustom}">
<Border BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}" MinWidth="80" Height="30" CornerRadius="4" Background="White">
<TextBlock FontSize="16" Text="{x:Static langs:Lang.Cancel}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock FontSize="16" Text="{x:Static langs:Lang.Cancel}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Button>
<Button IsDefault="True" Click="ButtonOk_OnClick" Background="Transparent" Style="{DynamicResource ButtonCustom}">
<Border MinWidth="80" Height="30" CornerRadius="4" Background="{DynamicResource PrimaryBrush}">
<TextBlock FontSize="16" Text="{x:Static langs:Lang.Confirm}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock FontSize="16" Text="{x:Static langs:Lang.Confirm}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Button>
</StackPanel>

View File

@ -255,6 +255,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles\Base\TabControlBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles\Base\TimePickerBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -435,6 +439,7 @@
<EmbeddedResource Include="Properties\Langs\Lang.en.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Lang.en.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Langs\Lang.resx">
<Generator>PublicResXFileCodeGenerator</Generator>

View File

@ -10,5 +10,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.3.1.1")]
[assembly: AssemblyFileVersion("1.3.1.1")]
[assembly: AssemblyVersion("1.3.2")]
[assembly: AssemblyFileVersion("1.3.2")]

View File

@ -5,46 +5,46 @@
<GradientStop Color="{DynamicResource PrimaryColor}" Offset="0"/>
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DarkPrimaryBrush" Color="{DynamicResource DarkPrimaryColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkPrimaryBrush" Color="{DynamicResource DarkPrimaryColor}"/>
<SolidColorBrush x:Key="PrimaryTextBrush" Color="{DynamicResource PrimaryTextColor}"></SolidColorBrush>
<SolidColorBrush x:Key="SecondaryTextBrush" Color="{DynamicResource SecondaryTextColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThirdlyTextBrush" Color="{DynamicResource ThirdlyTextColor}"></SolidColorBrush>
<SolidColorBrush x:Key="TextIconBrush" Color="{DynamicResource TextIconColor}"></SolidColorBrush>
<SolidColorBrush x:Key="PrimaryTextBrush" Color="{DynamicResource PrimaryTextColor}"/>
<SolidColorBrush x:Key="SecondaryTextBrush" Color="{DynamicResource SecondaryTextColor}"/>
<SolidColorBrush x:Key="ThirdlyTextBrush" Color="{DynamicResource ThirdlyTextColor}"/>
<SolidColorBrush x:Key="TextIconBrush" Color="{DynamicResource TextIconColor}"/>
<SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource BorderColor}"></SolidColorBrush>
<SolidColorBrush x:Key="BackgroundBrush" Color="{DynamicResource BackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="RegionBrush" Color="{DynamicResource RegionColor}"></SolidColorBrush>
<SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource BorderColor}"/>
<SolidColorBrush x:Key="BackgroundBrush" Color="{DynamicResource BackgroundColor}"/>
<SolidColorBrush x:Key="RegionBrush" Color="{DynamicResource RegionColor}"/>
<SolidColorBrush x:Key="DefaultBrush" Color="{DynamicResource DefaultColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkDefaultBrush" Color="{DynamicResource DarkDefaultColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DefaultBrush" Color="{DynamicResource DefaultColor}"/>
<SolidColorBrush x:Key="DarkDefaultBrush" Color="{DynamicResource DarkDefaultColor}"/>
<LinearGradientBrush x:Key="DangerBrush" EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="{DynamicResource DangerColor}" Offset="0"/>
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DarkDangerBrush" Color="{DynamicResource DarkDangerColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkDangerBrush" Color="{DynamicResource DarkDangerColor}"/>
<LinearGradientBrush x:Key="WarningBrush" EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="{DynamicResource WarningColor}" Offset="0"/>
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DarkWarningBrush" Color="{DynamicResource DarkWarningColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkWarningBrush" Color="{DynamicResource DarkWarningColor}"/>
<LinearGradientBrush x:Key="InfoBrush" EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="{DynamicResource InfoColor}" Offset="0"/>
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DarkInfoBrush" Color="{DynamicResource DarkInfoColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkInfoBrush" Color="{DynamicResource DarkInfoColor}"/>
<LinearGradientBrush x:Key="SuccessBrush" EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="{DynamicResource SuccessColor}" Offset="0"/>
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DarkSuccessBrush" Color="{DynamicResource DarkSuccessColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkSuccessBrush" Color="{DynamicResource DarkSuccessColor}"/>
<SolidColorBrush x:Key="AccentBrush" Color="{DynamicResource AccentColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkAccentBrush" Color="{DynamicResource DarkAccentColor}"></SolidColorBrush>
<SolidColorBrush x:Key="AccentBrush" Color="{DynamicResource AccentColor}"/>
<SolidColorBrush x:Key="DarkAccentBrush" Color="{DynamicResource DarkAccentColor}"/>
<SolidColorBrush x:Key="DarkMaskBrush" Color="{DynamicResource DarkMaskColor}"></SolidColorBrush>
<SolidColorBrush x:Key="DarkMaskBrush" Color="{DynamicResource DarkMaskColor}"/>
</ResourceDictionary>

View File

@ -71,7 +71,7 @@
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
</controls:ScrollViewer>
</Border>
<Border Height="1" Background="White" VerticalAlignment="Top" BorderThickness="1,0" BorderBrush="{DynamicResource BorderBrush}" HorizontalAlignment="Left" Width="{Binding ActualWidth,ElementName=templateRoot}"></Border>
<Border Height="1" Background="White" VerticalAlignment="Top" BorderThickness="1,0" BorderBrush="{DynamicResource BorderBrush}" HorizontalAlignment="Left" Width="{Binding ActualWidth,ElementName=templateRoot}"/>
</Grid>
</Popup>
</Grid>

View File

@ -19,7 +19,7 @@
<Grid>
<Border x:Name="TemplateRoot" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Border.Effect>
<BlurEffect Radius="2"></BlurEffect>
<BlurEffect Radius="2"/>
</Border.Effect>
</Border>
<Grid Margin="{TemplateBinding BorderThickness}">
@ -30,7 +30,7 @@
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
</Border>
</Decorator>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Value,RelativeSource={RelativeSource FindAncestor,AncestorType=ProgressBar},StringFormat={}{0} %}"></TextBlock>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Value,RelativeSource={RelativeSource FindAncestor,AncestorType=ProgressBar},StringFormat={}{0} %}"/>
</Grid>
</Grid>
</Grid>

View File

@ -0,0 +1,72 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="Height" Value="30"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Margin="0"/>
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
</MultiDataTrigger.Conditions>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,0"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/>
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="BorderThickness" TargetName="mainBorder" Value="0,0,0,3"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabControlBaseStyle" TargetType="{x:Type TabControl}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemStyle}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid x:Name="templateRoot" Background="White" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@ -13,7 +13,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"></Border>
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
<!--<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>-->
@ -29,7 +29,7 @@
<ContentPresenter x:Name="ContentPresenterMain" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</StackPanel>
</Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"></Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
@ -212,13 +212,13 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"></Border>
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
<ContentControl HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<Path x:Name="PathIcon" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconSwitchElement.Geometry}"></Path>
<Path x:Name="PathIcon" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconSwitchElement.Geometry}"/>
</ContentControl>
</Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"></Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">

View File

@ -40,10 +40,10 @@
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"></BeginStoryboard>
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"></BeginStoryboard>
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
@ -76,7 +76,7 @@
<RowDefinition/>
</Grid.RowDefinitions>
<Border Background="{DynamicResource PrimaryBrush}" Name="PART_BorderTitle">
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Foreground="White"></TextBlock>
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Foreground="White"/>
</Border>
<Border Grid.Row="1" Background="White">
<Grid>
@ -89,10 +89,10 @@
<Border Background="{DynamicResource DarkDefaultBrush}" Width="178" Height="178" CornerRadius="89"/>
<controls: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"/>
<Ellipse Fill="White" Width="8" Height="8" StrokeThickness="2" Stroke="{DynamicResource PrimaryBrush}" Canvas.Top="85" Canvas.Left="85"></Ellipse>
<Ellipse Fill="White" Width="8" Height="8" StrokeThickness="2" Stroke="{DynamicResource PrimaryBrush}" Canvas.Top="85" Canvas.Left="85"/>
</Canvas>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="0" x:Name="PART_ButtonAm" IsChecked="True" Height="30" Width="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="16,0,0,16" Content="{x:Static langs:Lang.Am}" Style="{StaticResource ClockRadioButtonStyle}"></controls:ClockRadioButton>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="2" x:Name="PART_ButtonPm" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,16" Content="{x:Static langs:Lang.Pm}" Style="{DynamicResource ClockRadioButtonStyle}"></controls:ClockRadioButton>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="0" x:Name="PART_ButtonAm" IsChecked="True" Height="30" Width="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="16,0,0,16" Content="{x:Static langs:Lang.Am}" Style="{StaticResource ClockRadioButtonStyle}"/>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="2" x:Name="PART_ButtonPm" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,16" Content="{x:Static langs:Lang.Pm}" Style="{DynamicResource ClockRadioButtonStyle}"/>
<Button Grid.Column="1" Visibility="{TemplateBinding ShowConfirmButton,Converter={StaticResource Boolean2VisibilityConverter}}" Name="PART_ButtonConfirm" Content="{x:Static langs:Lang.Confirm}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,0,0,19" Height="24" Width="60" VerticalAlignment="Bottom" Background="Transparent" Style="{StaticResource ButtonCustom}"/>
</Grid>
</Border>

View File

@ -32,12 +32,12 @@
<ColumnDefinition/>
<ColumnDefinition Width="{TemplateBinding MinHeight}"/>
</Grid.ColumnDefinitions>
<ContentPresenter ContentSource="Header"></ContentPresenter>
<ToggleButton Foreground="{TemplateBinding Foreground}" Grid.Column="1" Padding="0" Margin="0,0,10,0" Width="12" Height="12" VerticalAlignment="Center" HorizontalAlignment="Right" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" controls:IconSwitchElement.Geometry="{StaticResource DownGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" Style="{StaticResource ToggleButtonIconTransparent}"></ToggleButton>
<ContentPresenter ContentSource="Header"/>
<ToggleButton Foreground="{TemplateBinding Foreground}" Grid.Column="1" Padding="0" Margin="0,0,10,0" Width="12" Height="12" VerticalAlignment="Center" HorizontalAlignment="Right" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" controls:IconSwitchElement.Geometry="{StaticResource DownGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" Style="{StaticResource ToggleButtonIconTransparent}"/>
</Grid>
</ToggleButton.Content>
</ToggleButton>
<ContentPresenter Name="ExpandSite" Visibility="Collapsed" Grid.Row="1" Grid.Column="0"></ContentPresenter>
<ContentPresenter Name="ExpandSite" Visibility="Collapsed" Grid.Row="1" Grid.Column="0"/>
</Grid>
</Border>
<ControlTemplate.Triggers>

View File

@ -6,7 +6,7 @@
</ResourceDictionary.MergedDictionaries>
<!--默认样式-->
<Style BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="{x:Type ListBox}"></Style>
<Style BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="{x:Type ListBox}"/>
<Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
@ -33,7 +33,7 @@
</Style>
<ItemsPanelTemplate x:Key="WrapPanelItemsPanelTemplate">
<WrapPanel FocusVisualStyle="{x:Null}"></WrapPanel>
<WrapPanel FocusVisualStyle="{x:Null}"/>
</ItemsPanelTemplate>
<Style x:Key="WrapPanelListBox" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="{x:Type ListBox}">
@ -42,7 +42,7 @@
</Style>
<ItemsPanelTemplate x:Key="StackPanelItemsPanelTemplate">
<StackPanel FocusVisualStyle="{x:Null}" Orientation="Horizontal"></StackPanel>
<StackPanel FocusVisualStyle="{x:Null}" Orientation="Horizontal"/>
</ItemsPanelTemplate>
<Style x:Key="StackPanelListBox" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="{x:Type ListBox}">

View File

@ -8,7 +8,7 @@
</ResourceDictionary.MergedDictionaries>
<!--直线加载条默认样式-->
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}"></Style>
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}"/>
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
@ -23,7 +23,7 @@
</Style>
<!--圆形加载条默认样式-->
<Style BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}"></Style>
<Style BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}"/>
<Style x:Key="LoadingCircleLight" BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>

View File

@ -19,7 +19,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border Height="30" MinWidth="30" x:Name="border" CornerRadius="2" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<TextBlock Margin="6" FontSize="16" Text="{TemplateBinding Tag}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Margin="6" FontSize="16" Text="{TemplateBinding Tag}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>

View File

@ -46,7 +46,7 @@
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,32"></RectangleGeometry>
<RectangleGeometry Rect="0,0,20,32"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
@ -67,13 +67,13 @@
<Grid x:Name="TemplateRoot" SnapsToDevicePixels="true">
<Border CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Border.Effect>
<BlurEffect Radius="2"></BlurEffect>
<BlurEffect Radius="2"/>
</Border.Effect>
</Border>
<Rectangle x:Name="PART_Track" Margin="1"/>
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="1">
<Grid x:Name="Foreground">
<Border x:Name="Indicator" CornerRadius="4" Background="{TemplateBinding Foreground}"></Border>
<Border x:Name="Indicator" CornerRadius="4" Background="{TemplateBinding Foreground}"/>
</Grid>
</Decorator>
</Grid>
@ -108,7 +108,7 @@
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,32"></RectangleGeometry>
<RectangleGeometry Rect="0,0,20,32"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
@ -138,7 +138,7 @@
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,32"></RectangleGeometry>
<RectangleGeometry Rect="0,0,20,32"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
@ -168,7 +168,7 @@
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,32"></RectangleGeometry>
<RectangleGeometry Rect="0,0,20,32"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
@ -198,7 +198,7 @@
</LinearGradientBrush>
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,32"></RectangleGeometry>
<RectangleGeometry Rect="0,0,20,32"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>

View File

@ -7,8 +7,8 @@
</ResourceDictionary.MergedDictionaries>
<!--default style-->
<Style BasedOn="{StaticResource ScrollViewerNativeBaseStyle}" TargetType="ScrollViewer"></Style>
<Style BasedOn="{StaticResource ScrollViewerNativeBaseStyle}" TargetType="ScrollViewer"/>
<Style BasedOn="{StaticResource ScrollViewerBaseStyle}" TargetType="{x:Type controls:ScrollViewer}"></Style>
<Style BasedOn="{StaticResource ScrollViewerBaseStyle}" TargetType="{x:Type controls:ScrollViewer}"/>
</ResourceDictionary>

View File

@ -22,12 +22,12 @@
</Style>
<ControlTemplate x:Key="ColorPickerSliderThumbTemplate" TargetType="{x:Type Thumb}">
<Border Width="13" Height="13" Background="White" CornerRadius="6.5"></Border>
<Border Width="13" Height="13" Background="White" CornerRadius="6.5"/>
</ControlTemplate>
<ControlTemplate x:Key="ColorPickerSliderHorizontal" TargetType="{x:Type Slider}">
<Grid>
<Border Margin="7,0" Background="{TemplateBinding Background}" MaxHeight="11" CornerRadius="2"></Border>
<Border Margin="7,0" Background="{TemplateBinding Background}" MaxHeight="11" CornerRadius="2"/>
<Border Margin="7,0" Background="{TemplateBinding Foreground}" MaxHeight="11" CornerRadius="2">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
@ -56,7 +56,7 @@
<ControlTemplate x:Key="ColorPickerSliderVertical" TargetType="{x:Type Slider}">
<Grid >
<Border Margin="0,7" CornerRadius="2" MaxWidth="11" Background="{TemplateBinding Background}"></Border>
<Border Margin="0,7" CornerRadius="2" MaxWidth="11" Background="{TemplateBinding Background}"/>
<Border Margin="0,7" CornerRadius="2" MaxWidth="11" Background="{TemplateBinding Foreground}">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
@ -135,7 +135,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<ContentPresenter Content="{TemplateBinding Content}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"></ContentPresenter>
<ContentPresenter Content="{TemplateBinding Content}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
</ControlTemplate>
</Setter.Value>
</Setter>

View File

@ -9,6 +9,7 @@
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
<ResourceDictionary Source="Base/TabControlBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type controls:TabItem}">
@ -112,4 +113,36 @@
</Setter>
</Style>
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="{x:Type TabControl}"/>
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="{x:Type TabItem}">
<Setter Property="MinWidth" Value="0"/>
</Style>
<Style x:Key="TabControlInLine" BasedOn="{StaticResource TabControlBaseStyle}" TargetType="{x:Type TabControl}">
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemInLine}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid x:Name="templateRoot" Background="White" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@ -6,7 +6,7 @@
</ResourceDictionary.MergedDictionaries>
<!--默认样式-->
<Style x:Key="TextBlockDefault" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}"></Style>
<Style x:Key="TextBlockDefault" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}"/>
<Style x:Key="TextBlockDefaultAccent" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
</Style>
@ -51,6 +51,6 @@
<Style x:Key="TextBlockSubTitleBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"/>
</Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}"></Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}"/>
</ResourceDictionary>

View File

@ -85,7 +85,7 @@
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<ContentControl Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<Path x:Name="PathIcon" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconSwitchElement.Geometry}"></Path>
<Path x:Name="PathIcon" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconSwitchElement.Geometry}"/>
</ContentControl>
</Border>
<ControlTemplate.Triggers>
@ -99,7 +99,7 @@
</Style>
<!--开关-->
<Style x:Key="ToggleButtonSwitch" BasedOn="{StaticResource ToggleButtonSwitchBaseStyle}" TargetType="{x:Type ToggleButton}"></Style>
<Style x:Key="ToggleButtonSwitch" BasedOn="{StaticResource ToggleButtonSwitchBaseStyle}" TargetType="{x:Type ToggleButton}"/>
<!--自定义-->
<Style x:Key="ToggleButtonCustom" TargetType="{x:Type ToggleButton}">
@ -118,7 +118,7 @@
<Border x:Name="Chrome" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
<Grid>
<ContentPresenter Name="UnCheckedElement" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<ContentPresenter Name="CheckedElement" Visibility="Collapsed" Content="{Binding Path=(controls:StatusSwitchElement.CheckedElement),RelativeSource={RelativeSource TemplatedParent}}"></ContentPresenter>
<ContentPresenter Name="CheckedElement" Visibility="Collapsed" Content="{Binding Path=(controls:StatusSwitchElement.CheckedElement),RelativeSource={RelativeSource TemplatedParent}}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>

View File

@ -12,7 +12,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToolTip}">
<Border Background="White" Padding="{TemplateBinding Padding}" BorderThickness="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}">
<ContentPresenter Margin="10,0"></ContentPresenter>
<ContentPresenter Margin="10,0"/>
</Border>
</ControlTemplate>
</Setter.Value>

View File

@ -44,10 +44,10 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel WindowChrome.IsHitTestVisibleInChrome="True" UseLayoutRounding="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMin" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMinGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMax" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMaxGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonRestore" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonClose" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource CloseGeometry}" Padding="9"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMin" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMinGeometry}" Padding="17,0"/>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMax" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMaxGeometry}" Padding="17,0"/>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonRestore" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" Padding="17,0"/>
<Button Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonClose" Height="28" Style="{StaticResource ButtonIcon}" Width="44" controls:IconElement.Geometry="{StaticResource CloseGeometry}" Padding="9"/>
</StackPanel>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
@ -55,12 +55,12 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding Icon}" VerticalAlignment="Center"></ContentPresenter>
<TextBlock Name="Title" Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center"></TextBlock>
<ContentPresenter Content="{TemplateBinding Icon}" VerticalAlignment="Center"/>
<TextBlock Name="Title" Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center"/>
<ContentPresenter Grid.Column="2" x:Name="ContentPresenterMain" Content="{TemplateBinding NoUserContent}"/>
</Grid>
</Grid>
<ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}"></ContentPresenter>
<ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}"/>
<ResizeGrip x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed" WindowChrome.ResizeGripDirection="BottomRight" />
</Grid>
</Border>

View File

@ -50,6 +50,8 @@
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
public static readonly string NaiveTabControlDemoCtl = nameof(NaiveTabControlDemoCtl);
public static readonly string LoadShowContent = nameof(LoadShowContent);
}
}

View File

@ -30,7 +30,8 @@ var styleList = new List<string>
"TextBoxDemoCtl",
"TextBlockDemoCtl",
"ComboBoxDemoCtl",
"PasswordBoxDemoCtl"
"PasswordBoxDemoCtl",
"NaiveTabControlDemoCtl"
};
#>
namespace HandyControlDemo.Data

View File

@ -142,6 +142,9 @@
<Compile Include="UserControl\Controls\TimeBarDemoCtl.xaml.cs">
<DependentUpon>TimeBarDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Styles\NaiveTabControlDemoCtl.xaml.cs">
<DependentUpon>NaiveTabControlDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Styles\PasswordBoxDemoCtl.xaml.cs">
<DependentUpon>PasswordBoxDemoCtl.xaml</DependentUpon>
</Compile>
@ -205,7 +208,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\Themes\Styles\TreeViewItem.xaml">
<Page Include="Resources\Themes\Styles\ListBoxItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@ -293,6 +296,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Styles\NaiveTabControlDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Styles\PasswordBoxDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@ -27,9 +27,9 @@
</Grid.ColumnDefinitions>
<userControl:LeftMainContent/>
<userControl:MainContent Grid.Column="1"/>
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{StaticResource BorderBrush}"></GridSplitter>
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{StaticResource BorderBrush}"/>
<controls:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
<StackPanel IsHitTestVisible="True" VerticalAlignment="Top" Background="Transparent" Name="PanelMessage" Margin="0,10,10,10"></StackPanel>
<StackPanel IsHitTestVisible="True" VerticalAlignment="Top" Background="Transparent" Name="PanelMessage" Margin="0,10,10,10"/>
</controls:ScrollViewer>
</Grid>
</controls:WindowBorderless>

View File

@ -12,5 +12,5 @@ using System.Windows;
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyVersion("1.3.1.1")]
[assembly: AssemblyFileVersion("1.3.1.1")]
[assembly: AssemblyVersion("1.3.2")]
[assembly: AssemblyFileVersion("1.3.2")]

View File

@ -9,7 +9,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<Border CornerRadius="4" Background="{TemplateBinding Background}">
<TextBlock Foreground="White" Margin="10,6" Text="{TemplateBinding Content}"></TextBlock>
<TextBlock Foreground="White" Margin="10,6" Text="{TemplateBinding Content}"/>
</Border>
</ControlTemplate>
</Setter.Value>

View File

@ -0,0 +1,43 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<StackPanel Orientation="Horizontal">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@ -4,7 +4,7 @@
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="TreeViewItem.xaml"/>
<ResourceDictionary Source="ListBoxItem.xaml"/>
<ResourceDictionary Source="Label.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
</ResourceDictionary.MergedDictionaries>

View File

@ -1,21 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="TreeViewItemNew" BasedOn="{StaticResource {x:Type TreeViewItem}}" TargetType="{x:Type TreeViewItem}">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Header,RelativeSource={RelativeSource FindAncestor,AncestorType=TreeViewItem}}"></TextBlock>
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@ -4,6 +4,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
<controls:TransitioningContentControl>
<controls:AnimationPath VerticalAlignment="Center" Margin="32" PathLength="400" Duration="0:0:4" Stretch="Uniform" Width="200" Height="200" StrokeThickness="2" Stroke="{StaticResource PrimaryBrush}" Data="M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z"></controls:AnimationPath>
<controls:AnimationPath VerticalAlignment="Center" Margin="32" PathLength="400" Duration="0:0:4" Stretch="Uniform" Width="200" Height="200" StrokeThickness="2" Stroke="{StaticResource PrimaryBrush}" Data="M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z"/>
</controls:TransitioningContentControl>
</UserControl>

View File

@ -5,14 +5,14 @@
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
<controls:TransitioningContentControl>
<controls:Carousel Margin="32" AutoRun="True" Width="600" Height="330" VerticalAlignment="Center">
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/1.jpg"></Image>
<Image Width="300" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/2.jpg"></Image>
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/1.jpg"/>
<Image Width="300" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/2.jpg"/>
<Grid Width="600">
<Image Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/3.jpg"></Image>
<TextBlock Text="示例文本" Style="{StaticResource TextBlockDefault}" FontSize="100" FontWeight="Bold" Foreground="White"></TextBlock>
<Image Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/3.jpg"/>
<TextBlock Text="示例文本" Style="{StaticResource TextBlockDefault}" FontSize="100" FontWeight="Bold" Foreground="White"/>
</Grid>
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/4.jpg"></Image>
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/5.jpg"></Image>
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/4.jpg"/>
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/5.jpg"/>
</controls:Carousel>
</controls:TransitioningContentControl>
</UserControl>

View File

@ -6,13 +6,13 @@
Background="White">
<controls:TransitioningContentControl>
<WrapPanel Margin="32" VerticalAlignment="Center">
<Button Command="{Binding InfoCmd}" Content="Info" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"></Button>
<Button Command="{Binding SuccessCmd}" Content="Success" Margin="5" Style="{StaticResource ButtonSuccess}"></Button>
<Button Command="{Binding WarningCmd}" Content="Warning" Margin="5" Style="{StaticResource ButtonWarning}"></Button>
<Button Command="{Binding ErrorCmd}" Content="Error" Margin="5" Style="{StaticResource ButtonDanger}"></Button>
<Button Command="{Binding AskCmd}" Content="Ask" Margin="5" Background="BlueViolet" Foreground="White"></Button>
<Button Command="{Binding FatalCmd}" Content="Fatal" Margin="5,0"></Button>
<Button Command="{Binding ClearCmd}" Content="Clear" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"></Button>
<Button Command="{Binding InfoCmd}" Content="Info" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
<Button Command="{Binding SuccessCmd}" Content="Success" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<Button Command="{Binding WarningCmd}" Content="Warning" Margin="5" Style="{StaticResource ButtonWarning}"/>
<Button Command="{Binding ErrorCmd}" Content="Error" Margin="5" Style="{StaticResource ButtonDanger}"/>
<Button Command="{Binding AskCmd}" Content="Ask" Margin="5" Background="BlueViolet" Foreground="White"/>
<Button Command="{Binding FatalCmd}" Content="Fatal" Margin="5,0"/>
<Button Command="{Binding ClearCmd}" Content="Clear" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
</WrapPanel>
</controls:TransitioningContentControl>
</UserControl>

View File

@ -5,12 +5,12 @@
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
<controls:TransitioningContentControl>
<StackPanel Width="600" Margin="32" VerticalAlignment="Center">
<controls:LoadingLine></controls:LoadingLine>
<controls:LoadingLine Margin="0,30" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"></controls:LoadingLine>
<controls:LoadingLine/>
<controls:LoadingLine Margin="0,30" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<controls:LoadingCircle/>
<Border VerticalAlignment="Center" Margin="32,0,0,0" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"></controls:LoadingCircle>
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"/>
</Border>
</StackPanel>
</StackPanel>

View File

@ -15,8 +15,8 @@
<controls:StepItem Title="{x:Static langs:Lang.Complete}"/>
</controls:StepBar>
<StackPanel Orientation="Horizontal" Margin="0,32,0,0" HorizontalAlignment="Center">
<Button Command="interactivity:ControlCommands.Prev" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"></Button>
<Button Command="interactivity:ControlCommands.Next" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Margin="16,0,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"></Button>
<Button Command="interactivity:ControlCommands.Prev" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"/>
<Button Command="interactivity:ControlCommands.Next" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Margin="16,0,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"/>
</StackPanel>
</StackPanel>
</controls:TransitioningContentControl>

View File

@ -7,7 +7,47 @@
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<TreeView controls:ScrollViewer.IsEnableInertia="True" BorderThickness="0">
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<TabItem Header="{x:Static langs:Lang.Styles}">
<ListBox BorderThickness="0" SelectionMode="Single">
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Content="{x:Static langs:Lang.Button}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Content="{x:Static langs:Lang.ToggleButton}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Content="{x:Static langs:Lang.TextBlock}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Content="{x:Static langs:Lang.Expander}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Content="{x:Static langs:Lang.Calendar}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}"/>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NaiveTabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}"/>
</ListBox>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Controls}">
<ListBox BorderThickness="0" SelectionMode="Single">
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Content="{x:Static langs:Lang.Clock}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Content="{x:Static langs:Lang.Growl}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Content="{x:Static langs:Lang.Loading}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Content="{x:Static langs:Lang.ColorPicker}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Content="{x:Static langs:Lang.Carousel}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Content="{x:Static langs:Lang.CompareSlider}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Content="{x:Static langs:Lang.TimeBar}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Content="{x:Static langs:Lang.Pagination}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Content="{x:Static langs:Lang.AnimationPath}"/>
<ListBoxItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}"/>
</ListBox>
</TabItem>
</TabControl>
<!--<TreeView controls:ScrollViewer.IsEnableInertia="True" BorderThickness="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectedItemChanged">
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
@ -16,19 +56,20 @@
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Styles}">
<TreeViewItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Header="{x:Static langs:Lang.Button}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Header="{x:Static langs:Lang.ToggleButton}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Header="{x:Static langs:Lang.TextBlock}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Header="{x:Static langs:Lang.TextBox}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Header="{x:Static langs:Lang.ComboBox}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Header="{x:Static langs:Lang.PasswordBox}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Header="{x:Static langs:Lang.TextBlock}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Header="{x:Static langs:Lang.TextBox}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Header="{x:Static langs:Lang.ComboBox}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Header="{x:Static langs:Lang.PasswordBox}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Header="{x:Static langs:Lang.Expander}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Header="{x:Static langs:Lang.ProgressBar}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Header="{x:Static langs:Lang.Calendar}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Header="{x:Static langs:Lang.DatePicker}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Header="{x:Static langs:Lang.DatePicker}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.NaiveTabControlDemoCtl}" Header="{x:Static langs:Lang.TabControl}"/>
</TreeViewItem>
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Controls}">
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Header="{x:Static langs:Lang.CirclePanel}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Header="{x:Static langs:Lang.CirclePanel}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Header="{x:Static langs:Lang.Clock}"/>
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Header="{x:Static langs:Lang.TimePicker}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Header="{x:Static langs:Lang.TimePicker}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Header="{x:Static langs:Lang.StepBar}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Header="{x:Static langs:Lang.Growl}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Header="{x:Static langs:Lang.Loading}"/>
@ -41,5 +82,5 @@
<TreeViewItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Header="{x:Static langs:Lang.AnimationPath}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Header="{x:Static langs:Lang.TabControl}"/>
</TreeViewItem>
</TreeView>
</TreeView>-->
</Border>

View File

@ -1,4 +1,6 @@
// ReSharper disable once CheckNamespace
using System.Windows.Controls;
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
/// <summary>
@ -10,5 +12,19 @@ namespace HandyControlDemo.UserControl
{
InitializeComponent();
}
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 0) return;
if (e.AddedItems[0] is TabItem tabItem && tabItem.Content is ListBox listBox)
{
if (listBox.SelectedItem != null)
{
var item = listBox.SelectedItem;
listBox.SelectedIndex = -1;
listBox.SelectedItem = item;
}
}
}
}
}

View File

@ -8,9 +8,9 @@
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Name="BorderEffect" Grid.RowSpan="2" Background="White" CornerRadius="10" Effect="{StaticResource EffectShadow4}"></Border>
<Border Name="BorderEffect" Grid.RowSpan="2" Background="White" CornerRadius="10" Effect="{StaticResource EffectShadow4}"/>
<Border Height="32" Name="BorderTitle" Grid.Row="0" CornerRadius="10,10,0,0" Background="{StaticResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"></TextBlock>
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"/>
</Border>
<Border Grid.Row="1" ClipToBounds="True">
<ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>

View File

@ -16,15 +16,15 @@
</Button>
<Menu Margin="10,0,0,0" WindowChrome.IsHitTestVisibleInChrome="True" Background="Transparent">
<MenuItem Foreground="White" Header="File">
<MenuItem Header="New repository" InputGestureText="Ctrl+N"></MenuItem>
<Separator></Separator>
<MenuItem Header="Add local repository"></MenuItem>
<MenuItem Header="Clone repository"></MenuItem>
<MenuItem Header="New repository" InputGestureText="Ctrl+N"/>
<Separator/>
<MenuItem Header="Add local repository"/>
<MenuItem Header="Clone repository"/>
</MenuItem>
<MenuItem Foreground="White" Header="Edit"></MenuItem>
<MenuItem Foreground="White" Header="View"></MenuItem>
<MenuItem Foreground="White" Header="Repository"></MenuItem>
<MenuItem Foreground="White" Header="Branch"></MenuItem>
<MenuItem Foreground="White" Header="Help"></MenuItem>
<MenuItem Foreground="White" Header="Edit"/>
<MenuItem Foreground="White" Header="View"/>
<MenuItem Foreground="White" Header="Repository"/>
<MenuItem Foreground="White" Header="Branch"/>
<MenuItem Foreground="White" Header="Help"/>
</Menu>
</StackPanel>

View File

@ -9,77 +9,77 @@
<StackPanel Margin="32">
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<Button Content="{x:Static langs:Lang.Default}" Margin="5"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Default}" Margin="5"></Button>
<Button Content="{x:Static langs:Lang.Default}" Margin="5"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Default}" Margin="5"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"></Button>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary"></TextBlock>
<Button Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Primary}" Margin="5" Style="{StaticResource ButtonPrimary}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimary"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"></Button>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess"></TextBlock>
<Button Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccess"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"></Button>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonInfo"></TextBlock>
<Button Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Info}" Margin="5" Style="{StaticResource ButtonInfo}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonInfo"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"></Button>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonWarning"></TextBlock>
<Button Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonWarning"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"></Button>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"></Button>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonDanger"></TextBlock>
<Button Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<Button IsEnabled="False" Content="{x:Static langs:Lang.Danger}" Margin="5" Style="{StaticResource ButtonDanger}"/>
<TextBlock TextAlignment="Center" Style="{StaticResource TextBlockDefault}" Text="ButtonDanger"/>
</StackPanel>
</WrapPanel>
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<Button Width="50" Padding="16,8" Margin="5" controls:IconElement.Angle="45" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"></Button>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" controls:IconElement.Angle="45" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="DefaultDeleteGeometryRotate 45°"></TextBlock>
<Button Width="50" Padding="16,8" Margin="5" controls:IconElement.Angle="45" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" controls:IconElement.Angle="45" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="DefaultDeleteGeometryRotate 45°"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Clock}" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"></Button>
<Button Content="{x:Static langs:Lang.Clock}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimaryClockGeometry"></TextBlock>
<Button Content="{x:Static langs:Lang.Clock}" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<Button Content="{x:Static langs:Lang.Clock}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonPrimaryClockGeometry"/>
</StackPanel>
<StackPanel>
<Button Content="{x:Static langs:Lang.Calendar}" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"></Button>
<Button Content="{x:Static langs:Lang.Calendar}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccessCalendarGeometry"></TextBlock>
<Button Content="{x:Static langs:Lang.Calendar}" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<Button Content="{x:Static langs:Lang.Calendar}" IsEnabled="False" Margin="5" Style="{StaticResource ButtonSuccess}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonSuccessCalendarGeometry"/>
</StackPanel>
<StackPanel>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"></Button>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonInfoDownGeometry"></TextBlock>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonInfo}" controls:IconElement.Geometry="{StaticResource DownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonInfoDownGeometry"/>
</StackPanel>
<StackPanel>
<Button Width="50" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"></Button>
<Button Width="50" IsEnabled="False" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonWarningLeftGeometry"></TextBlock>
<Button Width="50" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"/>
<Button Width="50" IsEnabled="False" Margin="5" Style="{StaticResource ButtonWarning}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonWarningLeftGeometry"/>
</StackPanel>
<StackPanel>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"></Button>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonDangerDeleteGeometry"></TextBlock>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonDanger}" controls:IconElement.Geometry="{StaticResource DeleteGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonDangerDeleteGeometry"/>
</StackPanel>
</WrapPanel>
<WrapPanel ItemWidth="160" ItemHeight="130">
<StackPanel>
<Button Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"></Button>
<Button Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"></Button>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonCustom"></TextBlock>
<Button Margin="5" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<Button Margin="5" Height="28" IsEnabled="False" Padding="10,0" Background="#24292e" Foreground="White" Content="{x:Static langs:Lang.ButtonOpacity}" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonCustom"/>
</StackPanel>
<StackPanel>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{StaticResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"></Button>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{StaticResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"></Button>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIconUpDownGeometry"></TextBlock>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{StaticResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{StaticResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIconUpDownGeometry"/>
</StackPanel>
</WrapPanel>
</StackPanel>

View File

@ -7,16 +7,16 @@
<controls:TransitioningContentControl>
<StackPanel Margin="32">
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{StaticResource BorderBrush}" Width="240" HorizontalAlignment="Left">
<Border Height="100" Background="{StaticResource BackgroundBrush}"></Border>
<Border Height="100" Background="{StaticResource BackgroundBrush}"/>
</Expander>
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{StaticResource BorderBrush}" Width="240" HorizontalAlignment="Left">
<Border Height="100" Background="{StaticResource BackgroundBrush}"></Border>
<Border Height="100" Background="{StaticResource BackgroundBrush}"/>
</Expander>
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1,1,1,0" BorderBrush="{StaticResource BorderBrush}" Width="240" HorizontalAlignment="Left">
<Border Height="100" Background="{StaticResource BackgroundBrush}"></Border>
<Border Height="100" Background="{StaticResource BackgroundBrush}"/>
</Expander>
<Expander Header="{x:Static langs:Lang.Title}" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Width="240" HorizontalAlignment="Left">
<Border Height="100" Background="{StaticResource BackgroundBrush}"></Border>
<Border Height="100" Background="{StaticResource BackgroundBrush}"/>
</Expander>
</StackPanel>
</controls:TransitioningContentControl>

View File

@ -0,0 +1,97 @@
<UserControl x:Class="HandyControlDemo.UserControl.NaiveTabControlDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Background="White">
<controls:TransitioningContentControl>
<ScrollViewer>
<StackPanel>
<TabControl Margin="32" Width="800" Height="300">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
<TabControl Margin="32,0,32,32" Width="800" Height="300" Style="{StaticResource TabControlInLine}">
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="{x:Static langs:Lang.Title}" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="{x:Static langs:Lang.Text}"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
</StackPanel>
</ScrollViewer>
</controls:TransitioningContentControl>
</UserControl>

View File

@ -0,0 +1,11 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
public partial class NaiveTabControlDemoCtl
{
public NaiveTabControlDemoCtl()
{
InitializeComponent();
}
}
}

View File

@ -7,36 +7,36 @@
<WrapPanel Margin="32" ItemWidth="600">
<StackPanel Orientation="Horizontal">
<StackPanel Width="400">
<ProgressBar Value="20" Margin="0,0,0,10"></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200"></ProgressBar>
<ProgressBar Value="20" Margin="0,0,0,10"/>
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"/>
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"/>
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"/>
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200"/>
</StackPanel>
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text=""></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccess" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfo" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarning" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDanger" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text=""/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccess" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfo" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarning" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDanger" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Width="400">
<ProgressBar Style="{StaticResource ProgressBarPrimaryStripe}" Margin="0,0,0,10" Value="120" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="110" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" ></ProgressBar>
<ProgressBar Style="{StaticResource ProgressBarPrimaryStripe}" Margin="0,0,0,10" Value="120" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="110" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
</StackPanel>
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccessStripe" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfoStripe" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarningStripe" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDangerStripe" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"></TextBlock>
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarSuccessStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarInfoStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarWarningStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarDangerStripe" HorizontalAlignment="Left"/>
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
</WrapPanel>

View File

@ -1,5 +1,4 @@
using System;
using System.Windows;
using System.Windows.Controls;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
@ -57,9 +56,9 @@ namespace HandyControlDemo.ViewModel
/// <summary>
/// 切换例子命令
/// </summary>
public RelayCommand<RoutedPropertyChangedEventArgs<object>> SwitchDemoCmd =>
new Lazy<RelayCommand<RoutedPropertyChangedEventArgs<object>>>(() =>
new RelayCommand<RoutedPropertyChangedEventArgs<object>>(SwitchDemo)).Value;
public RelayCommand<SelectionChangedEventArgs> SwitchDemoCmd =>
new Lazy<RelayCommand<SelectionChangedEventArgs>>(() =>
new RelayCommand<SelectionChangedEventArgs>(SwitchDemo)).Value;
#endregion
@ -68,13 +67,14 @@ namespace HandyControlDemo.ViewModel
/// <summary>
/// 切换例子
/// </summary>
private void SwitchDemo(RoutedPropertyChangedEventArgs<object> e)
private void SwitchDemo(SelectionChangedEventArgs e)
{
if (e.NewValue is TreeViewItem item)
if (e.AddedItems.Count == 0) return;
if (e.AddedItems[0] is ListBoxItem item)
{
if (item.Tag is string tag)
{
ContentTitle = item.Header;
ContentTitle = item.Content;
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{tag}"), MessageToken.LoadShowContent);
}
else

View File

@ -6,35 +6,10 @@
## Latest examples
### 1、TextBlock
![TextBlock](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TextBlock.jpg)
### 2、TextBox
![TextBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TextBox.jpg)
### 3、ComboBox
![ComboBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/ComboBox.jpg)
### 4、PasswordBox
![PasswordBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/PasswordBox.jpg)
### 5、DataPicker
![DataPicker](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/DataPicker.jpg)
### 6、TimePicker
![TimePicker](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TimePicker.jpg)
### 7、CirclePanel
![CirclePanel](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/CirclePanel.jpg)
No latest examples
## History publication
### 1、ColorPicker
![ColorPicker](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/ColorPicker.gif)
@ -97,6 +72,34 @@
![Clock](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/Clock.jpg)
### 16、TextBlock
![TextBlock](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TextBlock.jpg)
### 17、TextBox
![TextBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TextBox.jpg)
### 18、ComboBox
![ComboBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/ComboBox.jpg)
### 19、PasswordBox
![PasswordBox](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/PasswordBox.jpg)
### 20、DataPicker
![DataPicker](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/DataPicker.jpg)
### 21、TimePicker
![TimePicker](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/TimePicker.jpg)
### 22、CirclePanel
![CirclePanel](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/CirclePanel.jpg)
# Usage
Step 1Add a reference to HandyControl or search for HandyControl on the nuget;
@ -128,6 +131,5 @@ Step 3enjoy coding
```
# v1.4.0 Plan
- add TabControl Style
- Partial control refactoring
- add Dark Theme