Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Jun 13, 2022
2 parents ecbbd2d + 618d367 commit 2937380
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 73 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Setter Property="Padding" Value="10,0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TreeViewItem">
Expand Down Expand Up @@ -89,7 +90,8 @@
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Padding" Value="2,2,2,0" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
Expand Down
49 changes: 31 additions & 18 deletions src/Net_40/HandyControl_Net_40/Themes/Theme.xaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</Grid.ColumnDefinitions>
<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}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
<ListBox Name="ListBoxDemo" 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}">
<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}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox Margin="16" Width="200" ItemsSource="{Binding DataList}" Style="{StaticResource ListBox.Small}" hc:BorderElement.CornerRadius="4">
<ListBox Margin="16" Width="200" ItemsSource="{Binding DataList}" Style="{StaticResource ListBox.Small}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<TreeView Width="200" Margin="16" ItemsSource="{Binding DataList}" Style="{StaticResource TreeView.Small}" hc:BorderElement.CornerRadius="4">
<TreeView Width="200" Margin="16" ItemsSource="{Binding DataList}" Style="{StaticResource TreeView.Small}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
<TextBlock Text="{Binding Name}"/>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
Expand Down Expand Up @@ -69,6 +70,8 @@
<Setter Property="hc:ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="2,2,2,0" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemBaseStyle}"/>
<Setter Property="Template">
<Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Setter Property="Padding" Value="10,0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TreeViewItem">
Expand Down Expand Up @@ -95,7 +96,8 @@
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Padding" Value="2,2,2,0" />
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
Expand Down
8 changes: 8 additions & 0 deletions src/Shared/HandyControl_Shared/Themes/Styles/ComboBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

<Style BasedOn="{StaticResource ComboBoxBaseStyle}" TargetType="ComboBox"/>

<Style x:Key="ComboBoxItem.Small" BasedOn="{StaticResource ComboBoxItemBaseStyle}" TargetType="ComboBoxItem">
<Setter Property="Padding" Value="6,0" />
<Setter Property="MinHeight" Value="20" />
</Style>

<Style x:Key="ComboBox.Small" BasedOn="{StaticResource ComboBoxBaseStyle}" TargetType="ComboBox">
<Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
<Setter Property="MinHeight" Value="20"/>
<Setter Property="Padding" Value="6,0"/>
</Style>

<Style x:Key="ComboBoxExtend" BasedOn="{StaticResource ComboBoxExtendBaseStyle}" TargetType="ComboBox"/>

<Style x:Key="ComboBoxExtend.Small" BasedOn="{StaticResource ComboBoxExtend}" TargetType="ComboBox">
<Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
<Setter Property="hc:InfoElement.MinContentHeight" Value="20"/>
<Setter Property="hc:InfoElement.ContentHeight" Value="20"/>
<Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,3"/>
Expand All @@ -21,6 +28,7 @@
<Style BasedOn="{StaticResource ComboBoxPlusBaseStyle}" TargetType="hc:ComboBox"/>

<Style x:Key="ComboBoxPlus.Small" BasedOn="{StaticResource ComboBoxPlusBaseStyle}" TargetType="hc:ComboBox">
<Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItem.Small}" />
<Setter Property="hc:InfoElement.MinContentHeight" Value="20"/>
<Setter Property="hc:InfoElement.ContentHeight" Value="20"/>
<Setter Property="hc:TitleElement.MarginOnTheLeft" Value="0,3,6,3"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/HandyControl_Shared/Themes/Styles/ListBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<Style x:Key="ListBoxItemBaseStyle.Small" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
<Setter Property="Padding" Value="6,0"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="MinHeight" Value="20"/>
</Style>

<Style x:Key="ListBox.Small" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/HandyControl_Shared/Themes/Styles/TreeView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<Style x:Key="TreeViewItemBaseStyle.Small" BasedOn="{StaticResource TreeViewItemBaseStyle}" TargetType="TreeViewItem">
<Setter Property="Padding" Value="6,0"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="MinHeight" Value="20"/>
</Style>

<Style x:Key="TreeView.Small" BasedOn="{StaticResource TreeViewBaseStyle}" TargetType="TreeView">
Expand Down
Loading

0 comments on commit 2937380

Please sign in to comment.