Skip to content

Commit

Permalink
Merge pull request #260 from sealoyal2018/features/axaml-namespace
Browse files Browse the repository at this point in the history
feature: suki-ui reference namespace in .axaml file
  • Loading branch information
kikipoulet authored Aug 6, 2024
2 parents 5252b5e + 7df4316 commit b0685fa
Show file tree
Hide file tree
Showing 38 changed files with 634 additions and 637 deletions.
4 changes: 2 additions & 2 deletions SukiUI.Demo/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:common="clr-namespace:SukiUI.Demo.Common"
xmlns:sukiUi="clr-namespace:SukiUI;assembly=SukiUI"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
RequestedThemeVariant="Default">
<Application.DataTemplates>
<common:ViewLocator />
Expand All @@ -22,7 +22,7 @@

<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml" />
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
<sukiUi:SukiTheme ThemeColor="Blue"/>
<suki:SukiTheme ThemeColor="Blue"/>
<StyleInclude Source="avares://SukiUI.Demo/Styles/ShowMeTheXamlStyles.axaml" />
<StyleInclude Source="avares://SukiUI.Demo/Styles/WrapPanelStyles.axaml" />
<StyleInclude Source="avares://SukiUI.Demo/Styles/TextStyles.axaml" />
Expand Down
111 changes: 55 additions & 56 deletions SukiUI.Demo/Features/ControlsLibrary/ButtonsView.axaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<UserControl x:Class="SukiUI.Demo.Features.ControlsLibrary.ButtonsView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:SukiUI.Controls;assembly=SukiUI"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
xmlns:controlsLibrary="clr-namespace:SukiUI.Demo.Features.ControlsLibrary"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:showMeTheXaml="clr-namespace:ShowMeTheXaml;assembly=ShowMeTheXaml.Avalonia"
xmlns:theme="clr-namespace:SukiUI.Theme;assembly=SukiUI"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="controlsLibrary:ButtonsViewModel"
mc:Ignorable="d">
<UserControl.Styles>
<Style Selector="Button">
<Setter Property="Content" Value="Button" />
<Setter Property="theme:ButtonExtensions.ShowProgress" Value="{Binding IsBusy}" />
<Setter Property="suki:ButtonExtensions.ShowProgress" Value="{Binding IsBusy}" />
<Setter Property="Command" Value="{Binding ButtonClickedCommand}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled}" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="Auto,*">
<controls:GlassCard Classes="HeaderCard">
<controls:GroupBox Header="Buttons">
<suki:GlassCard Classes="HeaderCard">
<suki:GroupBox Header="Buttons">
<StackPanel Classes="HeaderContent">
<TextBlock>
SukiUI has a handful of button styles, available in both the standard primary color, but also in the theme's accent color.
Expand All @@ -40,95 +39,95 @@

</StackPanel>
</StackPanel>
</controls:GroupBox>
</controls:GlassCard>
</suki:GroupBox>
</suki:GlassCard>
<ScrollViewer Grid.Row="1">
<WrapPanel Classes="PageContainer">
<controls:GlassCard>
<controls:GroupBox Header="Standard Button">
<suki:GlassCard>
<suki:GroupBox Header="Standard Button">
<showMeTheXaml:XamlDisplay UniqueId="Button1">
<Button />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Basic Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Basic Button">
<showMeTheXaml:XamlDisplay UniqueId="Button2">
<Button Classes="Basic" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Flat Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Flat Button">
<showMeTheXaml:XamlDisplay UniqueId="Button3">
<Button Classes="Flat" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Flat Rounded Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Flat Rounded Button">
<showMeTheXaml:XamlDisplay UniqueId="Button4">
<Button Classes="Rounded Flat" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Outlined Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Outlined Button">
<showMeTheXaml:XamlDisplay UniqueId="Button5">
<Button Classes="Outlined" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Standard Accent Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Standard Accent Button">
<showMeTheXaml:XamlDisplay UniqueId="Button6">
<Button Classes="Accent" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Basic Accent Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Basic Accent Button">
<showMeTheXaml:XamlDisplay UniqueId="Button7">
<Button Classes="Basic Accent" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Flat Accent Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Flat Accent Button">
<showMeTheXaml:XamlDisplay UniqueId="Button8">
<Button Classes="Flat Accent" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Flat Rounded Accent Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Flat Rounded Accent Button">
<showMeTheXaml:XamlDisplay UniqueId="Button9">
<Button Classes="Rounded Flat Accent" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Outlined Accent Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Outlined Accent Button">
<showMeTheXaml:XamlDisplay UniqueId="Button10">
<Button Classes="Outlined Accent" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GroupBox Header="Busy Button">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Busy Button">
<showMeTheXaml:XamlDisplay UniqueId="Button11">
<Button theme:ButtonExtensions.ShowProgress="True" />
<Button suki:ButtonExtensions.ShowProgress="True" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
</suki:GroupBox>
</suki:GlassCard>

<controls:GlassCard>
<controls:GroupBox Header="Large Button">
<suki:GlassCard>
<suki:GroupBox Header="Large Button">
<showMeTheXaml:XamlDisplay UniqueId="Button12">
<Button Classes="Flat Large" />
</showMeTheXaml:XamlDisplay>
</controls:GroupBox>
</controls:GlassCard>
</suki:GroupBox>
</suki:GlassCard>
</WrapPanel>
</ScrollViewer>
</Grid>
Expand Down
64 changes: 32 additions & 32 deletions SukiUI.Demo/Features/ControlsLibrary/CardsView.axaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<UserControl x:Class="SukiUI.Demo.Features.ControlsLibrary.CardsView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:SukiUI.Controls;assembly=SukiUI"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
xmlns:controlsLibrary="clr-namespace:SukiUI.Demo.Features.ControlsLibrary"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand All @@ -12,14 +12,14 @@
x:DataType="controlsLibrary:CardsViewModel"
mc:Ignorable="d">
<UserControl.Styles>
<Style Selector="WrapPanel &gt; controls|GlassCard">
<Style Selector="WrapPanel &gt; suki|GlassCard">
<Setter Property="IsOpaque" Value="{Binding IsOpaque}" />
<Setter Property="IsInteractive" Value="{Binding IsInteractive}" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="Auto,*">
<controls:GlassCard Classes="HeaderCard">
<controls:GroupBox Header="Cards">
<suki:GlassCard Classes="HeaderCard">
<suki:GroupBox Header="Cards">
<StackPanel Classes="HeaderContent">
<TextBlock>
SukiUI provides a simple GlassCard control which has some basic customisation built in.
Expand All @@ -44,34 +44,34 @@

</DockPanel>
</StackPanel>
</controls:GroupBox>
</controls:GlassCard>
</suki:GroupBox>
</suki:GlassCard>
<ScrollViewer Grid.Row="1">
<StackPanel>
<WrapPanel Classes="PageContainer">
<controls:GlassCard>
<controls:GroupBox Header="Standard">
<suki:GlassCard>
<suki:GroupBox Header="Standard">
<TextBlock Classes="h3">A standard GlassCard</TextBlock>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard Classes="Primary">
<controls:GroupBox Header="Primary">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard Classes="Primary">
<suki:GroupBox Header="Primary">
<TextBlock Classes="h3">A primary colored GlassCard</TextBlock>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard Classes="Accent">
<controls:GroupBox Header="Accent">
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard Classes="Accent">
<suki:GroupBox Header="Accent">
<TextBlock Classes="h3">An accent colored GlassCard</TextBlock>
</controls:GroupBox>
</controls:GlassCard>
<controls:GlassCard>
<controls:GlassCard.Resources>
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
<suki:GlassCard.Resources>
<system:Double x:Key="GlassOpacity">0.2</system:Double>
</controls:GlassCard.Resources>
<controls:GroupBox Header="Overriden Opacity">
</suki:GlassCard.Resources>
<suki:GroupBox Header="Overriden Opacity">
<TextBlock Classes="h4">This card's resources sets the double resource of "GlassOpacity" to 0.2</TextBlock>
</controls:GroupBox>
</controls:GlassCard>
</suki:GroupBox>
</suki:GlassCard>

</WrapPanel>

Expand All @@ -84,15 +84,15 @@
</StackPanel>

<Grid ColumnDefinitions="*,*" Margin="15">
<controls:GlassCard HorizontalAlignment="Left" IsAnimated="False" Margin="15">
<suki:GlassCard HorizontalAlignment="Left" IsAnimated="False" Margin="15">
<StackPanel Spacing="35">
<TextBlock FontWeight="DemiBold" FontSize="17" Text="Not Animated"></TextBlock>
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:GlassCard helpers:AnimationExtensions.FadeIn="500" Width="150" Height="60" Margin="5" IsInteractive="True">
<suki:GlassCard helpers:AnimationExtensions.FadeIn="500" Width="150" Height="60" Margin="5" IsInteractive="True">
<TextBlock Text="Item" Foreground="{DynamicResource SukiLowText}"></TextBlock>
</controls:GlassCard>
</suki:GlassCard>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
Expand All @@ -102,17 +102,17 @@
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</controls:GlassCard>
</suki:GlassCard>

<controls:GlassCard Grid.Column="1" HorizontalAlignment="Left" Margin="15">
<suki:GlassCard Grid.Column="1" HorizontalAlignment="Left" Margin="15">
<StackPanel Spacing="35">
<TextBlock FontWeight="DemiBold" FontSize="17" Text="Animated"></TextBlock>
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:GlassCard helpers:AnimationExtensions.FadeIn="500" Width="150" Height="60" Margin="5" IsInteractive="True">
<suki:GlassCard helpers:AnimationExtensions.FadeIn="500" Width="150" Height="60" Margin="5" IsInteractive="True">
<TextBlock Text="Item" Foreground="{DynamicResource SukiLowText}"></TextBlock>
</controls:GlassCard>
</suki:GlassCard>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
Expand All @@ -122,7 +122,7 @@
</ItemsControl.ItemsPanel>
</ItemsControl>
</StackPanel>
</controls:GlassCard>
</suki:GlassCard>
</Grid>
<Border Height="100"></Border>
</StackPanel>
Expand Down
Loading

0 comments on commit b0685fa

Please sign in to comment.