Meta - Replace WPF projects with Avalonia projects

This commit is contained in:
Robert committed 2022-03-27 11:55:26 +02:00
1 parent fcf0376a9a
commit d7f3ee1190
1110 files changed
+10872 -52240

No files matched your search

+103
View File
@@ -0,0 +1,103 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia">
<!-- Preview -->
<Design.PreviewWith>
<Border Padding="20">
<StackPanel>
<TextBlock Margin="0 5 0 0">Button.icon-button</TextBlock>
<Button Classes="icon-button">
<avalonia:MaterialIcon Kind="Cog" />
</Button>
<Button Classes="icon-button" IsEnabled="False">
<avalonia:MaterialIcon Kind="Cog" />
</Button>
<TextBlock Margin="0 5 0 0">Button.icon-button icon-button-small</TextBlock>
<Button Classes="icon-button icon-button-small">
<avalonia:MaterialIcon Kind="Cog" />
</Button>
<TextBlock Margin="0 5 0 0">ToggleButton.icon-button</TextBlock>
<ToggleButton Classes="icon-button">
<avalonia:MaterialIcon Kind="Cog" />
</ToggleButton>
<TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button</TextBlock>
<controls:HyperlinkButton Classes="icon-button">
<avalonia:MaterialIcon Kind="Web" />
</controls:HyperlinkButton>
<TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button icon-button-small</TextBlock>
<controls:HyperlinkButton Classes="icon-button icon-button-small">
<avalonia:MaterialIcon Kind="Web" />
</controls:HyperlinkButton>
<TextBlock Margin="0 5 0 0">Button.window-button</TextBlock>
<Button Classes="title-bar-button">
<avalonia:MaterialIcon Kind="WindowMinimize" />
</Button>
</StackPanel>
</Border>
</Design.PreviewWith>
<!-- Styles -->
<Style Selector=":is(Button).icon-button">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="5.5" />
</Style>
<Style Selector=":is(Button).icon-button:pointerover /template/ Border#BorderElement">
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector=":is(Button).icon-button:disabled /template/ Border#BorderElement">
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector=":is(Button).icon-button[IsEnabled=False] /template/ Border#BorderElement">
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector=":is(Button).icon-button:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPointerOver}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPointerOver}" />
</Style>
<Style Selector=":is(Button).icon-button:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPressed}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPressed}" />
</Style>
<Style Selector=":is(Button).icon-button:disabled /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundDisabled}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundDisabled}" />
</Style>
<Style Selector=":is(Button).icon-button-small">
<Setter Property="Padding" Value="4" />
</Style>
<Style Selector=":is(Button).icon-button-small avalonia|MaterialIcon">
<Setter Property="Width" Value="14" />
<Setter Property="Height" Value="14" />
</Style>
<Style Selector=":is(Button).icon-button-large avalonia|MaterialIcon">
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="20" />
</Style>
<Style Selector="controls|HyperlinkButton.icon-button">
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
</Style>
<Style Selector="Button.title-bar-button">
<Setter Property="Width" Value="46"></Setter>
<Setter Property="Height" Value="30"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="CornerRadius" Value="0"></Setter>
<Setter Property="Margin" Value="0"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
</Style>
<Style Selector="Button.title-bar-button:pointerover">
<Setter Property="Background" Value="Red"></Setter>
</Style>
</Styles>