Skip to content

Commit

Permalink
v2.2.12-alpha (#24)
Browse files Browse the repository at this point in the history
* v2.2.12-alpha
  • Loading branch information
Mochengvia authored Aug 10, 2021
1 parent 4f8a269 commit 5996072
Show file tree
Hide file tree
Showing 26 changed files with 1,675 additions and 37 deletions.
6 changes: 3 additions & 3 deletions DotNet/WPF/Src/Samples/Views/Examples/NeteaseMusicView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
</pu:WindowX.Resources>
<pu:WindowXCaption.MinimizeButtonStyle>
<Style TargetType="Button"
BasedOn="{StaticResource {ComponentResourceKey ResourceId=WindowXMinimizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
BasedOn="{StaticResource {ComponentResourceKey ResourceId=MinimizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Background"
Expand All @@ -158,7 +158,7 @@
</pu:WindowXCaption.MinimizeButtonStyle>
<pu:WindowXCaption.MaximizeButtonStyle>
<Style TargetType="Button"
BasedOn="{StaticResource {ComponentResourceKey ResourceId=WindowXMaximizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
BasedOn="{StaticResource {ComponentResourceKey ResourceId=MaximizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Background"
Expand All @@ -173,7 +173,7 @@
</pu:WindowXCaption.MaximizeButtonStyle>
<pu:WindowXCaption.CloseButtonStyle>
<Style TargetType="Button"
BasedOn="{StaticResource {ComponentResourceKey ResourceId=WindowXCloseButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
BasedOn="{StaticResource {ComponentResourceKey ResourceId=CloseButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Background"
Expand Down
2 changes: 1 addition & 1 deletion DotNet/WPF/Src/Samples/Views/Examples/SignInView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</Window.Resources>
<pu:WindowXCaption.CloseButtonStyle>
<Style TargetType="Button"
BasedOn="{StaticResource {ComponentResourceKey ResourceId=WindowXCloseButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
BasedOn="{StaticResource {ComponentResourceKey ResourceId=CloseButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Background"
Expand Down
8 changes: 6 additions & 2 deletions DotNet/WPF/Src/Samples/Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
WindowStartupLocation="CenterScreen"
MaskBrush="#AA000000"
Closing="WindowX_Closing">
<pu:WindowX.Effect>
<pu:AcrylicWindowXEffect AccentColor="#66FFFFFF" />
</pu:WindowX.Effect>
<pu:WindowXCaption.HeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"
Expand All @@ -28,7 +31,7 @@
<Button x:Name="BtnIconFont"
FontSize="18"
ToolTip="Panuon IconFont Browser"
Style="{StaticResource {ComponentResourceKey ResourceId=WindowXMinimizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}"
Style="{StaticResource {ComponentResourceKey ResourceId=MinimizeButtonStyle, TypeInTargetAssembly={x:Type pu:WindowX}}}"
Content="&#xe99d;"
Click="BtnIconFont_Click">
</Button>
Expand All @@ -43,6 +46,7 @@
<TextBlock Text="Samples"
FontSize="30" />
<ScrollViewer Grid.Row="1"
Visibility="Collapsed"
Margin="0,15,0,0"
VerticalScrollBarVisibility="Disabled"
HorizontalScrollBarVisibility="Auto"
Expand All @@ -59,7 +63,7 @@
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Margin="0,0,10,10"
Background="#F1F1F1"
Background="Transparent"
Width="{Binding ActualHeight, Converter={StaticResource {x:Static purs:ConverterKeys.DoublePlusConverter}}, ConverterParameter=100, RelativeSource={RelativeSource Self}}"
ToolTip="{Binding ViewPath}"
VerticalContentAlignment="Stretch"
Expand Down
2 changes: 1 addition & 1 deletion DotNet/WPF/Src/Samples/Views/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private UIElement CreatePreviewView(WindowX view, object content)
Content = content,
};
var grid = new Grid();
grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(WindowXCaption.GetHeight(view)) });
grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(view.DisableDragMove ? 0 : WindowXCaption.GetHeight(view)) });
grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) });
grid.Children.Add(new Border()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Styles\ListViewItemStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Styles\ListViewStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Styles\PaginationItemStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -302,6 +310,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Templates\ListViewItemTemplate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Templates\ListViewTemplate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Templates\PaginationItemTemplate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ static class TemplateKeys
public const string ListBoxTemplate = nameof(ListBoxTemplate);
public const string ListBoxItemTemplate = nameof(ListBoxItemTemplate);
public const string ListBoxItemStylelessTemplate = nameof(ListBoxItemStylelessTemplate);
public const string ListViewColumnHeaderTemplate = nameof(ListViewColumnHeaderTemplate);
public const string ListViewScrollViewerTemplate = nameof(ListViewScrollViewerTemplate);
public const string ListViewTemplate = nameof(ListViewTemplate);
public const string ListViewItemTemplate = nameof(ListViewItemTemplate);
public const string MenuTemplate = nameof(MenuTemplate);
public const string MenuItemTopLevelTemplate = nameof(MenuItemTopLevelTemplate);
public const string MenuItemSubmenuTemplate = nameof(MenuItemSubmenuTemplate);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Panuon.UI.Silver"
xmlns:core="clr-namespace:Panuon.UI.Core;assembly=Panuon.UI.Core"
xmlns:i="clr-namespace:Panuon.UI.Silver.Internal"
xmlns:rs="clr-namespace:Panuon.UI.Silver.Resources"
xmlns:irs="clr-namespace:Panuon.UI.Silver.Internal.Resources">
<ResourceDictionary.MergedDictionaries>
<core:SharedResourceDictionary Source="pack://application:,,,/Panuon.UI.Silver;component/Templates/ListViewItemTemplate.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="{x:Static rs:StyleKeys.ListViewItemStyle}"
TargetType="ListViewItem">
<Setter Property="i:VisualStateHelper.Regist"
Value="True" />
<Setter Property="i:VisualStateHelper.IsHover"
Value="{Binding IsMouseOver, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="i:VisualStateHelper.IsSelected"
Value="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="i:VisualStateHelper.HoverForegroundLock"
Value="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="i:VisualStateHelper.HoverBackgroundLock"
Value="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="i:VisualStateHelper.HoverBorderBrushLock"
Value="{Binding IsSelected, RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Foreground"
Value="{Binding Path=(i:VisualStateHelper.Foreground), RelativeSource={RelativeSource Self}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Margin"
Value="{Binding Path=(local:IconHelper.Margin), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Width"
Value="{Binding Path=(local:IconHelper.Width), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.Height"
Value="{Binding Path=(local:IconHelper.Height), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.VerticalAlignment"
Value="{Binding Path=(local:IconHelper.VerticalAlignment), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.HorizontalAlignment"
Value="{Binding Path=(local:IconHelper.HorizontalAlignment), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinWidth"
Value="{Binding Path=(local:IconHelper.MinWidth), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MinHeight"
Value="{Binding Path=(local:IconHelper.MinHeight), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxWidth"
Value="{Binding Path=(local:IconHelper.MaxWidth), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.MaxHeight"
Value="{Binding Path=(local:IconHelper.MaxHeight), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontSize"
Value="{Binding Path=(local:IconHelper.FontSize), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:IconHelper.FontFamily"
Value="{Binding Path=(local:IconHelper.FontFamily), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.CornerRadius"
Value="{Binding Path=(local:ListViewHelper.ItemsCornerRadius), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.HoverBackground"
Value="{Binding Path=(local:ListViewHelper.ItemsHoverBackground), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.HoverBorderBrush"
Value="{Binding Path=(local:ListViewHelper.ItemsHoverBorderBrush), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.HoverForeground"
Value="{Binding Path=(local:ListViewHelper.ItemsHoverForeground), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SelectedBackground"
Value="{Binding Path=(local:ListViewHelper.ItemsSelectedBackground), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SelectedBorderBrush"
Value="{Binding Path=(local:ListViewHelper.ItemsSelectedBorderBrush), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SelectedForeground"
Value="{Binding Path=(local:ListViewHelper.ItemsSelectedForeground), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SelectedBorderThickness"
Value="{Binding Path=(local:ListViewHelper.ItemsSelectedBorderThickness), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SeparatorBrush"
Value="{Binding Path=(local:ListViewHelper.ItemsSeparatorBrush), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SeparatorThickness"
Value="{Binding Path=(local:ListViewHelper.ItemsSeparatorThickness), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SeparatorMargin"
Value="{Binding Path=(local:ListViewHelper.ItemsSeparatorMargin), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="local:ListViewItemHelper.SeparatorVisibility"
Value="{Binding Path=(local:ListViewHelper.ItemsSeparatorVisibility), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="Height"
Value="{Binding Path=(local:ListViewHelper.ItemsHeight), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="MinHeight"
Value="{Binding Path=(local:ListViewHelper.ItemsMinHeight), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="MaxHeight"
Value="{Binding Path=(local:ListViewHelper.ItemsMaxHeight), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="Background"
Value="{Binding Path=(local:ListViewHelper.ItemsBackground), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="BorderBrush"
Value="{Binding Path=(local:ListViewHelper.ItemsBorderBrush), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="BorderThickness"
Value="{Binding Path=(local:ListViewHelper.ItemsBorderThickness), RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="VerticalContentAlignment"
Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="HorizontalContentAlignment"
Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=ListView}, Mode=OneWay}" />
<Setter Property="Template"
Value="{StaticResource {x:Static irs:TemplateKeys.ListViewItemTemplate}}" />
<Style.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Value="{Binding DisabledOpacity, Source={x:Static local:GlobalSettings.Setting}}" />
</Trigger>
</Style.Triggers>
</Style>

</ResourceDictionary>
Loading

0 comments on commit 5996072

Please sign in to comment.