chore: minor modify demo.
This commit is contained in:
1 parent
6c353093f6
commit
322e3669c2
2 files changed
+43
-27
No files matched your search
@@ -1,10 +1,34 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit" xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||||
|
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="../Basic/Geometries.xaml" />
|
<ResourceDictionary Source="../Basic/Brushes.xaml" />
|
||||||
<ResourceDictionary Source="../Basic/Fonts.xaml" />
|
<ResourceDictionary Source="../Basic/Fonts.xaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="DemoInfoSortButtonStyle" BasedOn="{StaticResource ToggleButtonCustom}" TargetType="ToggleButton" x:Shared="False">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
|
||||||
|
<Setter Property="Height" Value="28" />
|
||||||
|
<Setter Property="Width" Value="28" />
|
||||||
|
<Setter Property="Content">
|
||||||
|
<Setter.Value>
|
||||||
|
<Rectangle Width="16" Height="16" Fill="{StaticResource Brush.SortAscending}" />
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
||||||
<Setter Property="UseLayoutRounding" Value="False" />
|
<Setter Property="UseLayoutRounding" Value="False" />
|
||||||
<Setter Property="Height" Value="77" />
|
<Setter Property="Height" Value="77" />
|
||||||
|
|||||||
@@ -9,22 +9,6 @@
|
|||||||
Margin="16,16,0,16"
|
Margin="16,16,0,16"
|
||||||
CornerRadius="10"
|
CornerRadius="10"
|
||||||
Effect="{StaticResource EffectShadow4}">
|
Effect="{StaticResource EffectShadow4}">
|
||||||
<Border.Resources>
|
|
||||||
<Style x:Key="DemoInfoSortButtonStyle" BasedOn="{StaticResource ToggleButtonCustom}" TargetType="ToggleButton" x:Shared="False">
|
|
||||||
<Setter Property="Content">
|
|
||||||
<Setter.Value>
|
|
||||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
|
||||||
<Rectangle Width="16" Height="16" Fill="{StaticResource Brush.SortAscending}" />
|
|
||||||
</Border>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="hc:StatusSwitchElement.CheckedElement">
|
|
||||||
<Setter.Value>
|
|
||||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</Border.Resources>
|
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Button Command="{Binding OpenPracticalDemoCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="10,10,10,4" Content="{ex:Lang Key={x:Static langs:LangKeys.PracticalDemos}}" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}"/>
|
<Button Command="{Binding OpenPracticalDemoCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="10,10,10,4" Content="{ex:Lang Key={x:Static langs:LangKeys.PracticalDemos}}" BorderThickness="0" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
<TabControl BorderThickness="0 1 0 0" SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoCollection}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
|
<TabControl BorderThickness="0 1 0 0" SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoCollection}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
|
||||||
@@ -37,16 +21,24 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition/>
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<hc:ElementGroup Margin="0 0 0 4">
|
||||||
<ColumnDefinition/>
|
<hc:ElementGroup.ItemsPanel>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ItemsPanelTemplate>
|
||||||
</Grid.ColumnDefinitions>
|
<Grid>
|
||||||
<hc:SearchBar hc:InfoElement.ShowClearButton="True" IsRealTime="True" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
<Grid.ColumnDefinitions>
|
||||||
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
|
<ColumnDefinition />
|
||||||
<ListBox Name="ListBoxDemo" Padding="0" ScrollViewer.CanContentScroll="False" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
</Grid>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</hc:ElementGroup.ItemsPanel>
|
||||||
|
<hc:SearchBar hc:InfoElement.ShowClearButton="True" IsRealTime="True" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Tag="{Binding ElementName=ListBoxDemo}" />
|
||||||
|
<ToggleButton Grid.Column="1" Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Style="{StaticResource DemoInfoSortButtonStyle}" />
|
||||||
|
</hc:ElementGroup>
|
||||||
|
<ListBox Name="ListBoxDemo" Padding="0" ScrollViewer.CanContentScroll="False" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
Reference in new issue
Block a user