Skip to content

Commit

Permalink
v2.2.13.2 (#35)
Browse files Browse the repository at this point in the history
* v2.2.13.2
  • Loading branch information
Mochengvia authored Nov 1, 2021
1 parent 6f482b8 commit d79f01a
Show file tree
Hide file tree
Showing 24 changed files with 215 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<Compile Include="$(MSBuildThisFileDirectory)TemplateSelectors\IconPresenterContentTemplateSelector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\AnimationUtil.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\BrushUtil.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\DrawingContextUtil.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\FrameworkElementUtil.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\GeometryUtil.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Utils\GridLengthUtil.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static class TemplateKeys
public const string GroupBoxTemplate = nameof(GroupBoxTemplate);
public const string LabelTemplate = nameof(LabelTemplate);
public const string ListBoxTemplate = nameof(ListBoxTemplate);
public const string ListBoxNonScrollableTemplate = nameof(ListBoxNonScrollableTemplate);
public const string ListBoxItemTemplate = nameof(ListBoxItemTemplate);
public const string ListBoxItemStylelessTemplate = nameof(ListBoxItemStylelessTemplate);
public const string ListViewColumnHeaderTemplate = nameof(ListViewColumnHeaderTemplate);
Expand Down Expand Up @@ -66,6 +67,7 @@ static class TemplateKeys
public const string ToolTipTemplate = nameof(ToolTipTemplate);
public const string TransformControlTemplate = nameof(TransformControlTemplate);
public const string TreeViewTemplate = nameof(TreeViewTemplate);
public const string TreeViewNonScrollableTemplate = nameof(TreeViewNonScrollableTemplate);
public const string TreeViewItemTemplate = nameof(TreeViewItemTemplate);
public const string WindowXTemplate = nameof(WindowXTemplate);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
TargetType="Expander">
<Setter Property="i:VisualStateHelper.Regist"
Value="True" />
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(local:ExpanderHelper.HeaderForeground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="8,0,0,0" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" />
<Setter Property="local:IconHelper.FontSize"
Expand All @@ -101,7 +105,7 @@
<Setter Property="local:ExpanderHelper.HeaderSeparatorThickness"
Value="1" />
<Setter Property="local:ExpanderHelper.HeaderSeparatorVisibility"
Value="Visible" />
Value="Collapsed" />
<Setter Property="local:ExpanderHelper.HeaderVerticalContentAlignment"
Value="Center" />
<Setter Property="local:ExpanderHelper.HeaderHorizontalContentAlignment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
Value="Center" />
<Setter Property="HeaderForeground"
Value="{Binding Foreground, RelativeSource={RelativeSource Self}}" />
<Setter Property="MessageForeground"
Value="{Binding Foreground, RelativeSource={RelativeSource Self}}" />
<Setter Property="MessageTemplate"
Value="{StaticResource {ComponentResourceKey ResourceId=MessageTemplate, TypeInTargetAssembly={x:Type local:FormGroup}}}" />
<Style.Triggers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.ListBoxTemplate}}" />
<Style.Triggers>
<Trigger Property="local:ListBoxHelper.Scrollable"
Value="False">
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.ListBoxNonScrollableTemplate}}" />
</Trigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
Value="{Binding Path=(local:ToolTipHelper.BorderBrush), RelativeSource={RelativeSource Self}}" />
<Setter Property="BorderThickness"
Value="{Binding Path=(local:ToolTipHelper.BorderThickness), RelativeSource={RelativeSource Self}}" />
<Setter Property="FontSize"
Value="{Binding Path=(local:ToolTipHelper.FontSize), RelativeSource={RelativeSource Self}}" />
<Setter Property="Padding"
Value="{Binding Path=(local:ToolTipHelper.Padding), RelativeSource={RelativeSource Self}}" />
<Setter Property="VerticalOffset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.TreeViewTemplate}}" />
<Style.Triggers>
<Trigger Property="local:ListBoxHelper.Scrollable"
Value="False">
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.TreeViewNonScrollableTemplate}}" />
</Trigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl x:Name="CcExtendControl"
Focusable="False"
Content="{TemplateBinding ExtendControl}" />
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{TemplateBinding Foreground}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Icon="{Binding Path=(local:ExpanderHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:ExpanderHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition x:Name="RdContent"
Height="0" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ToggleButton x:Name="TgbHeader"
Expand Down Expand Up @@ -73,10 +73,16 @@
Content="{Binding Path=(local:ExpanderHelper.ExtendControl), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</ToggleButton>
<local:SeparatorX x:Name="SprtSeparator"
Grid.Row="1"
VerticalAlignment="Center"
Stroke="{Binding Path=(local:ExpanderHelper.HeaderSeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
StrokeThickness="{Binding Path=(local:ExpanderHelper.HeaderSeparatorThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{Binding Path=(local:ExpanderHelper.HeaderSeparatorMargin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Visibility="Collapsed" />
<Border x:Name="PART_ContentBorder"
Grid.Row="1"
BorderThickness="1,0,1,1"
CornerRadius="0,0,2,2">
Grid.Row="2"
Visibility="Collapsed">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</Border>
</Grid>
Expand All @@ -87,12 +93,18 @@
<Setter TargetName="TgbHeader"
Property="Grid.Row"
Value="0" />
<Setter TargetName="SprtSeparator"
Property="Grid.Row"
Value="1" />
</Trigger>
<Trigger Property="ExpandDirection"
Value="Up">
<Setter TargetName="TgbHeader"
Property="Grid.Row"
Value="2" />
Value="4" />
<Setter TargetName="SprtSeparator"
Property="Grid.Row"
Value="3" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
Expand Down Expand Up @@ -137,6 +149,9 @@
<Setter TargetName="TgbHeader"
Property="Foreground"
Value="{Binding Path=(local:ExpanderHelper.ExpandedHeaderForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="IcIcon"
Property="Foreground"
Value="{Binding Path=(local:ExpanderHelper.ExpandedHeaderForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<Trigger Property="local:ExpanderHelper.ToggleArrowPlacement"
Value="Right">
Expand All @@ -149,9 +164,12 @@
</Trigger>
<Trigger Property="IsExpanded"
Value="True">
<Setter TargetName="RdContent"
Property="Height"
Value="Auto" />
<Setter TargetName="SprtSeparator"
Property="Visibility"
Value="{Binding Path=(local:ExpanderHelper.HeaderSeparatorVisibility), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="PART_ContentBorder"
Property="Visibility"
Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand All @@ -164,15 +182,15 @@
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{TemplateBinding Foreground}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Icon="{Binding Path=(local:ExpanderHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:ExpanderHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Effect="{Binding Path=(i:VisualStateHelper.Effect), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
Expand Down Expand Up @@ -208,6 +226,10 @@
<local:TransformControl x:Name="TcTransform"
Margin="0,8,0,0"
Style="{Binding Path=(local:ExpanderHelper.ToggleArrowTransformControlStyle), RelativeSource={RelativeSource AncestorType=Expander}, Mode=OneWay}" />
<i:IconPresenter x:Name="IcIcon"
Grid.Column="1"
Content="{Binding Path=(local:ExpanderHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<ContentPresenter Grid.Row="2"
Margin="{Binding Path=(local:ExpanderHelper.HeaderPadding), RelativeSource={RelativeSource AncestorType=Expander}, Mode=OneWay}"
ContentSource="Header"
Expand All @@ -216,9 +238,19 @@
Content="{Binding Path=(local:ExpanderHelper.ExtendControl), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</Grid>
</ToggleButton>
<ContentPresenter Margin="{TemplateBinding Padding}"
<local:SeparatorX x:Name="SprtSeparator"
Grid.Column="1"
Visibility="{Binding IsExpanded, Converter={StaticResource {x:Static rs:ConverterKeys.FalseToCollapseConverter}}, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
Orientation="Vertical"
HorizontalAlignment="Center"
Stroke="{Binding Path=(local:ExpanderHelper.HeaderSeparatorBrush), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
StrokeThickness="{Binding Path=(local:ExpanderHelper.HeaderSeparatorThickness), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Margin="{Binding Path=(local:ExpanderHelper.HeaderSeparatorMargin), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Visibility="Collapsed" />
<Border x:Name="PART_ContentBorder"
Grid.Column="2"
Visibility="Collapsed">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</Border>
</Grid>
</i:ContentControlX>
<ControlTemplate.Triggers>
Expand All @@ -227,12 +259,18 @@
<Setter TargetName="TgbHeader"
Property="Grid.Column"
Value="0" />
<Setter TargetName="SprtSeparator"
Property="Grid.Column"
Value="1" />
</Trigger>
<Trigger Property="ExpandDirection"
Value="Left">
<Setter TargetName="TgbHeader"
Property="Grid.Column"
Value="2" />
Value="4" />
<Setter TargetName="SprtSeparator"
Property="Grid.Column"
Value="3" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
Expand Down Expand Up @@ -277,6 +315,9 @@
<Setter TargetName="TgbHeader"
Property="Foreground"
Value="{Binding Path=(local:ExpanderHelper.ExpandedHeaderForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="IcIcon"
Property="Foreground"
Value="{Binding Path=(local:ExpanderHelper.ExpandedHeaderForeground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
</MultiDataTrigger>
<Trigger Property="local:ExpanderHelper.ToggleArrowPlacement"
Value="Right">
Expand All @@ -287,6 +328,15 @@
Property="Margin"
Value="0,0,0,8" />
</Trigger>
<Trigger Property="IsExpanded"
Value="True">
<Setter TargetName="SprtSeparator"
Property="Visibility"
Value="{Binding Path=(local:ExpanderHelper.HeaderSeparatorVisibility), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" />
<Setter TargetName="PART_ContentBorder"
Property="Visibility"
Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
Grid.Row="2"
Focusable="False"
Visibility="Collapsed"
Margin="{TemplateBinding HeaderPadding}"
Foreground="{TemplateBinding MessageForeground}"
Margin="{TemplateBinding MessagePadding}"
Content="{TemplateBinding Message}"
ContentTemplate="{TemplateBinding MessageTemplate}" />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@
</Border>
</ControlTemplate>

<ControlTemplate x:Key="{x:Static irs:TemplateKeys.ListBoxNonScrollableTemplate}"
TargetType="ListBox">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ItemsPresenter />
</Border>
</ControlTemplate>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
</Grid>
<ContentPresenter x:Name="PART_SelectedContentHost"
Grid.Row="1"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent" />
</Grid>
</Border>
Expand Down Expand Up @@ -246,6 +247,7 @@
</Grid>
<ContentPresenter x:Name="PART_SelectedContentHost"
Grid.Column="1"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent" />
</Grid>
</Border>
Expand Down Expand Up @@ -293,7 +295,7 @@
Value="Auto" />
<Setter TargetName="RdEndBlank"
Property="Height"
Value="Auto" />
Value="*" />
</Trigger>
<Trigger Property="local:TabControlHelper.HeaderPanelHorizontalAlignment"
Value="Stretch">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
Background="{Binding Path=(i:VisualStateHelper.Background), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
BorderThickness="{TemplateBinding BorderThickness}"
Foreground="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Icon="{Binding Path=(local:TabItemHelper.Icon), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
IconPlacement="{Binding Path=(local:TabItemHelper.IconPlacement), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
CornerRadius="{Binding Path=(local:TabItemHelper.CornerRadius), RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Expand Down
Loading

0 comments on commit d79f01a

Please sign in to comment.