Skip to content

Commit

Permalink
1.1.8.5 (#154)
Browse files Browse the repository at this point in the history
* 1.1.8.5
  • Loading branch information
Mochengvia authored Mar 22, 2023
1 parent 8a04c98 commit a10dcf1
Show file tree
Hide file tree
Showing 32 changed files with 1,817 additions and 350 deletions.
1 change: 0 additions & 1 deletion Samples/Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
xmlns:local="clr-namespace:Samples.Views"
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
xmlns:purs="clr-namespace:Panuon.WPF.UI.Resources;assembly=Panuon.WPF.UI"
xmlns:i="clr-namespace:Panuon.WPF.UI.Internal;assembly=Panuon.WPF.UI"
mc:Ignorable="d"
Title="MainView"
Height="600"
Expand Down
1 change: 1 addition & 0 deletions Samples/Views/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public MainView()
{
InitExampleItems();
}));

}
#endregion

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ static class StyleKeys
public const string DataGridComboBoxStyle = nameof(DataGridComboBoxStyle);
public const string IconButtonStyle = nameof(IconButtonStyle);
public const string IconRepeatButtonStyle = nameof(IconRepeatButtonStyle);
public const string InternalMenuItemStyle = nameof(InternalMenuItemStyle);
public const string InternalContextMenuItemStyle = nameof(InternalContextMenuItemStyle);
public const string SpinStyle = nameof(SpinStyle);
public const string WindowXButtonStyle = nameof(WindowXButtonStyle);
public const string WindowXStyle = nameof(WindowXStyle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,66 @@
<Setter Property="Opacity"
Value="{Binding DisabledOpacity, Source={x:Static local:GlobalSettings.Setting}}" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBorderBrush), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverBorderBrushLock"
Value="True" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBorderThickness), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverBorderThicknessLock"
Value="True" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedCornerRadius), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverCornerRadiusLock"
Value="True" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedBackground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverBackgroundLock"
Value="True" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedForeground), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverForegroundLock"
Value="True" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
<Condition Binding="{Binding Path=(local:CheckBoxHelper.CheckedShadowColor), Converter={StaticResource {x:Static rs:ConverterKeys.IsNonnullConverter}}, RelativeSource={RelativeSource Self}, Mode=OneWay}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="i:VisualStateHelper.HoverShadowColorLock"
Value="True" />
</MultiDataTrigger>
</Style.Triggers>
</Style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,22 @@
Value="{Binding Path=(local:ComboBoxHelper.ItemsHoverBackground), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.HoverBorderBrush"
Value="{Binding Path=(local:ComboBoxHelper.ItemsHoverBorderBrush), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.HoverBorderThickness"
Value="{Binding Path=(local:ComboBoxHelper.ItemsHoverBorderThickness), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.HoverCornerRadius"
Value="{Binding Path=(local:ComboBoxHelper.ItemsHoverCornerRadius), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.HoverForeground"
Value="{Binding Path=(local:ComboBoxHelper.ItemsHoverForeground), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedBackground"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedBackground), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedBorderBrush"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedBorderBrush), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedForeground"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedForeground), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedBorderBrush"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedBorderBrush), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedBorderThickness"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedBorderThickness), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SelectedCornerRadius"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSelectedCornerRadius), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SeparatorBrush"
Value="{Binding Path=(local:ComboBoxHelper.ItemsSeparatorBrush), RelativeSource={RelativeSource AncestorType=ComboBox}, Mode=OneWay}" />
<Setter Property="local:ComboBoxItemHelper.SeparatorThickness"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
FontFamily="/Panuon.WPF.UI;component/Resources/Fonts/#PanuonIcon" />
</DataTemplate>

<Style x:Key="{ComponentResourceKey ResourceId=MenuItemStyle, TypeInTargetAssembly={x:Type local:ContextMenuHelper}}"
<Style x:Key="{x:Static irs:StyleKeys.InternalContextMenuItemStyle}"
TargetType="MenuItem">
<Setter Property="i:VisualStateHelper.Regist"
Value="True" />
Expand Down Expand Up @@ -71,28 +71,44 @@
Value="{Binding Path=(local:ContextMenuHelper.ItemsSeparatorVisibility), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverBackground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverBackground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverForeground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverForeground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverBorderThickness"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverBorderThickness), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.HoverCornerRadius"
Value="{Binding Path=(local:ContextMenuHelper.ItemsHoverCornerRadius), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedBackground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedBackground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedForeground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedForeground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedBorderThickness"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedBorderThickness), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.CheckedCornerRadius"
Value="{Binding Path=(local:ContextMenuHelper.ItemsCheckedCornerRadius), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.ClickBackground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsClickBackground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.ClickBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsClickBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.ClickForeground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsClickForeground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.ClickBorderThickness"
Value="{Binding Path=(local:ContextMenuHelper.ItemsClickBorderThickness), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.ClickCornerRadius"
Value="{Binding Path=(local:ContextMenuHelper.ItemsClickCornerRadius), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.OpenedBackground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsOpenedBackground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.OpenedBorderBrush"
Value="{Binding Path=(local:ContextMenuHelper.ItemsOpenedBorderBrush), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.OpenedForeground"
Value="{Binding Path=(local:ContextMenuHelper.ItemsOpenedForeground), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.OpenedBorderThickness"
Value="{Binding Path=(local:ContextMenuHelper.ItemsOpenedBorderThickness), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="local:MenuItemHelper.OpenedCornerRadius"
Value="{Binding Path=(local:ContextMenuHelper.ItemsOpenedCornerRadius), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="Padding"
Value="{Binding Path=(local:ContextMenuHelper.ItemsPadding), RelativeSource={RelativeSource AncestorType=ContextMenu}, Mode=OneWay}" />
<Setter Property="Margin"
Expand Down Expand Up @@ -120,6 +136,14 @@
</Style.Triggers>
</Style>

<Style x:Key="{ComponentResourceKey ResourceId=MenuItemStyle, TypeInTargetAssembly={x:Type local:ContextMenuHelper}}"
TargetType="MenuItem"
BasedOn="{StaticResource {x:Static irs:StyleKeys.InternalContextMenuItemStyle}}">
<Setter Property="ItemContainerStyle"
Value="{StaticResource {x:Static irs:StyleKeys.InternalContextMenuItemStyle}}" />
</Style>


<Style x:Key="{x:Static rs:StyleKeys.ContextMenuStyle}"
TargetType="{x:Type ContextMenu}">
<Style.Resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@
Value="Stretch" />
<Setter Property="RowStyle"
Value="{StaticResource {x:Static rs:StyleKeys.DataGridRowStyle}}" />
<Setter Property="ColumnHeaderStyle"
Value="{StaticResource {x:Static rs:StyleKeys.DataGridColumnHeaderStyle}}" />
<Setter Property="CellStyle"
Value="{StaticResource {x:Static rs:StyleKeys.DataGridCellStyle}}" />
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.DataGridTemplate}}" />
<Style.Triggers>
Expand Down
Loading

0 comments on commit a10dcf1

Please sign in to comment.