mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-11 04:00:48 +08:00
Compare commits
2 Commits
copilot/ad
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77dffc55b1 | ||
|
|
3ba357b691 |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="avalonia-nightly" value="https://nuget-feed-nightly.avaloniaui.net/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -1,13 +1,13 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.10</DataGridVersion>
|
||||
<AvaloniaVersion>11.3.11</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.11</DataGridVersion>
|
||||
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<!-- <PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />-->
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Semi.Avalonia.Demo.Android;
|
||||
MainLauncher = true,
|
||||
LaunchMode = LaunchMode.SingleTop,
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
||||
public class MainActivity : AvaloniaMainActivity
|
||||
public class MainActivity : AvaloniaMainActivity<App>
|
||||
{
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||
{
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:SemiPopupAnimations />
|
||||
<semi:ColorPickerSemiTheme />
|
||||
<!-- <semi:DataGridSemiTheme /> -->
|
||||
<!-- <semi:TreeDataGridSemiTheme /> -->
|
||||
<semi:DataGridSemiTheme />
|
||||
<semi:TreeDataGridSemiTheme />
|
||||
</Application.Styles>
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
@@ -22,7 +22,7 @@ public partial class App : Application
|
||||
case IClassicDesktopStyleApplicationLifetime desktop:
|
||||
// Line below is needed to remove Avalonia data validation.
|
||||
// Without this line you will get duplicate validations from both Avalonia and CT
|
||||
// BindingPlugins.DataValidators.RemoveAt(0);
|
||||
BindingPlugins.DataValidators.RemoveAt(0);
|
||||
desktop.MainWindow = new MainWindow();
|
||||
break;
|
||||
case ISingleViewApplicationLifetime singleView:
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Threading.Tasks;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Media;
|
||||
using Semi.Avalonia.Demo.Converters;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</StackPanel.Styles>
|
||||
|
||||
<AutoCompleteBox
|
||||
PlaceholderText="Please select a State"
|
||||
Watermark="Please select a State"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Large"
|
||||
@@ -41,7 +41,7 @@
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled"
|
||||
Watermark="Disabled"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
InnerLeftContent="https://"
|
||||
@@ -52,16 +52,16 @@
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large"
|
||||
Watermark="Large"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
PlaceholderText="Default"
|
||||
Watermark="Default"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Small"
|
||||
PlaceholderText="Small"
|
||||
Watermark="Small"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled"
|
||||
Watermark="Disabled"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
PlaceholderText="Bordered"
|
||||
Watermark="Bordered"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.CommandBarDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<StreamGeometry x:Key="SemiIconShare">
|
||||
M17.5 2A3.5 3.5 0 1 1 15 7.95l-5.13 3.11a3.5 3.5 0 0 1 .03 1.78l5.22 3.1A3.49 3.49 0 0 1 21 18.5a3.5 3.5 0 1 1-6.9-.85l-5.22-3.08A3.49 3.49 0 0 1 3 12a3.5 3.5 0 0 1 5.8-2.63l5.27-3.19A3.5 3.5 0 0 1 17.5 2Z
|
||||
</StreamGeometry>
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="16" Margin="0,0,0,16">
|
||||
|
||||
<!-- Default: label below icon (Bottom) -->
|
||||
<HeaderedContentControl Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="CommandBar — Label Position: Bottom (default)" />
|
||||
</HeaderedContentControl.Header>
|
||||
<CommandBar>
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Print" Icon="{DynamicResource SemiIconPrint}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<!-- LabelPosition=Right -->
|
||||
<HeaderedContentControl Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="CommandBar — Label Position: Right" />
|
||||
</HeaderedContentControl.Header>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<AppBarToggleButton Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
</CommandBar>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<!-- Compact (icons only) -->
|
||||
<HeaderedContentControl Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="CommandBar — Compact (icons only)" />
|
||||
</HeaderedContentControl.Header>
|
||||
<CommandBar DefaultLabelPosition="Collapsed">
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<AppBarToggleButton Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
</CommandBar>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<!-- With secondary commands (overflow) -->
|
||||
<HeaderedContentControl Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<TextBlock Text="CommandBar — With Secondary Commands (overflow)" />
|
||||
</HeaderedContentControl.Header>
|
||||
<CommandBar>
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<CommandBar.SecondaryCommands>
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar.SecondaryCommands>
|
||||
</CommandBar>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<TextBlock Text="CommandBar — Dynamic Overflow" />
|
||||
<ToggleSwitch Name="idfe" IsChecked="True" />
|
||||
<Slider Name="ws" Width="500" Minimum="0" Maximum="500" Value="100" />
|
||||
</StackPanel>
|
||||
</HeaderedContentControl.Header>
|
||||
<CommandBar
|
||||
IsDynamicOverflowEnabled="{Binding #idfe.IsChecked}"
|
||||
Width="{Binding #ws.Value}">
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar>
|
||||
</HeaderedContentControl>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class CommandBarDemo : UserControl
|
||||
{
|
||||
public CommandBarDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
179
demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
Normal file
179
demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
Normal file
@@ -0,0 +1,179 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.DataGridDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:DataType="vm:DataGridDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<TabControl>
|
||||
<TabItem Header="DataGrid">
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
|
||||
<ToggleSwitch Content="Inset Content" Name="inset" />
|
||||
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
|
||||
</StackPanel>
|
||||
<DataGrid Grid.Row="1"
|
||||
Margin="8"
|
||||
CanUserReorderColumns="True"
|
||||
CanUserResizeColumns="True"
|
||||
CanUserSortColumns="True"
|
||||
HeadersVisibility="All"
|
||||
IsReadOnly="True"
|
||||
Classes.InsetContent="{Binding #inset.IsChecked}"
|
||||
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
|
||||
IsEnabled="{Binding #enable.IsChecked}"
|
||||
ItemsSource="{Binding GridData1}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Title}"
|
||||
Header="Title" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Artist}"
|
||||
Header="Artist" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Album}"
|
||||
Header="Album" />
|
||||
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Duration}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Grouping">
|
||||
<DataGrid
|
||||
Margin="8"
|
||||
CanUserReorderColumns="True"
|
||||
CanUserResizeColumns="True"
|
||||
CanUserSortColumns="True"
|
||||
HeadersVisibility="All"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding GridData2}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Title}"
|
||||
Header="Title" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Artist}"
|
||||
Header="Artist" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:Song"
|
||||
Binding="{Binding Album}"
|
||||
Header="Album" />
|
||||
<DataGridTemplateColumn
|
||||
x:DataType="vm:Song"
|
||||
Header="Duration"
|
||||
SortMemberPath="Duration">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="vm:Song">
|
||||
<TextBlock
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Duration}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
<TabItem Name="EditableTab" Header="Editable">
|
||||
<Grid Margin="8" RowDefinitions="Auto,*,Auto">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Orientation="Horizontal"
|
||||
Spacing="4">
|
||||
<TextBlock VerticalAlignment="Center" Text="FontSize:" />
|
||||
<Slider
|
||||
Name="FontSizeSlider"
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Maximum="30"
|
||||
Minimum="5"
|
||||
Value="14" />
|
||||
<CheckBox
|
||||
Name="IsThreeStateCheckBox"
|
||||
Content="IsThreeState"
|
||||
IsChecked="False" />
|
||||
</StackPanel>
|
||||
<DataGrid
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
ItemsSource="{Binding GridData3}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn
|
||||
Width="2*"
|
||||
Binding="{Binding IsSelected}"
|
||||
Header="Select"
|
||||
IsThreeState="{Binding #IsThreeStateCheckBox.IsChecked, Mode=OneWay}" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:SongViewModel"
|
||||
Binding="{Binding Title}"
|
||||
FontSize="{Binding #FontSizeSlider.Value, Mode=OneWay}"
|
||||
Header="Title" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:SongViewModel"
|
||||
Binding="{Binding Artist}"
|
||||
Header="Artist" />
|
||||
<DataGridTextColumn
|
||||
Width="6*"
|
||||
x:DataType="vm:SongViewModel"
|
||||
Binding="{Binding Album}"
|
||||
Header="Album" />
|
||||
<DataGridTemplateColumn Width="2*" Header="Comments">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding CountOfComment}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<NumericUpDown
|
||||
HorizontalAlignment="Stretch"
|
||||
FormatString="N0"
|
||||
Minimum="0"
|
||||
Value="{Binding CountOfComment}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Margin="12,0,12,12"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding AddCommand}"
|
||||
Content="Add" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
13
demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml.cs
Normal file
13
demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Avalonia.Controls;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class DataGridDemo : UserControl
|
||||
{
|
||||
public DataGridDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new DataGridDemoViewModel();
|
||||
}
|
||||
}
|
||||
@@ -36,20 +36,10 @@
|
||||
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
|
||||
</Panel>
|
||||
</HeaderedContentControl.Header>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
<HeaderedContentControl.Content>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
</HeaderedContentControl.Content>
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>Real GroupBox</TextBlock>
|
||||
<GroupBox
|
||||
HorizontalAlignment="Left"
|
||||
MaxWidth="360">
|
||||
<HeaderedContentControl.Header>
|
||||
<Panel>
|
||||
<SelectableTextBlock Text="Semi Design" />
|
||||
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
|
||||
</Panel>
|
||||
</HeaderedContentControl.Header>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
327
demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml
Normal file
327
demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml
Normal file
@@ -0,0 +1,327 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||
xmlns:cvt="clr-namespace:Semi.Avalonia.Demo.Converters"
|
||||
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1450"
|
||||
x:DataType="vm:HighContrastDemoViewModel"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.HighContrastDemo">
|
||||
<Design.DataContext>
|
||||
<vm:HighContrastDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<SplitView
|
||||
Name="splitView"
|
||||
CompactPaneLength="50"
|
||||
DisplayMode="CompactInline"
|
||||
IsPaneOpen="{Binding #toggle.IsChecked, Mode=TwoWay}"
|
||||
OpenPaneLength="300"
|
||||
PanePlacement="Right">
|
||||
<SplitView.Pane>
|
||||
<StackPanel>
|
||||
<ToggleSwitch
|
||||
Name="toggle"
|
||||
HorizontalAlignment="Right"
|
||||
IsChecked="True"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||
Content="{StaticResource SemiIconSidebar}" />
|
||||
<Border IsVisible="{Binding #splitView.IsPaneOpen}" Theme="{DynamicResource CardBorder}">
|
||||
<Panel>
|
||||
<TextBlock
|
||||
IsVisible="{Binding SelectedColorResource, Converter={x:Static ObjectConverters.IsNull}}"
|
||||
Text="Click on Color to Check Details"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:ColorDetailControl
|
||||
Background="{Binding SelectedColorResource.Brush}"
|
||||
IsVisible="{Binding SelectedColorResource, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
ResourceKey="{Binding SelectedColorResource.ResourceKey}"
|
||||
ResourceName="{Binding SelectedColorResource.ResourceKey}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Text="Theme Preview" FontWeight="SemiBold" />
|
||||
<ListBox
|
||||
Theme="{StaticResource PureCardRadioGroupListBox}"
|
||||
ItemsSource="{Binding ThemeVariants}"
|
||||
SelectedItem="{Binding SelectedThemeVariant}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="5" MinWidth="200">
|
||||
<ThemeVariantScope RequestedThemeVariant="{Binding}">
|
||||
<Border
|
||||
Padding="5 25 5 5"
|
||||
HorizontalAlignment="Left"
|
||||
Background="{DynamicResource WindowColor}"
|
||||
BorderBrush="{DynamicResource WindowTextColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="3">
|
||||
<StackPanel Spacing="10">
|
||||
<StackPanel Orientation="Horizontal" Spacing="50">
|
||||
<StackPanel Spacing="5">
|
||||
<TextBlock
|
||||
FontSize="50"
|
||||
Text="Aa" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="3">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="Border">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource WindowTextColor}" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Width" Value="10" />
|
||||
<Setter Property="Height" Value="{Binding $self.Width}" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<Border Background="{DynamicResource WindowColor}" />
|
||||
<Border Background="{DynamicResource HotlightColor}" />
|
||||
<Border Background="{DynamicResource GrayTextColor}" />
|
||||
<Border Background="{DynamicResource HighlightTextColor}" />
|
||||
<Border Background="{DynamicResource HighlightColor}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource WindowTextColor}"
|
||||
CornerRadius="3"
|
||||
Padding="8">
|
||||
<Panel>
|
||||
<StackPanel Spacing="5">
|
||||
<Border
|
||||
Width="50"
|
||||
Height="1"
|
||||
Background="{DynamicResource WindowTextColor}" />
|
||||
<Border
|
||||
Height="1"
|
||||
Background="{DynamicResource WindowTextColor}" />
|
||||
<Border
|
||||
Height="1"
|
||||
Background="{DynamicResource WindowTextColor}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Orientation="Horizontal"
|
||||
Spacing="2">
|
||||
<Border
|
||||
Width="20"
|
||||
Height="5"
|
||||
Background="{DynamicResource HighlightColor}"
|
||||
CornerRadius="1" />
|
||||
<Border
|
||||
Width="20"
|
||||
Height="5"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource ButtonTextColor}"
|
||||
CornerRadius="1" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Height="1"
|
||||
Background="{DynamicResource WindowTextColor}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ThemeVariantScope>
|
||||
<TextBlock Text="{Binding}" FontWeight="SemiBold" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<ThemeVariantScope
|
||||
MinWidth="400"
|
||||
RequestedThemeVariant="{Binding SelectedThemeVariant}">
|
||||
<Border Padding="10" Background="{DynamicResource WindowColor}">
|
||||
<StackPanel Spacing="16">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
</Style>
|
||||
<Style Selector="controls|ColorItemControl.ColorBlock">
|
||||
<Setter Property="Width" Value="44" />
|
||||
<Setter Property="Height" Value="{Binding $self.Width}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource WindowTextColor}" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<Panel>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource WindowTextColor}"
|
||||
Text="Background" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[0]}"
|
||||
Background="{DynamicResource WindowColor}" />
|
||||
</Panel>
|
||||
<Panel>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource WindowTextColor}"
|
||||
Text="Text" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[1]}"
|
||||
Background="{DynamicResource WindowTextColor}" />
|
||||
</Panel>
|
||||
<Panel>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource HotlightColor}"
|
||||
TextDecorations="Underline"
|
||||
Text="Hyperlink" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[2]}"
|
||||
Background="{DynamicResource HotlightColor}" />
|
||||
</Panel>
|
||||
<Panel>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource GrayTextColor}"
|
||||
Text="Inactive Text" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[3]}"
|
||||
Background="{DynamicResource GrayTextColor}" />
|
||||
</Panel>
|
||||
<Panel>
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource HighlightTextColor}"
|
||||
Background="{DynamicResource HighlightColor}"
|
||||
Text="Selected text" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="4">
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[4]}"
|
||||
Background="{DynamicResource HighlightTextColor}" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[5]}"
|
||||
Background="{DynamicResource HighlightColor}" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
<Panel>
|
||||
<Border
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="{DynamicResource ButtonTextColor}"
|
||||
Background="{DynamicResource ButtonFaceColor}"
|
||||
BorderThickness="2"
|
||||
CornerRadius="3">
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource ButtonTextColor}"
|
||||
Padding="16 6"
|
||||
Text="Button text" />
|
||||
</Border>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="4">
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[6]}"
|
||||
Background="{DynamicResource ButtonTextColor}" />
|
||||
<controls:ColorItemControl
|
||||
Classes="ColorBlock"
|
||||
DataContext="{Binding ColorResources[7]}"
|
||||
Background="{DynamicResource ButtonFaceColor}" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ThemeVariantScope>
|
||||
|
||||
<DataGrid
|
||||
HorizontalAlignment="Left"
|
||||
CanUserSortColumns="False"
|
||||
AutoGenerateColumns="False"
|
||||
ItemsSource="{Binding ColorResources}"
|
||||
GridLinesVisibility="All"
|
||||
BorderBrush="{DynamicResource SemiColorBorder}"
|
||||
BorderThickness="1"
|
||||
Padding="5">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header="Color">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<controls:ColorItemControl
|
||||
Width="40"
|
||||
Height="20"
|
||||
CornerRadius="3"
|
||||
Background="{Binding Brush}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<SelectableTextBlock
|
||||
Margin="12 0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Hex">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<SelectableTextBlock
|
||||
Margin="12 0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Brush,
|
||||
Converter={x:Static cvt:ColorConverter.ToHex},ConverterParameter={x:False}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Description">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<SelectableTextBlock
|
||||
Margin="12 0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Description}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Header="Pair With">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<SelectableTextBlock
|
||||
Margin="12 0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding PairWith}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Width="100" Header="CopyText">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:ColorResource">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:HighContrastDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</UserControl>
|
||||
24
demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml.cs
Normal file
24
demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class HighContrastDemo : UserControl
|
||||
{
|
||||
public HighContrastDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new HighContrastDemoViewModel();
|
||||
}
|
||||
|
||||
public async Task Copy(object? o)
|
||||
{
|
||||
if (o is null) return;
|
||||
var toplevel = TopLevel.GetTopLevel(this);
|
||||
if (toplevel?.Clipboard is { } c)
|
||||
{
|
||||
await c.SetTextAsync(o.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,15 +28,15 @@
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large"
|
||||
Watermark="Large"
|
||||
ButtonSpinnerLocation="Left" />
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
PlaceholderText="Default"
|
||||
Watermark="Default"
|
||||
ShowButtonSpinner="False" />
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
PlaceholderText="Small"
|
||||
Watermark="Small"
|
||||
Classes="Small" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -353,12 +353,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].MainInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].MainInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].MainStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -368,12 +368,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].ColorPickerInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].ColorPickerInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].ColorPickerStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -383,12 +383,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].DataGridInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].DataGridInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].DataGridStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -398,12 +398,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].TreeDataGridInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].TreeDataGridInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].TreeDataGridStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -413,12 +413,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].DockInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].DockInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].DockStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -428,12 +428,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].TabaloniaInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].TabaloniaInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].TabaloniaStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
@@ -443,12 +443,12 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="Install via nuget: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock Text="{Binding $parent[local:Overview].AvaloniaEditInstall}" />
|
||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].AvaloniaEditInstall}" />
|
||||
</Border>
|
||||
<TextBlock Text="Reference styles: " />
|
||||
<Border Margin="0,16" Classes="CodeBlock">
|
||||
<SelectableTextBlock
|
||||
|
||||
FontFamily="Consolas"
|
||||
Text="{Binding $parent[local:Overview].AvaloniaEditStyle}"
|
||||
TextWrapping="Wrap" />
|
||||
</Border>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Threading;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
|
||||
@@ -23,36 +23,36 @@
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large" />
|
||||
Watermark="Large" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
PlaceholderText="Default" />
|
||||
Watermark="Default" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Small"
|
||||
PlaceholderText="Small" />
|
||||
Watermark="Small" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox
|
||||
Width="100"
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled" />
|
||||
Watermark="Disabled" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
PlaceholderText="Bordered" />
|
||||
Watermark="Bordered" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<TextBox Width="300" Classes="TextArea" PlaceholderText="TextArea TextBox" />
|
||||
<TextBox Width="300" Classes="TextArea" Watermark="TextArea TextBox" />
|
||||
<TextBox Width="300" Classes="TextArea ClearButton" Text="TextArea with ClearButton - text should be clearable" />
|
||||
<TextBox
|
||||
Width="300"
|
||||
Theme="{StaticResource LooklessTextBox}"
|
||||
PlaceholderText="Lookless TextBox"
|
||||
Watermark="Lookless TextBox"
|
||||
InnerLeftContent="https://"
|
||||
InnerRightContent=".com" />
|
||||
</StackPanel>
|
||||
|
||||
126
demo/Semi.Avalonia.Demo/Pages/TreeDataGridDemo.axaml
Normal file
126
demo/Semi.Avalonia.Demo/Pages/TreeDataGridDemo.axaml
Normal file
@@ -0,0 +1,126 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
xmlns:converters="clr-namespace:Semi.Avalonia.Demo.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.TreeDataGridDemo"
|
||||
x:DataType="vm:TreeDataGridDemoViewModel">
|
||||
<UserControl.Resources>
|
||||
<converters:FileIconConverter x:Key="FileIconConverter">
|
||||
<StaticResource x:Key="file" ResourceKey="SemiIconFile" />
|
||||
<StaticResource x:Key="folderOpen" ResourceKey="SemiIconFolderOpen" />
|
||||
<StaticResource x:Key="folderClosed" ResourceKey="SemiIconFolder" />
|
||||
</converters:FileIconConverter>
|
||||
</UserControl.Resources>
|
||||
<TabControl>
|
||||
<TabItem Header="Songs">
|
||||
<TreeDataGrid
|
||||
AutoDragDropRows="True"
|
||||
DataContext="{Binding SongsContext}"
|
||||
Source="{Binding Songs}">
|
||||
<TreeDataGrid.Resources>
|
||||
<DataTemplate x:Key="AlbumCell" DataType="vm:SongViewModel">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
Text="{Binding Album}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="AlbumEditCell" DataType="vm:SongViewModel">
|
||||
<ComboBox
|
||||
VerticalAlignment="Center"
|
||||
Classes="Small"
|
||||
ItemsSource="{x:Static vm:Song.Albums}"
|
||||
SelectedItem="{Binding Album}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CommentsCell" DataType="vm:SongViewModel">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding CountOfComment}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="CommentsEditCell" DataType="vm:SongViewModel">
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Classes="Small"
|
||||
Value="{Binding CountOfComment}" />
|
||||
</DataTemplate>
|
||||
</TreeDataGrid.Resources>
|
||||
<TreeDataGrid.Styles>
|
||||
<Style Selector="TreeDataGrid TreeDataGridRow:nth-last-child(2n)">
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
||||
</Style>
|
||||
</TreeDataGrid.Styles>
|
||||
</TreeDataGrid>
|
||||
</TabItem>
|
||||
<TabItem Header="Files">
|
||||
<Grid DataContext="{Binding FilesContext}" RowDefinitions="Auto, *">
|
||||
<DockPanel Margin="0,4" DockPanel.Dock="Top">
|
||||
<ComboBox
|
||||
DockPanel.Dock="Left"
|
||||
ItemsSource="{Binding Drives}"
|
||||
SelectedItem="{Binding SelectedDrive}" />
|
||||
<TextBox
|
||||
Margin="4,0,0,0"
|
||||
VerticalContentAlignment="Center"
|
||||
KeyDown="SelectedPath_KeyDown"
|
||||
Text="{Binding SelectedPath, Mode=OneWay}" />
|
||||
</DockPanel>
|
||||
<TreeDataGrid
|
||||
Name="fileViewer"
|
||||
Grid.Row="1"
|
||||
Source="{Binding Source}">
|
||||
<TreeDataGrid.Resources>
|
||||
|
||||
<!-- Template for Name column cells -->
|
||||
<DataTemplate x:Key="FileNameCell" DataType="vm:FileNodeViewModel">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Margin="8,0">
|
||||
<PathIcon.Data>
|
||||
<MultiBinding Converter="{StaticResource FileIconConverter}">
|
||||
<Binding Path="IsDirectory" />
|
||||
<Binding Path="IsExpanded" />
|
||||
</MultiBinding>
|
||||
</PathIcon.Data>
|
||||
</PathIcon>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Edit template for Name column cells -->
|
||||
<DataTemplate x:Key="FileNameEditCell" DataType="vm:FileNodeViewModel">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Margin="0,0,4,0" VerticalAlignment="Center">
|
||||
<Image.Source>
|
||||
<MultiBinding Converter="{StaticResource FileIconConverter}">
|
||||
<Binding Path="IsDirectory" />
|
||||
<Binding Path="IsExpanded" />
|
||||
</MultiBinding>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
Classes="Small"
|
||||
Text="{Binding Name}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="DataValidationErrors">
|
||||
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
|
||||
</Style>
|
||||
</TextBox.Styles>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</TreeDataGrid.Resources>
|
||||
<TreeDataGrid.Styles>
|
||||
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)">
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
||||
</Style>
|
||||
</TreeDataGrid.Styles>
|
||||
</TreeDataGrid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
22
demo/Semi.Avalonia.Demo/Pages/TreeDataGridDemo.axaml.cs
Normal file
22
demo/Semi.Avalonia.Demo/Pages/TreeDataGridDemo.axaml.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class TreeDataGridDemo : UserControl
|
||||
{
|
||||
public TreeDataGridDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new TreeDataGridDemoViewModel();
|
||||
}
|
||||
|
||||
private void SelectedPath_KeyDown(object? sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter && DataContext is TreeDataGridDemoViewModel vm)
|
||||
{
|
||||
vm.FilesContext.SelectedPath = (sender as TextBox)?.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
104
demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml
Normal file
104
demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml
Normal file
@@ -0,0 +1,104 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.VariablesDemo"
|
||||
x:DataType="vm:VariablesDemoViewModel">
|
||||
<Design.DataContext>
|
||||
<vm:VariablesDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
Width="600"
|
||||
Margin="8"
|
||||
Classes="ClearButton"
|
||||
Text="{Binding SearchText}"
|
||||
Watermark="Input Variable Category/ResourceKey/Type/Value/Description" />
|
||||
|
||||
<DataGrid
|
||||
Grid.Row="1"
|
||||
Margin="8"
|
||||
CanUserReorderColumns="True"
|
||||
CanUserResizeColumns="True"
|
||||
CanUserSortColumns="True"
|
||||
HeadersVisibility="All"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding GridData}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn
|
||||
Width="300"
|
||||
x:DataType="vm:VariableItem"
|
||||
Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:VariableItem">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn
|
||||
Width="200"
|
||||
x:DataType="vm:VariableItem"
|
||||
Header="Type">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:VariableItem">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Type.Name}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn
|
||||
Width="200"
|
||||
x:DataType="vm:VariableItem"
|
||||
Header="Value">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:VariableItem">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Value}"
|
||||
TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn
|
||||
Width="*"
|
||||
x:DataType="vm:VariableItem"
|
||||
Header="Description">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:VariableItem">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Description}"
|
||||
TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn
|
||||
Width="100"
|
||||
x:DataType="vm:VariableItem"
|
||||
Header="CopyText"
|
||||
SortMemberPath="Duration">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="vm:VariableItem">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:VariablesDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
24
demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml.cs
Normal file
24
demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class VariablesDemo : UserControl
|
||||
{
|
||||
public VariablesDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new VariablesDemoViewModel();
|
||||
}
|
||||
|
||||
public async Task Copy(object? o)
|
||||
{
|
||||
if (o is null) return;
|
||||
var toplevel = TopLevel.GetTopLevel(this);
|
||||
if (toplevel?.Clipboard is { } c)
|
||||
{
|
||||
await c.SetTextAsync(o.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,23 +13,20 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
|
||||
<!-- <PackageReference Include="Avalonia.Controls.DataGrid"/>-->
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid"/>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<!-- <PackageReference Include="Avalonia.Diagnostics">-->
|
||||
<!-- <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>-->
|
||||
<!-- <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>-->
|
||||
<!-- </PackageReference>-->
|
||||
<PackageReference Include="Avalonia.Diagnostics">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm"/>
|
||||
<PackageReference Include="Irihi.Avalonia.Shared"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj"/>
|
||||
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj"/>
|
||||
<!-- <ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/>-->
|
||||
<!-- <ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj"/>-->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaXaml Remove="Pages\VariablesDemo.axaml" />
|
||||
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/>
|
||||
<ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
152
demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml
Normal file
152
demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml
Normal file
@@ -0,0 +1,152 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||
x:DataType="viewModels:FunctionalColorGroupViewModel">
|
||||
<ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="controls:FunctionalColorGroupControl">
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<SelectableTextBlock
|
||||
Grid.Row="0"
|
||||
Margin="0,16,0,0"
|
||||
Classes="H3"
|
||||
Text="{TemplateBinding Title}"
|
||||
Theme="{DynamicResource TitleSelectableTextBlock}" />
|
||||
<TabControl Grid.Row="1">
|
||||
<TabItem Header="Light">
|
||||
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightColors}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="70" Header="Color">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<controls:ColorItemControl
|
||||
Width="40"
|
||||
Height="20"
|
||||
Background="{Binding Brush}"
|
||||
CornerRadius="3" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="300" Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="100" Header="Hex">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Hex}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="80" Header="Opacity">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Brush.Opacity}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
x:DataType="viewModels:ColorItemViewModel"
|
||||
Binding="{Binding ColorDisplayName}"
|
||||
CanUserSort="False"
|
||||
Header="Description" />
|
||||
<DataGridTemplateColumn Width="100" Header="CopyText">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:PaletteDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
<TabItem Header="Dark">
|
||||
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkColors}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="70" Header="Color">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<controls:ColorItemControl
|
||||
Width="40"
|
||||
Height="20"
|
||||
Background="{Binding Brush}"
|
||||
CornerRadius="3" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="300" Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="100" Header="Hex">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Hex}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="80" Header="Opacity">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Brush.Opacity}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
x:DataType="viewModels:ColorItemViewModel"
|
||||
Binding="{Binding ColorDisplayName}"
|
||||
CanUserSort="False"
|
||||
Header="Description" />
|
||||
<DataGridTemplateColumn Width="100" Header="CopyText">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ColorItemViewModel">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:PaletteDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
110
demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml
Normal file
110
demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml
Normal file
@@ -0,0 +1,110 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||
x:DataType="viewModels:ShadowGroupViewModel">
|
||||
<ControlTheme x:Key="{x:Type controls:ShadowGroupControl}" TargetType="controls:ShadowGroupControl">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="controls:ShadowGroupControl">
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<SelectableTextBlock
|
||||
Grid.Row="0"
|
||||
Margin="0,16,0,0"
|
||||
Classes="H3"
|
||||
Text="{TemplateBinding Title}"
|
||||
Theme="{DynamicResource TitleSelectableTextBlock}" />
|
||||
<TabControl Grid.Row="1">
|
||||
<TabItem Header="Light">
|
||||
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightShadows}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="300" Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="300" Header="BoxShadows">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding BoxShadowValue}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
x:DataType="viewModels:ShadowItemViewModel"
|
||||
Binding="{Binding ShadowDisplayName}"
|
||||
CanUserSort="False"
|
||||
Header="Description" />
|
||||
<DataGridTemplateColumn Width="100" Header="CopyText">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:PaletteDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
<TabItem Header="Dark">
|
||||
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkShadows}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="300" Header="ResourceKey">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="300" Header="BoxShadows">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<SelectableTextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding BoxShadowValue}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
x:DataType="viewModels:ShadowItemViewModel"
|
||||
Binding="{Binding ShadowDisplayName}"
|
||||
CanUserSort="False"
|
||||
Header="Description" />
|
||||
<DataGridTemplateColumn Width="100" Header="CopyText">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="viewModels:ShadowItemViewModel">
|
||||
<Button
|
||||
Command="{Binding $parent[pages:PaletteDemo].Copy}"
|
||||
CommandParameter="{Binding CopyText}"
|
||||
Theme="{DynamicResource IconBorderlessButton}"
|
||||
Content="{StaticResource SemiIconCopy}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,8 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="ColorDetailControl.axaml" />
|
||||
<ResourceInclude Source="ColorItemControl.axaml" />
|
||||
<ResourceInclude Source="FunctionalColorGroupControl.axaml" />
|
||||
<ResourceInclude Source="ShadowGroupControl.axaml" />
|
||||
<ResourceInclude Source="ToggleSwitch.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
154
demo/Semi.Avalonia.Demo/ViewModels/DataGridDemoViewModel.cs
Normal file
154
demo/Semi.Avalonia.Demo/ViewModels/DataGridDemoViewModel.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Avalonia.Collections;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public class DataGridDemoViewModel : ObservableObject
|
||||
{
|
||||
public ObservableCollection<Song> GridData1 { get; set; }
|
||||
|
||||
public DataGridCollectionView GridData2 { get; set; }
|
||||
|
||||
public ObservableCollection<SongViewModel> GridData3 { get; set; }
|
||||
|
||||
public RelayCommand AddCommand { get; set; }
|
||||
|
||||
public DataGridDemoViewModel()
|
||||
{
|
||||
GridData1 = new ObservableCollection<Song>(Song.Songs);
|
||||
GridData2 = new DataGridCollectionView(Song.Songs);
|
||||
GridData2.GroupDescriptions.Add(new DataGridPathGroupDescription("Album"));
|
||||
GridData3 = new ObservableCollection<SongViewModel>(Song.Songs.Take(10).Select(a => new SongViewModel()
|
||||
{
|
||||
Title = a.Title,
|
||||
Artist = a.Artist,
|
||||
Album = a.Album,
|
||||
CountOfComment = a.CountOfComment,
|
||||
IsSelected = false
|
||||
}));
|
||||
AddCommand = new RelayCommand(Add);
|
||||
}
|
||||
|
||||
private void Add()
|
||||
{
|
||||
GridData3.Add(new SongViewModel());
|
||||
}
|
||||
}
|
||||
|
||||
public class Song
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public string? Artist { get; set; }
|
||||
public TimeSpan? Duration { get; set; }
|
||||
public string? Album { get; set; }
|
||||
public int CountOfComment { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
public Song(string title, string artist, int m, int s, string album, int countOfComment, int netEaseId)
|
||||
{
|
||||
Title = title;
|
||||
Artist = artist;
|
||||
Duration = new TimeSpan(0, m, s);
|
||||
Album = album;
|
||||
CountOfComment = countOfComment;
|
||||
Url = $"https://music.163.com/song?id={netEaseId}";
|
||||
}
|
||||
|
||||
public static List<string> Albums =>
|
||||
[
|
||||
"A.S.I.A",
|
||||
"饕餮人间",
|
||||
"七步咙咚呛",
|
||||
"大惊小怪",
|
||||
"The ONE",
|
||||
"以梦为马 (壮志骄阳版)",
|
||||
"emo了",
|
||||
"一眼万年",
|
||||
"冲刺吧",
|
||||
"爱的赏味期限",
|
||||
"COSMIC ANTHEM / 手紙",
|
||||
"世界晚安",
|
||||
"明年也要好好长大",
|
||||
"320万年前",
|
||||
"W.O.R.L.D."
|
||||
];
|
||||
|
||||
public static List<Song> Songs =>
|
||||
[
|
||||
new("好肚有肚(feat.李玲玉)", "熊猫堂ProducePandas", 2, 50, "A.S.I.A", 730, 1487039339),
|
||||
new("荒诞秀", "熊猫堂ProducePandas", 3, 15, "A.S.I.A", 639, 1487037601),
|
||||
new("长大", "熊猫堂ProducePandas", 4, 6, "A.S.I.A", 1114, 1487037690),
|
||||
new("招财猫(feat.纪粹希(G-Tracy))", "熊猫堂ProducePandas", 3, 37, "A.S.I.A", 361, 1487039632),
|
||||
new("千转", "熊猫堂ProducePandas", 4, 0, "A.S.I.A", 1115, 1477312398),
|
||||
new("辣辣辣", "熊猫堂ProducePandas", 3, 24, "A.S.I.A", 1873, 1465043716),
|
||||
new("碎碎念", "熊猫堂ProducePandas", 3, 25, "A.S.I.A", 676, 1474142064),
|
||||
new("盘他", "熊猫堂ProducePandas", 2, 16, "A.S.I.A", 365, 1481652786),
|
||||
new("Na Na Na", "熊猫堂ProducePandas", 3, 26, "A.S.I.A", 312, 1469022662),
|
||||
new("Indigo", "熊猫堂ProducePandas", 3, 15, "A.S.I.A", 137, 1487039517),
|
||||
new("饕餮人间", "熊猫堂ProducePandas", 3, 20, "饕餮人间", 1295, 1499584605),
|
||||
new("七步咙咚呛", "熊猫堂ProducePandas", 3, 10, "七步咙咚呛", 175, 1809095152),
|
||||
new("大惊小怪", "熊猫堂ProducePandas", 3, 32, "大惊小怪", 10420, 1847477425),
|
||||
new("工具人", "熊猫堂ProducePandas", 2, 46, "大惊小怪", 1135, 1847476499),
|
||||
new("以梦为马", "熊猫堂ProducePandas", 4, 19, "大惊小怪", 18361, 1836034373),
|
||||
new("以梦为马(Piano Version)", "熊猫堂ProducePandas", 3, 4, "大惊小怪", 570, 1847477423),
|
||||
new("The ONE", "熊猫堂ProducePandas", 2, 58, "The ONE", 1508, 1864329424),
|
||||
new("The ONE(日文版)", "熊猫堂ProducePandas", 2, 57, "The ONE", 385, 1864329429),
|
||||
new("以梦为马 (壮志骄阳版)", "熊猫堂ProducePandas", 4, 19, "以梦为马 (壮志骄阳版)", 161, 1865138896),
|
||||
new("New Horse", "熊猫堂ProducePandas", 2, 30, "emo了", 643, 1887021307),
|
||||
new("不例外", "熊猫堂ProducePandas", 3, 31, "emo了", 1818, 1887022665),
|
||||
new("满意", "熊猫堂ProducePandas", 4, 32, "emo了", 1081, 1882433472),
|
||||
new("就算与全世界为敌也要跟你在一起", "熊猫堂ProducePandas", 3, 32, "emo了", 2119, 1881759960),
|
||||
new("The ONE", "熊猫堂ProducePandas", 2, 58, "emo了", 67, 1887022648),
|
||||
new("口香糖", "熊猫堂ProducePandas", 3, 10, "emo了", 2181, 1885502254),
|
||||
new("Suuuuuuper Mario", "熊猫堂ProducePandas", 3, 32, "emo了", 1010, 1887021318),
|
||||
new("饕餮人间", "熊猫堂ProducePandas", 3, 22, "emo了", 109, 1887021320),
|
||||
new("以梦为马 (壮志骄阳版)", "熊猫堂ProducePandas", 4, 21, "emo了", 34, 1887022666),
|
||||
new("The ONE(日文版)", "熊猫堂ProducePandas", 2, 57, "emo了", 27, 1887022646),
|
||||
new("满意(DJheap九天版)", "熊猫堂ProducePandas", 4, 31, "emo了", 31, 1901605941),
|
||||
new("一眼万年", "熊猫堂ProducePandas", 3, 54, "一眼万年", 20, 1922599361),
|
||||
new("冲刺", "熊猫堂ProducePandas", 3, 49, "冲刺吧", 1006, 1932878194),
|
||||
new("滴答滴", "熊猫堂ProducePandas", 2, 30, "爱的赏味期限", 86, 1957515790),
|
||||
new("热带季风", "熊猫堂ProducePandas", 2, 45, "爱的赏味期限", 212, 1957514964),
|
||||
new("渣", "熊猫堂ProducePandas", 3, 28, "爱的赏味期限", 22, 1957514965),
|
||||
new("独特", "熊猫堂ProducePandas", 3, 33, "爱的赏味期限", 62, 1957514966),
|
||||
new("雨后", "熊猫堂ProducePandas", 4, 15, "爱的赏味期限", 23, 1957514967),
|
||||
new("然后然后", "熊猫堂ProducePandas", 3, 50, "爱的赏味期限", 108, 1957514968),
|
||||
new("丢", "熊猫堂ProducePandas", 3, 26, "爱的赏味期限", 30, 1957515792),
|
||||
new("热带疾风(FACEVOID桃心连哥 Remix)", "熊猫堂ProducePandas", 3, 23, "爱的赏味期限", 55, 1957515793),
|
||||
new("COSMIC ANTHEM -Japanese Ver.-", "熊猫堂ProducePandas", 3, 11, "COSMIC ANTHEM / 手紙", 0, 1977171493),
|
||||
new("手紙 (「長大-You Raise Me Up-」-Japanese Ver.-)", "熊猫堂ProducePandas", 4, 11, "COSMIC ANTHEM / 手紙", 0,
|
||||
1977171494),
|
||||
new("COSMIC ANTHEM -Chinese Ver.-", "熊猫堂ProducePandas", 3, 31, "COSMIC ANTHEM / 手紙", 0, 1977172202),
|
||||
new("世界晚安", "熊猫堂ProducePandas", 2, 59, "世界晚安", 652, 1985063377),
|
||||
new("世界晚安(泰文版)", "熊猫堂ProducePandas", 2, 59, "世界晚安", 134, 1987842504),
|
||||
new("世界晚安(钢琴版)", "熊猫堂ProducePandas", 3, 2, "世界晚安", 76, 1990475933),
|
||||
new("世界晚安(泰文钢琴版)", "熊猫堂ProducePandas", 3, 2, "世界晚安", 29, 1990475934),
|
||||
new("世界晚安(DJ沈念版)", "熊猫堂ProducePandas", 3, 9, "世界晚安", 34, 2014263184),
|
||||
new("世界晚安(钢琴配乐)", "熊猫堂ProducePandas", 2, 59, "世界晚安", 11, 2014263185),
|
||||
new("明年也要好好长大", "熊猫堂ProducePandas", 3, 12, "明年也要好好长大", 0, 2010515162),
|
||||
new("320万年前(DJ沈念版)", "熊猫堂ProducePandas", 3, 21, "320万年前", 8, 2055888636),
|
||||
new("320万年前", "熊猫堂ProducePandas", 3, 7, "W.O.R.L.D.", 329, 2049770469),
|
||||
new("隐德来希", "熊猫堂ProducePandas", 3, 3, "W.O.R.L.D.", 594, 2061317924),
|
||||
new("孔明", "熊猫堂ProducePandas", 3, 59, "W.O.R.L.D.", 91, 2063175274),
|
||||
new("锦鲤卟噜噜", "熊猫堂ProducePandas", 3, 5, "W.O.R.L.D.", 67, 2059208262),
|
||||
new("指鹿为马", "熊猫堂ProducePandas", 3, 12, "W.O.R.L.D.", 74, 2063175272),
|
||||
new("热带季风Remix", "熊猫堂ProducePandas", 3, 22, "W.O.R.L.D.", 23, 2063173319),
|
||||
new("加州梦境", "熊猫堂ProducePandas", 2, 56, "W.O.R.L.D.", 1662, 2063173324),
|
||||
new("渐近自由", "熊猫堂ProducePandas", 4, 19, "W.O.R.L.D.", 124, 2063173321),
|
||||
new("世界所有的烂漫", "熊猫堂ProducePandas", 3, 30, "W.O.R.L.D.", 335, 2053388775)
|
||||
];
|
||||
}
|
||||
|
||||
public partial class SongViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private string? _title;
|
||||
[ObservableProperty] private string? _artist;
|
||||
[ObservableProperty] private string? _album;
|
||||
[ObservableProperty] private int _countOfComment;
|
||||
[ObservableProperty] private bool? _isSelected;
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Models.TreeDataGrid;
|
||||
using Avalonia.Controls.Selection;
|
||||
using Avalonia.Threading;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public partial class FilesPageViewModel : ObservableObject
|
||||
{
|
||||
public IList<string> Drives { get; }
|
||||
public HierarchicalTreeDataGridSource<FileNodeViewModel> Source { get; }
|
||||
[ObservableProperty] private string _selectedDrive;
|
||||
private string? _selectedPath;
|
||||
[ObservableProperty] private FileNodeViewModel? _root;
|
||||
|
||||
public string? SelectedPath
|
||||
{
|
||||
get => _selectedPath;
|
||||
set => SetSelectedPath(value);
|
||||
}
|
||||
|
||||
partial void OnSelectedDriveChanged(string value)
|
||||
{
|
||||
Root = new FileNodeViewModel(value, true, true);
|
||||
if (Source is not null)
|
||||
{
|
||||
Source.Items = [Root];
|
||||
}
|
||||
}
|
||||
|
||||
public FilesPageViewModel()
|
||||
{
|
||||
Drives = DriveInfo.GetDrives().Select(x => x.Name).ToList();
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
SelectedDrive = @"C:\";
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedDrive = Drives.FirstOrDefault() ?? "/";
|
||||
}
|
||||
|
||||
Source = new HierarchicalTreeDataGridSource<FileNodeViewModel>([])
|
||||
{
|
||||
Columns =
|
||||
{
|
||||
new CheckBoxColumn<FileNodeViewModel>(
|
||||
null,
|
||||
x => x.IsChecked,
|
||||
(o, v) => o.IsChecked = v,
|
||||
options: new CheckBoxColumnOptions<FileNodeViewModel>
|
||||
{
|
||||
CanUserResizeColumn = false,
|
||||
}),
|
||||
new HierarchicalExpanderColumn<FileNodeViewModel>(
|
||||
new TemplateColumn<FileNodeViewModel>(
|
||||
"Name",
|
||||
"FileNameCell",
|
||||
"FileNameEditCell",
|
||||
new GridLength(1, GridUnitType.Star),
|
||||
new TemplateColumnOptions<FileNodeViewModel>
|
||||
{
|
||||
CompareAscending = FileNodeViewModel.SortAscending(vm => vm.Name),
|
||||
CompareDescending = FileNodeViewModel.SortDescending(vm => vm.Name),
|
||||
IsTextSearchEnabled = true,
|
||||
TextSearchValueSelector = vm => vm.Name
|
||||
}),
|
||||
vm => vm.Children,
|
||||
vm => vm.HasChildren,
|
||||
vm => vm.IsExpanded),
|
||||
new TextColumn<FileNodeViewModel, long?>(
|
||||
"Size",
|
||||
vm => vm.Size,
|
||||
options: new TextColumnOptions<FileNodeViewModel>
|
||||
{
|
||||
CompareAscending = FileNodeViewModel.SortAscending(x => x.Size),
|
||||
CompareDescending = FileNodeViewModel.SortDescending(x => x.Size),
|
||||
}),
|
||||
new TextColumn<FileNodeViewModel, DateTimeOffset?>(
|
||||
"Modified",
|
||||
x => x.Modified,
|
||||
options: new TextColumnOptions<FileNodeViewModel>
|
||||
{
|
||||
CompareAscending = FileNodeViewModel.SortAscending(x => x.Modified),
|
||||
CompareDescending = FileNodeViewModel.SortDescending(x => x.Modified),
|
||||
}),
|
||||
}
|
||||
};
|
||||
Source.RowSelection!.SingleSelect = false;
|
||||
Source.RowSelection.SelectionChanged += SelectionChanged;
|
||||
}
|
||||
|
||||
private void SelectionChanged(object? sender, TreeSelectionModelSelectionChangedEventArgs<FileNodeViewModel> e)
|
||||
{
|
||||
var selectedPath = Source.RowSelection?.SelectedItem?.Path;
|
||||
this.SetProperty(ref _selectedPath, selectedPath, nameof(SelectedPath));
|
||||
|
||||
foreach (var i in e.DeselectedItems)
|
||||
Trace.WriteLine($"Deselected '{i?.Path}'");
|
||||
foreach (var i in e.SelectedItems)
|
||||
Trace.WriteLine($"Selected '{i?.Path}'");
|
||||
}
|
||||
private void SetSelectedPath(string? path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
Source.RowSelection!.Clear();
|
||||
return;
|
||||
}
|
||||
|
||||
var components = new Stack<string>();
|
||||
DirectoryInfo? d = null;
|
||||
|
||||
if (File.Exists(path))
|
||||
{
|
||||
var f = new FileInfo(path);
|
||||
components.Push(f.Name);
|
||||
d = f.Directory;
|
||||
}
|
||||
else if (Directory.Exists(path))
|
||||
{
|
||||
d = new DirectoryInfo(path);
|
||||
}
|
||||
|
||||
while (d is not null)
|
||||
{
|
||||
components.Push(d.Name);
|
||||
d = d.Parent;
|
||||
}
|
||||
|
||||
var index = IndexPath.Unselected;
|
||||
|
||||
if (components.Count > 0)
|
||||
{
|
||||
var drive = components.Pop();
|
||||
var driveIndex = Drives.FindIndex(x => string.Equals(x, drive, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (driveIndex >= 0)
|
||||
SelectedDrive = Drives[driveIndex];
|
||||
|
||||
var node = Root;
|
||||
index = new IndexPath(0);
|
||||
|
||||
while (node is not null && components.Count > 0)
|
||||
{
|
||||
node.IsExpanded = true;
|
||||
|
||||
var component = components.Pop();
|
||||
var i = node.Children.FindIndex(x => string.Equals(x.Name, component, StringComparison.OrdinalIgnoreCase));
|
||||
node = i >= 0 ? node.Children[i] : null;
|
||||
index = i >= 0 ? index.Append(i) : default;
|
||||
}
|
||||
}
|
||||
|
||||
Source.Items = [Root!];
|
||||
Source.RowSelection!.SelectedIndex = index;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class FileNodeViewModel : ObservableObject, IEditableObject
|
||||
{
|
||||
[ObservableProperty] private string _path;
|
||||
[ObservableProperty] private string _name;
|
||||
private string? _undoName;
|
||||
[ObservableProperty] private long? _size;
|
||||
[ObservableProperty] private DateTimeOffset? _modified;
|
||||
private FileSystemWatcher? _watcher;
|
||||
private ObservableCollection<FileNodeViewModel>? _children;
|
||||
[ObservableProperty] private bool _hasChildren = true;
|
||||
[ObservableProperty] private bool _isExpanded;
|
||||
|
||||
public FileNodeViewModel(string path, bool isDirectory, bool isRoot = false)
|
||||
{
|
||||
Path = path;
|
||||
Name = isRoot ? path : System.IO.Path.GetFileName(Path);
|
||||
IsExpanded = isRoot;
|
||||
IsDirectory = isDirectory;
|
||||
HasChildren = isDirectory;
|
||||
|
||||
if (!isDirectory)
|
||||
{
|
||||
var info = new FileInfo(path);
|
||||
Size = info.Length;
|
||||
Modified = info.LastWriteTimeUtc;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsChecked { get; set; }
|
||||
public bool IsDirectory { get; }
|
||||
public IReadOnlyList<FileNodeViewModel> Children => _children ??= LoadChildren();
|
||||
|
||||
private ObservableCollection<FileNodeViewModel> LoadChildren()
|
||||
{
|
||||
if (!IsDirectory)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
var options = new EnumerationOptions { IgnoreInaccessible = true };
|
||||
var result = new ObservableCollection<FileNodeViewModel>();
|
||||
|
||||
foreach (var d in Directory.EnumerateDirectories(Path, "*", options))
|
||||
{
|
||||
result.Add(new FileNodeViewModel(d, true));
|
||||
}
|
||||
|
||||
foreach (var f in Directory.EnumerateFiles(Path, "*", options))
|
||||
{
|
||||
result.Add(new FileNodeViewModel(f, false));
|
||||
}
|
||||
|
||||
_watcher = new FileSystemWatcher
|
||||
{
|
||||
Path = Path,
|
||||
NotifyFilter = NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.LastWrite,
|
||||
};
|
||||
|
||||
_watcher.Changed += OnChanged;
|
||||
_watcher.Created += OnCreated;
|
||||
_watcher.Deleted += OnDeleted;
|
||||
_watcher.Renamed += OnRenamed;
|
||||
_watcher.EnableRaisingEvents = true;
|
||||
|
||||
if (result.Count == 0)
|
||||
HasChildren = false;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Comparison<FileNodeViewModel?> SortAscending<T>(Func<FileNodeViewModel, T> selector)
|
||||
{
|
||||
return (x, y) =>
|
||||
{
|
||||
if (x is null && y is null)
|
||||
return 0;
|
||||
else if (x is null)
|
||||
return -1;
|
||||
else if (y is null)
|
||||
return 1;
|
||||
if (x.IsDirectory == y.IsDirectory)
|
||||
return Comparer<T>.Default.Compare(selector(x), selector(y));
|
||||
else if (x.IsDirectory)
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
public static Comparison<FileNodeViewModel?> SortDescending<T>(Func<FileNodeViewModel, T> selector)
|
||||
{
|
||||
return (x, y) =>
|
||||
{
|
||||
if (x is null && y is null)
|
||||
return 0;
|
||||
else if (x is null)
|
||||
return 1;
|
||||
else if (y is null)
|
||||
return -1;
|
||||
if (x.IsDirectory == y.IsDirectory)
|
||||
return Comparer<T>.Default.Compare(selector(y), selector(x));
|
||||
else if (x.IsDirectory)
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
void IEditableObject.BeginEdit() => _undoName = Name;
|
||||
void IEditableObject.CancelEdit() => Name = _undoName ?? string.Empty;
|
||||
void IEditableObject.EndEdit() => _undoName = null;
|
||||
|
||||
private void OnChanged(object sender, FileSystemEventArgs e)
|
||||
{
|
||||
if (e.ChangeType == WatcherChangeTypes.Changed && File.Exists(e.FullPath))
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
foreach (var child in _children!)
|
||||
{
|
||||
if (child.Path == e.FullPath)
|
||||
{
|
||||
if (!child.IsDirectory)
|
||||
{
|
||||
var info = new FileInfo(e.FullPath);
|
||||
child.Size = info.Length;
|
||||
child.Modified = info.LastWriteTimeUtc;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCreated(object sender, FileSystemEventArgs e)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
var node = new FileNodeViewModel(
|
||||
e.FullPath,
|
||||
File.GetAttributes(e.FullPath).HasFlag(FileAttributes.Directory));
|
||||
_children!.Add(node);
|
||||
});
|
||||
}
|
||||
|
||||
private void OnDeleted(object sender, FileSystemEventArgs e)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
for (var i = 0; i < _children!.Count; ++i)
|
||||
{
|
||||
if (_children[i].Path == e.FullPath)
|
||||
{
|
||||
_children.RemoveAt(i);
|
||||
Debug.WriteLine($"Removed {e.FullPath}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void OnRenamed(object sender, RenamedEventArgs e)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
foreach (var child in _children!)
|
||||
{
|
||||
if (child.Path == e.OldFullPath)
|
||||
{
|
||||
child.Path = e.FullPath;
|
||||
child.Name = e.Name ?? string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal static class ListExtensions
|
||||
{
|
||||
public static int FindIndex<T>(this IEnumerable<T> source, Func<T, bool> predicate)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (var item in source)
|
||||
{
|
||||
if (predicate(item))
|
||||
return i;
|
||||
i++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Models.TreeDataGrid;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public class SongsPageViewModel : ObservableObject
|
||||
{
|
||||
public FlatTreeDataGridSource<SongViewModel> Songs { get; }
|
||||
|
||||
public SongsPageViewModel()
|
||||
{
|
||||
var songs = new ObservableCollection<SongViewModel>(Song.Songs.Select(a => new SongViewModel()
|
||||
{
|
||||
Title = a.Title,
|
||||
Artist = a.Artist,
|
||||
Album = a.Album,
|
||||
CountOfComment = a.CountOfComment,
|
||||
IsSelected = false
|
||||
}));
|
||||
|
||||
Songs = new FlatTreeDataGridSource<SongViewModel>(songs)
|
||||
{
|
||||
Columns =
|
||||
{
|
||||
new CheckBoxColumn<SongViewModel>(
|
||||
"IsSelected",
|
||||
a => a.IsSelected,
|
||||
(model, b) => { model.IsSelected = b; },
|
||||
new GridLength(108, GridUnitType.Pixel)),
|
||||
new TextColumn<SongViewModel, string>(
|
||||
"Title",
|
||||
a => a.Title,
|
||||
(o, a) => o.Title = a,
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TextColumn<SongViewModel, string>("Artist",
|
||||
a => a.Artist,
|
||||
(o, a) => o.Artist = a,
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TemplateColumn<SongViewModel>("Album",
|
||||
"AlbumCell",
|
||||
"AlbumEditCell",
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TemplateColumn<SongViewModel>(
|
||||
"Comments",
|
||||
"CommentsCell",
|
||||
"CommentsEditCell",
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public class TreeDataGridDemoViewModel : ObservableObject
|
||||
{
|
||||
public SongsPageViewModel SongsContext { get; } = new();
|
||||
public FilesPageViewModel FilesContext { get; } = new();
|
||||
}
|
||||
151
demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs
Normal file
151
demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs
Normal file
@@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Collections;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Semi.Avalonia.Tokens;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public partial class VariablesDemoViewModel : ObservableObject
|
||||
{
|
||||
public DataGridCollectionView GridData { get; set; }
|
||||
[ObservableProperty] private string _searchText = string.Empty;
|
||||
|
||||
public VariablesDemoViewModel()
|
||||
{
|
||||
IResourceDictionary dictionary = new Variables();
|
||||
foreach (var token in Tokens)
|
||||
{
|
||||
if (token.ResourceKey is not null && dictionary.TryGetValue(token.ResourceKey, out var value))
|
||||
{
|
||||
token.Type = value?.GetType();
|
||||
token.Value = GetValueString(value);
|
||||
}
|
||||
}
|
||||
|
||||
GridData = new DataGridCollectionView(Tokens);
|
||||
GridData.GroupDescriptions.Add(new DataGridPathGroupDescription(nameof(VariableItem.Category)));
|
||||
}
|
||||
|
||||
private static string? GetValueString(object? value)
|
||||
{
|
||||
if (value is null) return string.Empty;
|
||||
|
||||
return value switch
|
||||
{
|
||||
double d => d.ToString(CultureInfo.InvariantCulture),
|
||||
CornerRadius c => c.IsUniform ? $"{c.TopLeft}" : c.ToString(),
|
||||
Thickness t => t.IsUniform ? $"{t.Left}" : t.ToString(),
|
||||
FontWeight fontWeight => Convert.ToInt32(fontWeight).ToString(),
|
||||
FontFamily fontFamily => fontFamily.FamilyNames.ToString(),
|
||||
_ => value.ToString()
|
||||
};
|
||||
}
|
||||
|
||||
partial void OnSearchTextChanged(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
GridData.Filter = _ => true;
|
||||
GridData.Refresh();
|
||||
return;
|
||||
}
|
||||
|
||||
var search = value.Trim();
|
||||
GridData.Filter = item =>
|
||||
{
|
||||
if (item is not VariableItem variableItem) return false;
|
||||
return (variableItem.Category?.Contains(search, StringComparison.InvariantCultureIgnoreCase) ?? false) ||
|
||||
(variableItem.ResourceKey?.Contains(search, StringComparison.InvariantCultureIgnoreCase) ?? false) ||
|
||||
(variableItem.Value?.Contains(search, StringComparison.InvariantCultureIgnoreCase) ?? false) ||
|
||||
(variableItem.Type?.Name.Contains(search, StringComparison.InvariantCultureIgnoreCase) ?? false) ||
|
||||
(variableItem.Description?.Contains(search, StringComparison.InvariantCultureIgnoreCase) ?? false);
|
||||
};
|
||||
GridData.Refresh();
|
||||
}
|
||||
|
||||
private static List<VariableItem> Tokens { get; set; } =
|
||||
[
|
||||
new("Height", "SemiHeightControlSmall"),
|
||||
new("Height", "SemiHeightControlDefault"),
|
||||
new("Height", "SemiHeightControlLarge"),
|
||||
new("Icon Size", "SemiWidthIconExtraSmall"),
|
||||
new("Icon Size", "SemiWidthIconSmall"),
|
||||
new("Icon Size", "SemiWidthIconMedium"),
|
||||
new("Icon Size", "SemiWidthIconLarge"),
|
||||
new("Icon Size", "SemiWidthIconExtraLarge"),
|
||||
new("Border CornerRadius Spacing", "SemiBorderRadiusSpacingExtraSmall"),
|
||||
new("Border CornerRadius Spacing", "SemiBorderRadiusSpacingSmall"),
|
||||
new("Border CornerRadius Spacing", "SemiBorderRadiusSpacingMedium"),
|
||||
new("Border CornerRadius Spacing", "SemiBorderRadiusSpacingLarge"),
|
||||
new("Border CornerRadius Spacing", "SemiBorderRadiusSpacingFull"),
|
||||
new("Border CornerRadius", "SemiBorderRadiusExtraSmall"),
|
||||
new("Border CornerRadius", "SemiBorderRadiusSmall"),
|
||||
new("Border CornerRadius", "SemiBorderRadiusMedium"),
|
||||
new("Border CornerRadius", "SemiBorderRadiusLarge"),
|
||||
new("Border CornerRadius", "SemiBorderRadiusFull"),
|
||||
new("Border Spacing", "SemiBorderSpacing"),
|
||||
new("Border Spacing", "SemiBorderSpacingControl"),
|
||||
new("Border Spacing", "SemiBorderSpacingControlFocus"),
|
||||
new("Border Thickness", "SemiBorderThickness"),
|
||||
new("Border Thickness", "SemiBorderThicknessControl"),
|
||||
new("Border Thickness", "SemiBorderThicknessControlFocus"),
|
||||
new("Spacing", "SemiSpacingNone"),
|
||||
new("Spacing", "SemiSpacingSuperTight"),
|
||||
new("Spacing", "SemiSpacingExtraTight"),
|
||||
new("Spacing", "SemiSpacingTight"),
|
||||
new("Spacing", "SemiSpacingBaseTight"),
|
||||
new("Spacing", "SemiSpacingBase"),
|
||||
new("Spacing", "SemiSpacingBaseLoose"),
|
||||
new("Spacing", "SemiSpacingLoose"),
|
||||
new("Spacing", "SemiSpacingExtraLoose"),
|
||||
new("Spacing", "SemiSpacingSuperLoose"),
|
||||
new("Thickness", "SemiThicknessNone"),
|
||||
new("Thickness", "SemiThicknessSuperTight"),
|
||||
new("Thickness", "SemiThicknessExtraTight"),
|
||||
new("Thickness", "SemiThicknessTight"),
|
||||
new("Thickness", "SemiThicknessBaseTight"),
|
||||
new("Thickness", "SemiThicknessBase"),
|
||||
new("Thickness", "SemiThicknessBaseLoose"),
|
||||
new("Thickness", "SemiThicknessLoose"),
|
||||
new("Thickness", "SemiThicknessExtraLoose"),
|
||||
new("Thickness", "SemiThicknessSuperLoose"),
|
||||
new("FontSize", "SemiFontSizeSmall"),
|
||||
new("FontSize", "SemiFontSizeRegular"),
|
||||
new("FontSize", "SemiFontSizeHeader6"),
|
||||
new("FontSize", "SemiFontSizeHeader5"),
|
||||
new("FontSize", "SemiFontSizeHeader4"),
|
||||
new("FontSize", "SemiFontSizeHeader3"),
|
||||
new("FontSize", "SemiFontSizeHeader2"),
|
||||
new("FontSize", "SemiFontSizeHeader1"),
|
||||
new("FontWeight", "SemiFontWeightLight"),
|
||||
new("FontWeight", "SemiFontWeightRegular"),
|
||||
new("FontWeight", "SemiFontWeightBold"),
|
||||
new("FontFamily", "SemiFontFamilyRegular"),
|
||||
];
|
||||
}
|
||||
|
||||
public class VariableItem()
|
||||
{
|
||||
public string? Category { get; set; }
|
||||
public string? ResourceKey { get; set; }
|
||||
public Type? Type { get; set; }
|
||||
public string? Value { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public VariableItem(string category, string resourceKey, string description = "") : this()
|
||||
{
|
||||
Category = category;
|
||||
ResourceKey = resourceKey;
|
||||
Description = description;
|
||||
}
|
||||
|
||||
public string CopyText =>
|
||||
$"""
|
||||
<StaticResource x:Key="" ResourceKey="{ResourceKey}" />
|
||||
""";
|
||||
}
|
||||
@@ -116,15 +116,15 @@
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Resource Browser" />
|
||||
<!-- <TabItem Header="Palette"> -->
|
||||
<!-- <pages:PaletteDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="HighContrastTheme"> -->
|
||||
<!-- <pages:HighContrastDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="Variables"> -->
|
||||
<!-- <pages:VariablesDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<TabItem Header="Palette">
|
||||
<pages:PaletteDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="HighContrastTheme">
|
||||
<pages:HighContrastDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Variables">
|
||||
<pages:VariablesDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Icon">
|
||||
<pages:IconDemo />
|
||||
</TabItem>
|
||||
@@ -134,12 +134,12 @@
|
||||
<TabItem Header="ColorPicker">
|
||||
<pages:ColorPickerDemo />
|
||||
</TabItem>
|
||||
<!-- <TabItem Header="DataGrid"> -->
|
||||
<!-- <pages:DataGridDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="TreeDataGrid"> -->
|
||||
<!-- <pages:TreeDataGridDemo /> -->
|
||||
<!-- </TabItem> -->
|
||||
<TabItem Header="DataGrid">
|
||||
<pages:DataGridDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="TreeDataGrid">
|
||||
<pages:TreeDataGridDemo />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Basic" />
|
||||
@@ -269,9 +269,6 @@
|
||||
<TabItem
|
||||
Theme="{DynamicResource CategoryTabItem}"
|
||||
Header="Other" />
|
||||
<TabItem Header="CommandBar">
|
||||
<pages:CommandBarDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="GridSplitter">
|
||||
<pages:GridSplitterDemo />
|
||||
</TabItem>
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:views="clr-namespace:Semi.Avalonia.Demo.Views"
|
||||
Title="Semi Avalonia Demo"
|
||||
Title="Semi.Avalonia.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaTitleBarHeightHint="40"
|
||||
Icon="/Assets/irihi.ico"
|
||||
mc:Ignorable="d">
|
||||
<views:MainView Margin="{Binding $parent[Window].WindowDecorationMargin}" />
|
||||
<views:MainView />
|
||||
</Window>
|
||||
@@ -16,7 +16,6 @@
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageIcon>irihi.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
|
||||
<AvaloniaVersion>11.3.7</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.7</DataGridVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@@ -9,6 +9,5 @@
|
||||
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.1.1"/>
|
||||
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.4.0-preview1"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,8 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
|
||||
<converters:ToBrushConverter x:Key="ToBrushConverter" />
|
||||
|
||||
<ControlTheme x:Key="{x:Type ColorPicker}" TargetType="ColorPicker">
|
||||
@@ -16,11 +16,11 @@
|
||||
<Border
|
||||
Margin="1,1,0,1"
|
||||
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Left}}" />
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
<Border
|
||||
Margin="1,1,0,1"
|
||||
Background="{TemplateBinding HsvColor, Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Left}}" />
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
</Panel>
|
||||
</Template>
|
||||
</Setter>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:pc="using:Avalonia.Controls.Primitives.Converters">
|
||||
<pc:AccentColorConverter x:Key="AccentColorConverter" />
|
||||
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
|
||||
<converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight" />
|
||||
|
||||
<ControlTheme x:Key="{x:Type ColorPreviewer}" TargetType="ColorPreviewer">
|
||||
<Setter Property="Height" Value="{DynamicResource ColorPreviewerHeight}" />
|
||||
@@ -32,7 +34,7 @@
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='-2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={iri:CornerRadiusMixerConverter Left}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource LeftCornerRadiusFilterConverter}}"
|
||||
Tag="-2" />
|
||||
<Border
|
||||
Name="PART_AccentDecrement1Border"
|
||||
@@ -68,7 +70,7 @@
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={iri:CornerRadiusMixerConverter Right}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource RightCornerRadiusFilterConverter}}"
|
||||
Tag="2" />
|
||||
</Grid>
|
||||
<!-- Preview color: Must be last for drop shadow Z-index -->
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.0-preview1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.0-preview1</PackageReleaseNotes>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Version>11.3.7.3</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.3.7.3</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
|
||||
<PackageReference Include="Irihi.Avalonia.Shared"/>
|
||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Utilities;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
|
||||
namespace Semi.Avalonia.ColorPicker;
|
||||
|
||||
@@ -221,8 +220,8 @@ public class SemiColorDarkPalette: IColorPalette
|
||||
public Color GetColor(int colorIndex, int shadeIndex)
|
||||
{
|
||||
return Colors[
|
||||
MathHelpers.SafeClamp(colorIndex, 0, ColorCount - 1),
|
||||
MathHelpers.SafeClamp(shadeIndex, 0, ShadeCount - 1)
|
||||
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
|
||||
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Utilities;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
|
||||
namespace Semi.Avalonia.ColorPicker;
|
||||
|
||||
@@ -221,8 +220,8 @@ public class SemiColorLightPalette: IColorPalette
|
||||
public Color GetColor(int colorIndex, int shadeIndex)
|
||||
{
|
||||
return Colors[
|
||||
MathHelpers.SafeClamp(colorIndex, 0, ColorCount - 1),
|
||||
MathHelpers.SafeClamp(shadeIndex, 0, ShadeCount - 1)
|
||||
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
|
||||
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
x:Class="Semi.Avalonia.SemiPopupAnimations"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
|
||||
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={semi:PlacementToRenderTransformOriginConverter}}" />
|
||||
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Popup[IsOpen=True] LayoutTransformControl#PART_LayoutTransform">
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<TextBox Text="Hello" />
|
||||
<AutoCompleteBox Width="100" PlaceholderText="Hello" />
|
||||
<AutoCompleteBox Width="100" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
|
||||
<Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
||||
<Setter Property="Template">
|
||||
@@ -26,8 +24,7 @@
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}" />
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
@@ -58,13 +55,45 @@
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^.Bordered">
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="iri:ClassHelper.Classes" Value="Bordered" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ListBox#PART_SelectingItemsControl">
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="False" />
|
||||
</Style>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AutoCompleteBox">
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="0"
|
||||
Classes="Bordered"
|
||||
ClearSelectionOnLostFocus="{TemplateBinding ClearSelectionOnLostFocus}"
|
||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
InheritsTransform="True"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementTarget="{TemplateBinding}">
|
||||
<Border
|
||||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Margin="{DynamicResource AutoCompleteBoxPopupMargin}"
|
||||
Padding="{DynamicResource AutoCompleteBoxPopupPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource AutoCompleteBoxPopupBackground}"
|
||||
BorderBrush="{DynamicResource AutoCompleteBoxPopupBorderBrush}"
|
||||
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
|
||||
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
|
||||
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
|
||||
<ListBox
|
||||
Name="PART_SelectingItemsControl"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsScrollChainingEnabled="False" />
|
||||
</Border>
|
||||
</Popup>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||
@@ -53,9 +52,8 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
UseFloatingPlaceholder="{TemplateBinding UseFloatingPlaceholder}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}">
|
||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||
Watermark="{TemplateBinding Watermark}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
|
||||
112
src/Semi.Avalonia/Controls/CaptionButtons.axaml
Normal file
112
src/Semi.Avalonia/Controls/CaptionButtons.axaml
Normal file
@@ -0,0 +1,112 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<CaptionButtons />
|
||||
</Design.PreviewWith>
|
||||
|
||||
<ControlTheme x:Key="CaptionButton" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="CornerRadius" Value="{StaticResource CaptionButtonCornerRadius}" />
|
||||
<Setter Property="Padding" Value="{StaticResource CaptionButtonPadding}" />
|
||||
<Setter Property="Width" Value="{StaticResource CaptionButtonWidth}" />
|
||||
<Setter Property="Height" Value="{StaticResource CaptionButtonHeight}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CaptionButtons}" TargetType="CaptionButtons">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CaptionButtons">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Name="PART_FullScreenButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_FullScreenButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowExpandGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_MinimizeButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Minimize"
|
||||
Win32Properties.NonClientHitTestResult="MinButton">
|
||||
<PathIcon
|
||||
Name="PART_MinimizeButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowMinimizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_RestoreButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Maximize"
|
||||
Win32Properties.NonClientHitTestResult="MaxButton">
|
||||
<PathIcon
|
||||
Name="PART_RestoreButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowMaximizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_CloseButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Close"
|
||||
Win32Properties.NonClientHitTestResult="Close">
|
||||
<PathIcon
|
||||
Name="PART_CloseButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowCloseIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ Button#PART_CloseButton:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_CloseButton:pressed">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:maximized /template/ PathIcon#PART_RestoreButtonIcon">
|
||||
<Setter Property="Data" Value="{StaticResource WindowRestoreGlyph}" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ PathIcon#PART_FullScreenButtonIcon">
|
||||
<Setter Property="Data" Value="{StaticResource WindowCollapseGlyph}" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ Button#PART_MinimizeButton">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
xmlns:converter="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Spacing="20" Width="800" Height="800">
|
||||
<StackPanel.Styles>
|
||||
@@ -197,8 +197,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
|
||||
ItemsSource="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemToObjectConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
ItemsSource="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemToObjectConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
SelectedIndex="{TemplateBinding SelectedIndex, Mode=TwoWay}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -213,7 +213,7 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Previous}" />
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
@@ -222,7 +222,7 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Next}"
|
||||
RenderTransform="rotate(180deg)" />
|
||||
</Grid>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{TemplateBinding Text, Mode=TwoWay}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}"
|
||||
Watermark="{TemplateBinding PlaceholderText}"
|
||||
IsVisible="{TemplateBinding IsEditable}" />
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,406 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="16" Width="600" Background="{DynamicResource SemiColorBackground0}">
|
||||
<StackPanel Spacing="16">
|
||||
<CommandBar>
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarButton Label="Copy" IsEnabled="False" Icon="{DynamicResource SemiIconCopy}" />
|
||||
</CommandBar>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<!-- AppBarButton -->
|
||||
<ControlTheme x:Key="{x:Type AppBarButton}" TargetType="AppBarButton">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonForeground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonPadding}" />
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonMinHeight}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource AppBarButtonCornerRadius}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AppBarButton">
|
||||
<Border
|
||||
Name="PART_Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<StackPanel
|
||||
Name="PART_LayoutRoot"
|
||||
Spacing="4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<ContentPresenter
|
||||
Name="PART_IconPresenter"
|
||||
Content="{TemplateBinding Icon}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Width="{DynamicResource AppBarButtonIconSize}"
|
||||
Height="{DynamicResource AppBarButtonIconSize}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<ContentPresenter.DataTemplates>
|
||||
<DataTemplate DataType="Geometry">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ContentPresenter.DataTemplates>
|
||||
</ContentPresenter>
|
||||
<TextBlock
|
||||
Name="PART_Label"
|
||||
Text="{TemplateBinding Label}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{DynamicResource AppBarButtonLabelFontSize}"
|
||||
HorizontalAlignment="Center"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Pointer over -->
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Pressed -->
|
||||
<Style Selector="^:pressed /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Disabled -->
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:disabled /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
<!-- IsCompact: hide label, use compact width -->
|
||||
<Style Selector="^[IsCompact=True]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[IsCompact=True] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
|
||||
<!-- LabelPosition=Collapsed: hide label, use compact width -->
|
||||
<Style Selector="^[LabelPosition=Collapsed]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Collapsed] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
|
||||
<!-- LabelPosition=Right: horizontal layout, auto-width -->
|
||||
<Style Selector="^[LabelPosition=Right]">
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!-- IsInOverflow: full-width horizontal layout for use inside overflow popup -->
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonOverflowPadding}" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- AppBarToggleButton -->
|
||||
<ControlTheme x:Key="{x:Type AppBarToggleButton}" TargetType="AppBarToggleButton">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonForeground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonPadding}" />
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonMinHeight}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource AppBarButtonCornerRadius}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AppBarToggleButton">
|
||||
<Border
|
||||
Name="PART_Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<StackPanel
|
||||
Name="PART_LayoutRoot"
|
||||
Spacing="4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<ContentPresenter
|
||||
Name="PART_IconPresenter"
|
||||
Content="{TemplateBinding Icon}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Width="{DynamicResource AppBarButtonIconSize}"
|
||||
Height="{DynamicResource AppBarButtonIconSize}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<ContentPresenter.DataTemplates>
|
||||
<DataTemplate DataType="Geometry">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ContentPresenter.DataTemplates>
|
||||
</ContentPresenter>
|
||||
<TextBlock
|
||||
Name="PART_Label"
|
||||
Text="{TemplateBinding Label}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{DynamicResource AppBarButtonLabelFontSize}"
|
||||
HorizontalAlignment="Center"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Pointer over -->
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Pressed -->
|
||||
<Style Selector="^:pressed /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Checked -->
|
||||
<Style Selector="^:checked /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarToggleButtonCheckedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:checked /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:checked /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckedForeground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Checked + Pointer over -->
|
||||
<Style Selector="^:checked:pointerover /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarToggleButtonCheckedPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Disabled -->
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:disabled /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
<!-- IsCompact: hide label, use compact width -->
|
||||
<Style Selector="^[IsCompact=True]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[IsCompact=True] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
|
||||
<!-- LabelPosition=Collapsed: hide label, use compact width -->
|
||||
<Style Selector="^[LabelPosition=Collapsed]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Collapsed] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
|
||||
<!-- LabelPosition=Right: horizontal layout, auto-width -->
|
||||
<Style Selector="^[LabelPosition=Right]">
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^[LabelPosition=Right] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!-- IsInOverflow: full-width horizontal layout -->
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonOverflowPadding}" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^[IsInOverflow=True] /template/ TextBlock#PART_Label">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- AppBarSeparator -->
|
||||
<ControlTheme x:Key="{x:Type AppBarSeparator}" TargetType="AppBarSeparator">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarSeparatorBackground}" />
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarSeparatorWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarSeparatorMinHeight}" />
|
||||
<Setter Property="Margin" Value="{DynamicResource AppBarSeparatorMargin}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AppBarSeparator">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
Width="{TemplateBinding Width}"
|
||||
MinHeight="{TemplateBinding MinHeight}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- IsInOverflow: horizontal line separator -->
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="Height" Value="{DynamicResource AppBarSeparatorOverflowHeight}" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="Margin" Value="{DynamicResource AppBarSeparatorOverflowMargin}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- CommandBar -->
|
||||
<ControlTheme x:Key="{x:Type CommandBar}" TargetType="CommandBar">
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CommandBarBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CommandBarBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CommandBarCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CommandBarMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CommandBarPadding}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CommandBar">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Panel>
|
||||
<DockPanel>
|
||||
<!-- Overflow button (docked right) -->
|
||||
<Button
|
||||
Name="PART_OverflowButton"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource AppBarOverflowButton}"
|
||||
IsVisible="{TemplateBinding IsOverflowButtonVisible}"
|
||||
VerticalAlignment="Stretch">
|
||||
<PathIcon
|
||||
Width="{DynamicResource AppBarButtonIconSize}"
|
||||
Height="{DynamicResource AppBarButtonIconSize}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Data="{DynamicResource CommandBarOverflowButtonGlyph}" />
|
||||
</Button>
|
||||
|
||||
<!-- Custom content (docked left) -->
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
DockPanel.Dock="Left"
|
||||
Content="{TemplateBinding Content}"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
<!-- Primary commands (fills remaining space, right-aligned) -->
|
||||
<ItemsControl
|
||||
Name="PART_PrimaryCommands"
|
||||
ItemsSource="{Binding VisiblePrimaryCommands, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
ClipToBounds="True">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" Spacing="2" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</DockPanel>
|
||||
|
||||
<!-- Overflow popup -->
|
||||
<Popup
|
||||
Name="PART_OverflowPopup"
|
||||
IsOpen="{TemplateBinding IsOpen, Mode=TwoWay}"
|
||||
PlacementTarget="{Binding #PART_OverflowButton}"
|
||||
Placement="Bottom"
|
||||
IsLightDismissEnabled="True"
|
||||
WindowManagerAddShadowHint="False">
|
||||
<Border
|
||||
Background="{DynamicResource CommandBarOverflowBackground}"
|
||||
BorderBrush="{DynamicResource CommandBarOverflowBorderBrush}"
|
||||
BorderThickness="{DynamicResource CommandBarBorderThickness}"
|
||||
BoxShadow="{DynamicResource CommandBarOverflowBoxShadow}"
|
||||
CornerRadius="{DynamicResource CommandBarOverflowCornerRadius}"
|
||||
Padding="{DynamicResource CommandBarOverflowPadding}"
|
||||
MinWidth="{DynamicResource CommandBarOverflowMinWidth}">
|
||||
<ItemsControl
|
||||
ItemsSource="{Binding OverflowItems, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="2" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Panel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- Overflow button inner theme (borderless, transparent) -->
|
||||
<ControlTheme x:Key="AppBarOverflowButton" TargetType="Button"
|
||||
BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonPadding}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource AppBarButtonCornerRadius}" />
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,5 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="{x:Type GroupBox}" ResourceKey="GroupBox"/>
|
||||
</ResourceDictionary>
|
||||
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared">
|
||||
xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Spacing="20">
|
||||
<HeaderedContentControl
|
||||
@@ -23,6 +23,7 @@
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<converters:MarginMultiplierConverter x:Key="SeparatorBorderMultiplier" Top="True" Indent="1" />
|
||||
|
||||
<ControlTheme x:Key="{x:Type HeaderedContentControl}" TargetType="HeaderedContentControl">
|
||||
<Setter Property="Padding" Value="3" />
|
||||
@@ -96,7 +97,7 @@
|
||||
Name="SeparatorBorder"
|
||||
Grid.Row="1"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness, Converter={iri:ThicknessMixerConverter Top}}">
|
||||
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SeparatorBorderMultiplier}}">
|
||||
<Border.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<TemplateBinding Property="Header" Converter="{x:Static ObjectConverters.IsNotNull}" />
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared"
|
||||
xmlns:dialogs="using:Avalonia.Dialogs"
|
||||
xmlns:internal="using:Avalonia.Dialogs.Internal"
|
||||
xmlns:converters="using:Semi.Avalonia.Converters"
|
||||
xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
|
||||
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs"
|
||||
xmlns:cvt="using:Avalonia.Controls.Converters">
|
||||
<Design.PreviewWith>
|
||||
<Border
|
||||
@@ -14,11 +14,11 @@
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<iri:ResourceConverter x:Key="Icons">
|
||||
<converters:KeyToPathConverter x:Key="Icons">
|
||||
<StreamGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</StreamGeometry>
|
||||
</iri:ResourceConverter>
|
||||
</converters:KeyToPathConverter>
|
||||
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser">
|
||||
@@ -77,7 +77,7 @@
|
||||
<TextBox
|
||||
IsVisible="{Binding !SelectingFolder}"
|
||||
Text="{Binding FileName}"
|
||||
PlaceholderText="{DynamicResource STRING_CHOOSER_FILE_NAME}" />
|
||||
Watermark="{DynamicResource STRING_CHOOSER_FILE_NAME}" />
|
||||
</DockPanel>
|
||||
<CheckBox
|
||||
VerticalAlignment="Center"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="NumericUpDown">
|
||||
<DataValidationErrors>
|
||||
@@ -39,8 +38,7 @@
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}" />
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
</ButtonSpinner>
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:semiConverters="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<ProgressBar
|
||||
@@ -338,6 +338,8 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<semiConverters:PositionToAngleConverter x:Key="AngleConverter" />
|
||||
|
||||
<ControlTheme x:Key="ProgressRing" TargetType="ProgressBar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarIndicatorBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ProgressBarBackground}" />
|
||||
@@ -363,7 +365,8 @@
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,Converter={semi:PositionToAngleConverter}}" />
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<Arc
|
||||
Name="IndeterminateIndicator"
|
||||
Opacity="0"
|
||||
@@ -373,7 +376,8 @@
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,Converter={semi:PositionToAngleConverter}}" />
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<TextBlock
|
||||
Name="PART_ProgressText"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -439,4 +443,4 @@
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel>
|
||||
<ScrollBar Width="200" Orientation="Horizontal" />
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Width="500" Height="500" Margin="20" Spacing="8">
|
||||
<SplitButton
|
||||
Theme="{DynamicResource OutlineSplitButton}"
|
||||
Classes="Danger"
|
||||
CornerRadius="12"
|
||||
Theme="{DynamicResource SolidSplitButton}"
|
||||
Content="Hello" />
|
||||
<ToggleSplitButton
|
||||
IsChecked="True"
|
||||
@@ -76,40 +73,47 @@
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitButton">
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="{DynamicResource SplitButtonSeparatorWidth}">
|
||||
<Button
|
||||
Name="PART_PrimaryButton"
|
||||
Grid.Column="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Left}}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}" />
|
||||
<Button
|
||||
Name="PART_SecondaryButton"
|
||||
Grid.Column="1"
|
||||
Padding="0"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Right}}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</Grid>
|
||||
<Border
|
||||
BackgroundSizing="OuterBorderEdge"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel>
|
||||
<Button
|
||||
Name="PART_SecondaryButton"
|
||||
Padding="4,0"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
Name="SeparatorBorder"
|
||||
Width="{DynamicResource SplitButtonSeparatorWidth}"
|
||||
VerticalAlignment="Stretch"
|
||||
DockPanel.Dock="Right"
|
||||
Fill="Transparent"
|
||||
StrokeThickness="0" />
|
||||
<Button
|
||||
Name="PART_PrimaryButton"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="0"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView">
|
||||
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
||||
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
@@ -60,6 +59,7 @@
|
||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
<ScrollViewer
|
||||
Name="PART_ScrollViewer"
|
||||
Grid.Column="1"
|
||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
@@ -70,8 +70,8 @@
|
||||
Name="PART_Watermark"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||
Text="{TemplateBinding PlaceholderText}"
|
||||
Opacity="0.5"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}">
|
||||
<TextBlock.IsVisible>
|
||||
@@ -258,7 +258,6 @@
|
||||
|
||||
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
@@ -294,6 +293,7 @@
|
||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
<ScrollViewer
|
||||
Name="PART_ScrollViewer"
|
||||
Grid.Column="1"
|
||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
@@ -305,8 +305,7 @@
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Opacity="0.5"
|
||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||
Text="{TemplateBinding PlaceholderText}"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}">
|
||||
<TextBlock.IsVisible>
|
||||
@@ -493,7 +492,6 @@
|
||||
|
||||
<ControlTheme x:Key="LooklessTextBox" TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
@@ -516,6 +514,7 @@
|
||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
<ScrollViewer
|
||||
Name="PART_ScrollViewer"
|
||||
Grid.Column="1"
|
||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
@@ -527,8 +526,7 @@
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Opacity="0.5"
|
||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||
Text="{TemplateBinding PlaceholderText}"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}">
|
||||
<TextBlock.IsVisible>
|
||||
|
||||
53
src/Semi.Avalonia/Controls/TitleBar.axaml
Normal file
53
src/Semi.Avalonia/Controls/TitleBar.axaml
Normal file
@@ -0,0 +1,53 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type TitleBar}" TargetType="TitleBar">
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="Stretch">
|
||||
<Panel
|
||||
Name="PART_MouseTracker"
|
||||
Height="1"
|
||||
VerticalAlignment="Top" />
|
||||
<Panel Name="PART_Container">
|
||||
<Border
|
||||
Name="PART_Background"
|
||||
Background="{TemplateBinding Background}"
|
||||
IsHitTestVisible="False"
|
||||
Win32Properties.NonClientHitTestResult="Caption" />
|
||||
<CaptionButtons
|
||||
Name="PART_CaptionButtons"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Win32Properties.NonClientHitTestResult="Client" />
|
||||
</Panel>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Border#PART_Background">
|
||||
<Setter Property="IsHitTestVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_MouseTracker">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_Container">
|
||||
<Setter Property="RenderTransform" Value="translateY(-50px)" />
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen:pointerover /template/ Panel#PART_Container">
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
||||
|
||||
<Design.PreviewWith>
|
||||
<StackPanel
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
|
||||
<Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
|
||||
<VisualLayerManager>
|
||||
<VisualLayerManager.ChromeOverlayLayer>
|
||||
<TitleBar />
|
||||
</VisualLayerManager.ChromeOverlayLayer>
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ControlTheme x:Key="CaptionButton" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="CornerRadius" Value="{StaticResource CaptionButtonCornerRadius}" />
|
||||
<Setter Property="Padding" Value="{StaticResource CaptionButtonPadding}" />
|
||||
<Setter Property="Width" Value="{StaticResource CaptionButtonWidth}" />
|
||||
<Setter Property="Height" Value="{StaticResource CaptionButtonHeight}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type WindowDrawnDecorations}" TargetType="WindowDrawnDecorations">
|
||||
<Setter Property="DefaultTitleBarHeight" Value="32" />
|
||||
<Setter Property="DefaultFrameThickness" Value="1" />
|
||||
<Setter Property="DefaultShadowThickness" Value="16" />
|
||||
<Setter Property="Template">
|
||||
<WindowDrawnDecorationsTemplate>
|
||||
<WindowDrawnDecorationsContent>
|
||||
<WindowDrawnDecorationsContent.Underlay>
|
||||
<!-- Full-size: covers shadow area + frame + behind client area -->
|
||||
<Panel>
|
||||
<Border
|
||||
x:Name="PART_WindowBorder"
|
||||
Margin="{TemplateBinding ShadowThickness}"
|
||||
Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="{DynamicResource WindowBorderBrush}"
|
||||
BorderThickness="1"
|
||||
BoxShadow="0 8 32 0 #40000000" />
|
||||
<!-- Titlebar: background, title text, and drag area live in underlay -->
|
||||
<Panel x:Name="PART_TitleBar" VerticalAlignment="Top"
|
||||
Height="{TemplateBinding TitleBarHeight}"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
IsVisible="{TemplateBinding HasTitleBar}"
|
||||
WindowDecorationProperties.ElementRole="TitleBar" />
|
||||
</Panel>
|
||||
</WindowDrawnDecorationsContent.Underlay>
|
||||
|
||||
<WindowDrawnDecorationsContent.Overlay>
|
||||
<!-- Positioned over the titlebar area -->
|
||||
<Panel x:Name="PART_OverlayWrapper">
|
||||
<!-- Title text lives in overlay so it renders above client content -->
|
||||
<Panel
|
||||
x:Name="PART_TitleTextPanel"
|
||||
Height="{TemplateBinding TitleBarHeight}"
|
||||
VerticalAlignment="Top"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding HasTitleBar}">
|
||||
<TextBlock
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{TemplateBinding Title}" />
|
||||
</Panel>
|
||||
<StackPanel
|
||||
x:Name="PART_OverlayPanel"
|
||||
Height="{TemplateBinding TitleBarHeight}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{TemplateBinding HasTitleBar}"
|
||||
Orientation="Horizontal"
|
||||
Spacing="2"
|
||||
TextElement.FontSize="10">
|
||||
<Button
|
||||
Name="PART_FullScreenButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
WindowDecorationProperties.ElementRole="FullScreenButton">
|
||||
<PathIcon
|
||||
Name="PART_FullScreenButtonIcon"
|
||||
Data="{StaticResource WindowExpandGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}"
|
||||
Theme="{StaticResource InnerPathIcon}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_MinimizeButton"
|
||||
AutomationProperties.Name="Minimize"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
WindowDecorationProperties.ElementRole="MinimizeButton">
|
||||
<PathIcon
|
||||
Name="PART_MinimizeButtonIcon"
|
||||
Data="{StaticResource WindowMinimizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}"
|
||||
Theme="{StaticResource InnerPathIcon}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_MaximizeButton"
|
||||
AutomationProperties.Name="Maximize"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
WindowDecorationProperties.ElementRole="MaximizeButton">
|
||||
<PathIcon
|
||||
Name="PART_MaximizeButtonIcon"
|
||||
Data="{StaticResource WindowMaximizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}"
|
||||
Theme="{StaticResource InnerPathIcon}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_CloseButton"
|
||||
AutomationProperties.Name="Close"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
WindowDecorationProperties.ElementRole="CloseButton">
|
||||
<PathIcon
|
||||
Name="PART_CloseButtonIcon"
|
||||
Data="{StaticResource WindowCloseIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}"
|
||||
Theme="{StaticResource InnerPathIcon}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</WindowDrawnDecorationsContent.Overlay>
|
||||
|
||||
<WindowDrawnDecorationsContent.FullscreenPopover>
|
||||
<!-- Shown on hover at top edge in fullscreen -->
|
||||
<DockPanel Height="{TemplateBinding TitleBarHeight}" Background="#E0000000">
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="PART_PopoverFullScreenButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
WindowDecorationProperties.ElementRole="FullScreenButton">
|
||||
<PathIcon
|
||||
Data="{StaticResource WindowCollapseGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}"
|
||||
Theme="{StaticResource InnerPathIcon}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="12,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="White"
|
||||
Text="{TemplateBinding Title}" />
|
||||
</DockPanel>
|
||||
</WindowDrawnDecorationsContent.FullscreenPopover>
|
||||
</WindowDrawnDecorationsContent>
|
||||
</WindowDrawnDecorationsTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ Button#PART_CloseButton:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_CloseButton:pressed">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonCloseForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Shadow: inset border and add drop shadow -->
|
||||
<Style Selector="^:has-shadow /template/ Panel#PART_UnderlayWrapper">
|
||||
<Setter Property="Margin" Value="{TemplateBinding ShadowThickness}" />
|
||||
</Style>
|
||||
<Style Selector="^:has-shadow /template/ Border#PART_WindowBorder">
|
||||
<Setter Property="BoxShadow" Value="0 2 10 2 #80000000" />
|
||||
</Style>
|
||||
<Style Selector="^:has-shadow /template/ Panel#PART_OverlayWrapper">
|
||||
<Setter Property="Margin" Value="{TemplateBinding ShadowThickness}" />
|
||||
</Style>
|
||||
|
||||
<!-- Maximized: restore button path changes -->
|
||||
<Style Selector="^:maximized /template/ Path#PART_MaximizeButtonIcon">
|
||||
<Setter Property="Data" Value="{StaticResource WindowRestoreGlyph}" />
|
||||
</Style>
|
||||
|
||||
<!-- Border: inset titlebar and buttons inside frame -->
|
||||
<Style Selector="^:has-border /template/ Panel#PART_TitleTextPanel">
|
||||
<Setter Property="Margin" Value="1,1,1,0" />
|
||||
</Style>
|
||||
<Style Selector="^:has-border /template/ Panel#PART_TitleBar">
|
||||
<Setter Property="Margin" Value="1,1,1,0" />
|
||||
</Style>
|
||||
<Style Selector="^:has-border /template/ StackPanel#PART_OverlayPanel">
|
||||
<Setter Property="Margin" Value="0,1,1,0" />
|
||||
</Style>
|
||||
|
||||
<!-- Fullscreen: hide overlay and titlebar (popover takes over) -->
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_TitleTextPanel">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ StackPanel#PART_OverlayPanel">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_TitleBar">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -9,10 +9,10 @@
|
||||
<ResourceInclude Source="ButtonSpinner.axaml" />
|
||||
<ResourceInclude Source="Calendar.axaml" />
|
||||
<ResourceInclude Source="CalendarDatePicker.axaml" />
|
||||
<ResourceInclude Source="CaptionButtons.axaml" />
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
<ResourceInclude Source="ContextMenu.axaml" />
|
||||
<ResourceInclude Source="DataValidationErrors.axaml" />
|
||||
<ResourceInclude Source="DatePicker.axaml" />
|
||||
@@ -22,7 +22,6 @@
|
||||
<ResourceInclude Source="Expander.axaml" />
|
||||
<ResourceInclude Source="FlyoutPresenter.axaml" />
|
||||
<ResourceInclude Source="GridSplitter.axaml" />
|
||||
<ResourceInclude Source="GroupBox.axaml" />
|
||||
<ResourceInclude Source="HeaderedContentControl.axaml" />
|
||||
<ResourceInclude Source="HyperlinkButton.axaml" />
|
||||
<ResourceInclude Source="ItemsControl.axaml" />
|
||||
@@ -51,13 +50,13 @@
|
||||
<ResourceInclude Source="TextBox.axaml" />
|
||||
<ResourceInclude Source="ThemeVariantScope.axaml" />
|
||||
<ResourceInclude Source="TimePicker.axaml" />
|
||||
<ResourceInclude Source="TitleBar.axaml" />
|
||||
<ResourceInclude Source="ToggleButton.axaml" />
|
||||
<ResourceInclude Source="ToggleSwitch.axaml" />
|
||||
<ResourceInclude Source="Tooltip.axaml" />
|
||||
<ResourceInclude Source="TransitioningContentControl.axaml" />
|
||||
<ResourceInclude Source="TreeView.axaml" />
|
||||
<ResourceInclude Source="Window.axaml" />
|
||||
<ResourceInclude Source="WindowDrawnDecorations.axaml" />
|
||||
<ResourceInclude Source="WindowNotificationManager.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
26
src/Semi.Avalonia/Converters/KeyToPathConverter.cs
Normal file
26
src/Semi.Avalonia/Converters/KeyToPathConverter.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Metadata;
|
||||
|
||||
namespace Semi.Avalonia.Converters;
|
||||
|
||||
public class KeyToPathConverter: IValueConverter
|
||||
{
|
||||
[Content]
|
||||
public IDictionary<string, object?> Resources { get; } = new Dictionary<string, object?>();
|
||||
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if(value is string s && Resources.TryGetValue(s, out var v))
|
||||
return v;
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -2,36 +2,56 @@ using System;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Irihi.Avalonia.Shared.Converters;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace Semi.Avalonia.Converters;
|
||||
|
||||
public class PlacementToRenderTransformOriginConverter : MarkupValueConverter
|
||||
public class PlacementToRenderTransformOriginConverter: IValueConverter
|
||||
{
|
||||
public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public static PlacementToRenderTransformOriginConverter Instance { get; } = new PlacementToRenderTransformOriginConverter();
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is not PlacementMode p)
|
||||
{
|
||||
return new RelativePoint(0.5, 0.5, RelativeUnit.Relative);
|
||||
}
|
||||
|
||||
return p switch
|
||||
switch (p)
|
||||
{
|
||||
PlacementMode.Bottom => new RelativePoint(0.5, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.Left => new RelativePoint(1.0, 0.5, RelativeUnit.Relative),
|
||||
PlacementMode.Right => new RelativePoint(0.0, 0.5, RelativeUnit.Relative),
|
||||
PlacementMode.Top => new RelativePoint(0.5, 1.0, RelativeUnit.Relative),
|
||||
PlacementMode.Pointer => new RelativePoint(0.0, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.Center or PlacementMode.AnchorAndGravity => new RelativePoint(0.5, 0.5, RelativeUnit.Relative),
|
||||
PlacementMode.BottomEdgeAlignedLeft => new RelativePoint(0.0, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.BottomEdgeAlignedRight => new RelativePoint(1.0, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.LeftEdgeAlignedTop => new RelativePoint(1.0, 1.0, RelativeUnit.Relative),
|
||||
PlacementMode.LeftEdgeAlignedBottom => new RelativePoint(1.0, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.RightEdgeAlignedTop => new RelativePoint(0.0, 1.0, RelativeUnit.Relative),
|
||||
PlacementMode.RightEdgeAlignedBottom => new RelativePoint(0.0, 0.0, RelativeUnit.Relative),
|
||||
PlacementMode.TopEdgeAlignedLeft => new RelativePoint(0.0, 1.0, RelativeUnit.Relative),
|
||||
PlacementMode.TopEdgeAlignedRight => new RelativePoint(1.0, 1.0, RelativeUnit.Relative),
|
||||
_ => new RelativePoint(0.5, 0.5, RelativeUnit.Relative)
|
||||
};
|
||||
case PlacementMode.Bottom:
|
||||
return new RelativePoint(0.5, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.Left:
|
||||
return new RelativePoint(1.0, 0.5, RelativeUnit.Relative);
|
||||
case PlacementMode.Right:
|
||||
return new RelativePoint(0.0, 0.5, RelativeUnit.Relative);
|
||||
case PlacementMode.Top:
|
||||
return new RelativePoint(0.5, 1.0, RelativeUnit.Relative);
|
||||
case PlacementMode.Pointer:
|
||||
return new RelativePoint(0.0, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.Center:
|
||||
case PlacementMode.AnchorAndGravity:
|
||||
return new RelativePoint(0.5, 0.5, RelativeUnit.Relative);
|
||||
case PlacementMode.BottomEdgeAlignedLeft:
|
||||
return new RelativePoint(0.0, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.BottomEdgeAlignedRight:
|
||||
return new RelativePoint(1.0, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.LeftEdgeAlignedTop:
|
||||
return new RelativePoint(1.0, 1.0, RelativeUnit.Relative);
|
||||
case PlacementMode.LeftEdgeAlignedBottom:
|
||||
return new RelativePoint(1.0, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.RightEdgeAlignedTop:
|
||||
return new RelativePoint(0.0, 1.0, RelativeUnit.Relative);
|
||||
case PlacementMode.RightEdgeAlignedBottom:
|
||||
return new RelativePoint(0.0, 0.0, RelativeUnit.Relative);
|
||||
case PlacementMode.TopEdgeAlignedLeft:
|
||||
return new RelativePoint(0.0, 1.0, RelativeUnit.Relative);
|
||||
case PlacementMode.TopEdgeAlignedRight:
|
||||
return new RelativePoint(1.0, 1.0, RelativeUnit.Relative);
|
||||
}
|
||||
return new RelativePoint(0.5, 0.5, RelativeUnit.Relative);
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,27 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Irihi.Avalonia.Shared.Converters;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace Semi.Avalonia.Converters;
|
||||
|
||||
public class PositionToAngleConverter : MarkupValueConverter
|
||||
public class PositionToAngleConverter: IValueConverter
|
||||
{
|
||||
public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
return value is double d ? d * 3.6 : 0;
|
||||
if (value is double d)
|
||||
{
|
||||
return d * 3.6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
return value is double d ? d / 3.6 : 0;
|
||||
if (value is double d)
|
||||
{
|
||||
return d / 3.6;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
22
src/Semi.Avalonia/Converters/TreeViewItemIndentConverter.cs
Normal file
22
src/Semi.Avalonia/Converters/TreeViewItemIndentConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace Semi.Avalonia.Converters;
|
||||
|
||||
public class TreeViewItemIndentConverter : IMultiValueConverter
|
||||
{
|
||||
public static readonly TreeViewItemIndentConverter Instance = new();
|
||||
|
||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Count > 1 && values[0] is int level && values[1] is double indent)
|
||||
{
|
||||
return new Thickness(indent * level, 0, 0, 0);
|
||||
}
|
||||
|
||||
return new Thickness(0);
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,9 @@
|
||||
<StreamGeometry x:Key="SemiIconBolt">
|
||||
M3.6 14.2 15.1.65c.3-.4.95-.15.9.35l-2 8h6a.5.5 0 0 1 .4.8L8.9 23.35c-.3.4-.95.15-.9-.35l2-8H4a.5.5 0 0 1-.4-.8Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconBook">
|
||||
M19 1a2 2 0 0 1 2 2v19a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V5a4 4 0 0 1 4-4h12ZM6 19a1 1 0 0 0 0 2h13v-2H6Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconBookmark">
|
||||
M4 21.59V3c0-1.1.9-2 2-2h12a2 2 0 0 1 2 2v18.59a1 1 0 0 1-1.7.7L12 16l-6.3 6.3a1 1 0 0 1-1.7-.71Z
|
||||
</StreamGeometry>
|
||||
@@ -203,6 +206,9 @@
|
||||
<StreamGeometry x:Key="SemiIconCode">
|
||||
M14.49 4.19a1.5 1.5 0 0 0-2.98-.38l-2 16a1.5 1.5 0 1 0 2.98.38l2-16ZM8.06 5.94a1.5 1.5 0 0 1 0 2.12L4.12 12l3.94 3.94a1.5 1.5 0 1 1-2.12 2.12l-5-5a1.5 1.5 0 0 1 0-2.12l5-5a1.5 1.5 0 0 1 2.12 0Zm7.88 0a1.5 1.5 0 0 1 2.12 0l5 5a1.5 1.5 0 0 1 0 2.12l-5 5a1.5 1.5 0 0 1-2.12-2.12L19.88 12l-3.94-3.94a1.5 1.5 0 0 1 0-2.12Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCoinMoney">
|
||||
M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22Zm3.2 6.3a1 1 0 0 0-1.4 0L12 9.08l-1.8-1.8a1 1 0 1 0-1.4 1.42L10.08 10H9a1 1 0 1 0 0 2h2v1H9a1 1 0 1 0 0 2h2v1a1 1 0 0 0 2 0v-1h2a1 1 0 0 0 0-2h-2v-1h2a1 1 0 0 0 0-2h-1.09l1.3-1.3a1 1 0 0 0 0-1.4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconColorPalette">
|
||||
M2 4c0-1.1.9-2 2-2h5a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm6 13.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm11.59-8.91L16.4 5.4a2 2 0 0 0-2.82 0L13 6v12l6.59-6.59a2 2 0 0 0 0-2.82ZM22 16a2 2 0 0 0-2-2l-8 8h8a2 2 0 0 0 2-2v-4Z
|
||||
</StreamGeometry>
|
||||
@@ -283,6 +289,9 @@
|
||||
M4.38 4.4c.51-.53 1.34-.53 1.84 0l6.4 6.64c.5.53.5 1.39 0 1.92l-6.4 6.64c-.5.53-1.33.53-1.84 0a1.4 1.4 0 0 1 0-1.91L9.86 12 4.38 6.31a1.4 1.4 0 0 1 0-1.91Z
|
||||
M11.38 4.4c.51-.53 1.33-.53 1.84 0l6.4 6.64c.5.53.5 1.39 0 1.92l-6.4 6.64c-.5.53-1.33.53-1.84 0a1.4 1.4 0 0 1 0-1.91L16.86 12l-5.48-5.69a1.4 1.4 0 0 1 0-1.91Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconDownCircle">
|
||||
M1 12a11 11 0 1 1 22 0 11 11 0 0 1-22 0Zm6.3-2.1a1 1 0 0 0 0 1.42l3.88 3.89a1 1 0 0 0 1.42 0l3.89-3.9a1 1 0 0 0-1.42-1.4l-3.18 3.18L8.7 9.9a1 1 0 0 0-1.42 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconDownload">
|
||||
M17.84 8.06A6.5 6.5 0 1 0 5.18 11 4.5 4.5 0 0 0 5.5 20H17a6 6 0 0 0 .84-11.94Zm-6.16 9.67a.5.5 0 0 0 .64 0l5.15-4.29a.25.25 0 0 0-.16-.44H14V9.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5V13H6.7c-.24 0-.35.3-.17.44l5.15 4.3Z
|
||||
</StreamGeometry>
|
||||
@@ -293,6 +302,11 @@
|
||||
M14.5 4.5l 5 5 2.09-2.09a2 2 0 0 0 0-2.82L19.4 2.4a2 2 0 0 0-2.82 0L14.5 4.5Z
|
||||
M2.25 21.13l 1.68-5.88a1 1 0 0 1 .25-.43L13 6l5 5-8.82 8.82a1 1 0 0 1-.43.25l-5.88 1.68a.5.5 0 0 1-.62-.62Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconEdit2">
|
||||
m16.43 4.1 3.54 3.54 1.48-1.48c.55-.55.55-1.45 0-2L19.9 2.62a1.42 1.42 0 0 0-2 0L16.43 4.1Z
|
||||
m-8.76 11.88 1.19-4.17a.7.7 0 0 1.18-.3l6.24-6.25 3.54 3.54-6.24 6.24a.7.7 0 0 1-.3.18l-4.17 1.2a.35.35 0 0 1-.44-.44Z
|
||||
M7.97 9.78c-.28.29-.5.63-.64 1l-.05.17-1.19 4.17A2.35 2.35 0 0 0 9 18.02l4.17-1.18c.44-.13.84-.37 1.17-.7l4.8-4.8a.5.5 0 0 1 .86.36V21a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h9.54a.5.5 0 0 1 .36.85L7.97 9.78Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconEmoji">
|
||||
M12 23a11 11 0 1 1 0-22 11 11 0 0 1 0 22Zm-6.93-9a7 7 0 0 0 13.86 0H5.07ZM8 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm8 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z
|
||||
</StreamGeometry>
|
||||
@@ -498,7 +512,7 @@
|
||||
M12.03 19.57c-.19-.6-1.08-3.15-1.42-3.47-.32-.3-.71-.25-1.1-.2a8.7 8.7 0 0 1-.5.07c-.48.06-.9.12-1.52.17-.58.04-1.11.03-1.63-.1a52.44 52.44 0 0 0 3.26 5.12c.44.62 1.25.84 1.95.56.85-.34 1.3-1.04.96-2.15Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconHourglass">
|
||||
M6 23h12c1.1 0 2.14-.9 2-2-.44-3.5-2.14-5.06-3.38-6.28-.9-.87-1.62-1.58-1.62-2.72 0-1.14.72-1.85 1.62-2.72C17.86 8.06 19.56 6.5 20 3c.14-1.1-.9-2-2-2H6c-1.1 0-2.17.9-2 2 .47 2.92 2.07 4.55 3.27 5.88C8.22 9.94 9 10.81 9 12c0 1.14-.72 1.85-1.62 2.72C6.14 15.94 4.44 17.5 4 21c-.14 1.1.9 2 2 2Zm9-16c0 .82-.74 1.49-1.5 2.17A4.93 4.93 0 0 0 12 11a4.93 4.93 0 0 0-1.5-1.83C9.74 8.49 9 7.82 9 7h6ZM7 20c0-1.51 1.02-2.14 2.16-2.83 1.11-.68 2.34-1.44 2.84-3.17.5 1.73 1.73 2.49 2.84 3.17 1.14.7 2.16 1.32 2.16 2.83H7Z
|
||||
M20 1a1 1 0 1 1 0 2h-1v5a1 1 0 0 1-.3.7L15.42 12l3.3 3.3a1 1 0 0 1 .29.7v5h1a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2h1v-5a1 1 0 0 1 .3-.7L8.58 12l-3.3-3.3A1 1 0 0 1 5 8V3H4a1 1 0 0 1 0-2h16ZM9 18a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H9Zm1-12a1 1 0 0 0 0 2h4a1 1 0 1 0 0-2h-4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconIdCard">
|
||||
M4 4a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H4Zm5.8 8.17c-.47 1.18-1.33 1.97-2.3 1.97-.97 0-1.83-.79-2.3-1.97-.3-.12-.58-.47-.7-.94-.17-.6-.14-1.14.31-1.31C4.86 7.82 5.71 7 7.5 7s2.64.81 2.69 2.92c.45.17.48.7.32 1.31-.13.47-.41.82-.7.94Zm2.03 3.86c.42.42 0 .97-.61.97H3.78c-.6 0-1.03-.55-.61-.97.81-.84 2.45-1.41 4.33-1.41s3.52.57 4.33 1.4ZM14 10a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1Zm1 3a1 1 0 1 0 0 2h3a1 1 0 1 0 0-2h-3Z
|
||||
@@ -549,6 +563,9 @@
|
||||
<StreamGeometry x:Key="SemiIconLayers">
|
||||
m21.21 15.05.26.14c.51.28.68.9.38 1.39-.1.15-.23.27-.38.36l-8.92 4.92c-.34.19-.76.19-1.1 0l-8.92-4.92a.98.98 0 0 1-.38-1.39c.1-.15.23-.27.38-.36l.26-.14 8.66 4.78c.32.17.72.18 1.05.02l.05-.02 8.66-4.78Zm0-4.07.26.14c.51.29.68.91.38 1.4-.1.14-.23.27-.38.36l-8.92 4.92c-.34.18-.76.18-1.1 0l-8.92-4.92a.98.98 0 0 1-.38-1.4c.1-.14.23-.27.38-.36l.26-.14 8.66 4.78c.32.18.72.19 1.05.03l.05-.03 8.66-4.78Zm-8.66-8.84 8.92 4.92c.51.28.68.9.38 1.39-.1.15-.23.27-.38.36l-8.92 4.92c-.34.19-.76.19-1.1 0L2.53 8.81a.98.98 0 0 1-.38-1.39c.1-.15.23-.27.38-.36l8.92-4.92c.34-.19.76-.19 1.1 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconLeftCircle">
|
||||
M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22Zm2.1 6.3a1 1 0 0 0-1.42 0L8.8 11.17a1 1 0 0 0 0 1.42l3.9 3.89a1 1 0 0 0 1.4-1.42l-3.18-3.18L14.1 8.7a1 1 0 0 0 0-1.42Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconLikeHeart">
|
||||
M12 6c-1.5-3.88-6.25-3.94-8.6-1.6C.87 6.94 1 10.5 3.5 14c2.02 2.83 6.33 6.31 7.9 7.54.36.28.84.28 1.2 0 1.57-1.23 5.88-4.71 7.9-7.54 2.5-3.5 2.63-7.06.1-9.6C18.25 2.06 14.5 2.12 12 6Z
|
||||
</StreamGeometry>
|
||||
@@ -616,9 +633,9 @@
|
||||
M8.5 2c.83 0 1.5.67 1.5 1.5v3A3.5 3.5 0 0 1 6.5 10h-3a1.5 1.5 0 1 1 0-3h3a.5.5 0 0 0 .5-.5v-3C7 2.67 7.67 2 8.5 2ZM16 2c.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5h3a1.5 1.5 0 0 1 0 3h-3a3.5 3.5 0 0 1-3.5-3.5v-3c0-.83.67-1.5 1.5-1.5ZM2 15.5c0-.83.67-1.5 1.5-1.5h3a3.5 3.5 0 0 1 3.5 3.5v3a1.5 1.5 0 0 1-3 0v-3a.5.5 0 0 0-.5-.5h-3A1.5 1.5 0 0 1 2 15.5Zm12 2a3.5 3.5 0 0 1 3.5-3.5h3a1.5 1.5 0 0 1 0 3h-3a.5.5 0 0 0-.5.5v3a1.5 1.5 0 0 1-3 0v-3Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMiniPlayer">
|
||||
M7.52 7.19c.39-.39 1.02-.39 1.41 0l2.95 2.95V9.31c0-.55.45-1 1-1 .56 0 1 .45 1 1v3.24c0 .55-.44 1-1 1H9.64c-.55 0-1-.45-1-1 0-.55.45-1 1-1h.83L7.52 8.6c-.39-.39-.39-1.02 0-1.41Z
|
||||
M5.5 22H9.75c.83 0 1.5-.67 1.5-1.5S10.58 19 9.75 19H5.5c-.28 0-.5-.22-.5-.5v-3-10c0-.28.22-.5.5-.5h10 3c.28 0 .5.22.5.5V9.75c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V5.5C22 3.57 20.43 2 18.5 2h-3-10C3.57 2 2 3.57 2 5.5v10 3C2 20.43 3.57 22 5.5 22Z
|
||||
m10 0h5c.83 0 1.5-.67 1.5-1.5v-5c0-.83-.67-1.5-1.5-1.5h-5c-.83 0-1.5.67-1.5 1.5v5c0 .83.67 1.5 1.5 1.5Z
|
||||
M15.5 22a1.5 1.5 0 0 1-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5h-5Z
|
||||
M5.5 22A3.5 3.5 0 0 1 2 18.5v-13A3.5 3.5 0 0 1 5.5 2h13A3.5 3.5 0 0 1 22 5.5v4.25a1.5 1.5 0 0 1-3 0V5.5a.5.5 0 0 0-.5-.5h-13a.5.5 0 0 0-.5.5v13c0 .28.22.5.5.5h4.25a1.5 1.5 0 0 1 0 3H5.5Z
|
||||
M7.52 7.19a1 1 0 0 0 0 1.41l2.95 2.95h-.83a1 1 0 1 0 0 2h3.24a1 1 0 0 0 1-1V9.31a1 1 0 1 0-2 0v.83L8.93 7.19a1 1 0 0 0-1.41 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMinus">
|
||||
M2 12c0-.83.67-1.5 1.5-1.5h17a1.5 1.5 0 0 1 0 3h-17A1.5 1.5 0 0 1 2 12Z
|
||||
@@ -640,6 +657,9 @@
|
||||
<StreamGeometry x:Key="SemiIconMute">
|
||||
M12 3a1 1 0 0 0-1.62-.78L4.65 7H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.65l5.73 4.78A1 1 0 0 0 12 21V3Zm2.06 4.94a1.5 1.5 0 0 1 2.12 0L18 9.76l1.82-1.82a1.5 1.5 0 1 1 2.12 2.12l-1.82 1.82 1.94 1.94a1.5 1.5 0 0 1-2.12 2.12L18 14l-1.94 1.94a1.5 1.5 0 0 1-2.12-2.12l1.94-1.94-1.82-1.82a1.5 1.5 0 0 1 0-2.12Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconNoteMoney">
|
||||
M21 3a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h18Zm-5.8 4.3a1 1 0 0 0-1.4 0L12 9.08l-1.8-1.8a1 1 0 1 0-1.4 1.42L10.08 10H9a1 1 0 1 0 0 2h2v1H9a1 1 0 1 0 0 2h2v1a1 1 0 0 0 2 0v-1h2a1 1 0 0 0 0-2h-2v-1h2a1 1 0 0 0 0-2h-1.09l1.3-1.3a1 1 0 0 0 0-1.4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconOption">
|
||||
M3.5 3.5a1.5 1.5 0 1 0 0 3h3.63l7.57 13.24c.26.47.76.76 1.3.76h4.5a1.5 1.5 0 0 0 0-3h-3.63L9.3 4.26A1.5 1.5 0 0 0 8 3.5H3.5Zm11 0a1.5 1.5 0 0 0 0 3h6a1.5 1.5 0 0 0 0-3h-6Z
|
||||
</StreamGeometry>
|
||||
@@ -683,6 +703,9 @@
|
||||
<StreamGeometry x:Key="SemiIconPriceTag">
|
||||
M21 2h-7.59a1 1 0 0 0-.7.3L1.4 13.58a2 2 0 0 0 0 2.82L7.6 22.6a2 2 0 0 0 2.82 0l11.3-11.3a1 1 0 0 0 .29-.7V3a1 1 0 0 0-1-1Zm-5.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconPrize">
|
||||
M4 1a1 1 0 0 0-1 1v5a1 1 0 0 0 .4.8L7 10.5v.6a7 7 0 1 0 10 0v-.6l3.6-2.7A1 1 0 0 0 21 7V2a1 1 0 0 0-1-1H4Zm3 15a4.99 4.99 0 0 1 8.33-3.73A4.99 4.99 0 0 1 12 21a5 5 0 0 1-5-5Zm2-6.33a6.97 6.97 0 0 1 6 0V3H9v6.67ZM15 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconPrint">
|
||||
M7 2a2 2 0 0 0-2 2v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4a2 2 0 0 0-2-2H7Z
|
||||
M2 12a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v5a2 2 0 0 1-2 2h-2v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-2H4a2 2 0 0 1-2-2v-5Zm16 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 15h8v6H8v-6Z
|
||||
@@ -705,6 +728,9 @@
|
||||
<StreamGeometry x:Key="SemiIconQuote">
|
||||
M9.93 4.93c.25.8-.2 1.63-.99 1.88a7.02 7.02 0 0 0-4.08 3.32A5.02 5.02 0 0 1 11 15a5 5 0 0 1-10 0v-1.5a10 10 0 0 1 7.06-9.56c.8-.24 1.63.2 1.87 1Zm12 0c.25.8-.2 1.63-.99 1.88a7.02 7.02 0 0 0-4.08 3.32A5.02 5.02 0 0 1 23 15a5 5 0 0 1-10 0v-1.5a10 10 0 0 1 7.06-9.56c.8-.24 1.63.2 1.87 1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconRealSize">
|
||||
M21 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h18ZM6 8a1 1 0 0 0 0 2h1v5a1 1 0 0 0 2 0V9a1 1 0 0 0-1-1H6Zm10 0a1 1 0 1 0 0 2h1v5a1 1 0 0 0 2 0V9a1 1 0 0 0-1-1h-2Zm-3.5 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm0-4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconRedo">
|
||||
M14.44 2.44a1.5 1.5 0 0 0 0 2.12L16.88 7H9.25C5.16 7 2 10.58 2 14.5S5.16 22 9.25 22h3.25a1.5 1.5 0 0 0 0-3H9.25C6.98 19 5 16.93 5 14.5S6.98 10 9.25 10h7.63l-2.44 2.44a1.5 1.5 0 0 0 2.12 2.12l5-5a1.5 1.5 0 0 0 0-2.12l-5-5a1.5 1.5 0 0 0-2.12 0Z
|
||||
</StreamGeometry>
|
||||
@@ -760,6 +786,9 @@
|
||||
<StreamGeometry x:Key="SemiIconSetting">
|
||||
M8 5.07c-.8.47-1.8.46-2.6 0l-.24-.15a1.4 1.4 0 0 0-1.82.29c-.64.82-1.16 1.73-1.55 2.7a1.4 1.4 0 0 0 .66 1.71l.24.14a2.57 2.57 0 0 1 0 4.48l-.24.14a1.4 1.4 0 0 0-.66 1.72 11.1 11.1 0 0 0 1.55 2.69 1.4 1.4 0 0 0 1.82.3l.25-.15a2.57 2.57 0 0 1 3.88 2.24v.28c-.01.7.46 1.33 1.16 1.43a11 11 0 0 0 3.1 0 1.4 1.4 0 0 0 1.17-1.43v-.28a2.57 2.57 0 0 1 3.87-2.24l.25.14c.6.36 1.38.26 1.82-.29.64-.82 1.16-1.73 1.55-2.7a1.4 1.4 0 0 0-.66-1.71l-.24-.14a2.57 2.57 0 0 1 0-4.48l.24-.14a1.4 1.4 0 0 0 .66-1.72 11.08 11.08 0 0 0-1.55-2.69 1.4 1.4 0 0 0-1.82-.3l-.25.15a2.57 2.57 0 0 1-3.88-2.24v-.28c.01-.7-.46-1.33-1.16-1.43a10.99 10.99 0 0 0-3.1 0c-.7.1-1.17.72-1.17 1.43v.28C9.3 3.75 8.8 4.61 8 5.07Zm6 10.4a4 4 0 1 0-4-6.93 4 4 0 0 0 4 6.92Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconShare">
|
||||
M17.5 2A3.5 3.5 0 1 1 15 7.95l-5.13 3.11a3.5 3.5 0 0 1 .03 1.78l5.22 3.1A3.49 3.49 0 0 1 21 18.5a3.5 3.5 0 1 1-6.9-.85l-5.22-3.08A3.49 3.49 0 0 1 3 12a3.5 3.5 0 0 1 5.8-2.63l5.27-3.19A3.5 3.5 0 0 1 17.5 2Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconShield">
|
||||
m2.68 3.8 8.75-2.63a2 2 0 0 1 1.14 0l8.74 2.62c.41.13.7.5.7.93.03 2.63-.03 11.72-2.01 14.28-1.98 2.55-6.38 3.66-7.65 3.93-.23.05-.47.05-.7 0C10.4 22.65 6.12 21.55 4 19 1.87 16.44 1.92 7.32 1.98 4.7c0-.42.3-.78.7-.9ZM12 4v16s3.97-.73 5.6-2.9c1.61-2.2 1.39-11.2 1.39-11.2L12 4H12Z
|
||||
</StreamGeometry>
|
||||
@@ -835,6 +864,9 @@
|
||||
<StreamGeometry x:Key="SemiIconTerminal">
|
||||
M2 5a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Zm10 11a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1ZM7.7 6.3a1 1 0 0 0-1.4 1.4l3.36 3.37-3.44 4.3a1 1 0 0 0 1.56 1.25l4-5a1 1 0 0 0-.07-1.33l-4-4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconTestScore">
|
||||
M19 1a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3c0-1.1.9-2 2-2h14ZM7 17.5a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2H7Zm0-4a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2H7ZM9.25 5a.75.75 0 0 0-.67.42l-2.5 5a.75.75 0 0 0 1.34.67l.42-.84h2.82l.42.84a.75.75 0 0 0 1.34-.68l-2.5-5A.75.75 0 0 0 9.25 5Zm.66 3.75H8.6l.66-1.32.66 1.32Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconText">
|
||||
M3 4.5C3 3.67 3.67 3 4.5 3h15c.83 0 1.5.67 1.5 1.5v3a1.5 1.5 0 0 1-3 0V6h-4.5v13h2a1.5 1.5 0 0 1 0 3h-7a1.5 1.5 0 0 1 0-3h2V6H6v1.5a1.5 1.5 0 1 1-3 0v-3Z
|
||||
</StreamGeometry>
|
||||
@@ -847,6 +879,9 @@
|
||||
<StreamGeometry x:Key="SemiIconTickCircle">
|
||||
M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm5.88-13.18-6.2 7.6a1.5 1.5 0 0 1-2.37 0l-3.5-4a1.5 1.5 0 1 1 2.37-1.84l2.3 2.46L15.5 8a1.5 1.5 0 1 1 2.38 1.82Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconTicketCode">
|
||||
M21 4a2 2 0 0 1 2 2v3.8a1 1 0 0 1-.71.96c-.74.22-1.1.76-1.1 1.24s.36 1.02 1.1 1.24a1 1 0 0 1 .71.96V18a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-3.8a1 1 0 0 1 .71-.96c.74-.22 1.1-.76 1.1-1.24 0-.47-.36-1.01-1.08-1.24A1 1 0 0 1 1 9.8V6c0-1.1.9-2 2-2h18ZM8 9a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Zm4 0a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Zm4 0a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconTiktokLogo">
|
||||
M16.07 1h-3.8V16.13A3.17 3.17 0 1 1 10.14 13v-3.9a6.98 6.98 0 1 0 5.94 6.91V8.47a9.05 9.05 0 0 0 5.3 1.7V6.37a5.3 5.3 0 0 1-5.3-5.31V1Z
|
||||
</StreamGeometry>
|
||||
@@ -914,6 +949,9 @@
|
||||
<StreamGeometry x:Key="SemiIconUserGroup">
|
||||
M15.95 3.09s-.55-.84-1.11-.84c-.5 0-.98.04-1.84.84-1.11 1.02-1.5 2.41-1.5 4.73 0 1.53.3 3.18 1.67 3.9l.38.14c.78 1.64 2.03 2.7 3.42 2.7 1.53 0 2.9-1.3 3.64-3.24l.06-.03c.63.15 1.51.2 2.12.2.27.01.4-.31.24-.51a6.4 6.4 0 0 1-.96-1.5c-.05-.13-.11-.52-.2-1.05-.2-1.38-.57-3.72-1.37-4.93-.72-1.08-3-1.5-3.83-1.25-.61.19-.72.84-.72.84ZM2.21 4.42c.21-.47.8-.57 1.23-.29L4 4.5 4.01 3c0-.2.13-.4.32-.45a6.2 6.2 0 0 1 1.78-.23c2.95 0 4.36 1.4 4.43 5 .75.3.8 1.22.53 2.26-.21.8-.67 1.4-1.16 1.6-.78 2.03-2.2 3.38-3.8 3.38-1.6 0-3.02-1.35-3.8-3.38-.48-.2-.95-.8-1.16-1.6-.27-1.04-.22-1.97.53-2.25.03-1.21.2-2.17.53-2.91ZM8 22c.55 0 1-.45 1.03-1 .1-1.3.45-2.15 1.27-3 .5-.53.43-1.4-.26-1.61A8.47 8.47 0 0 0 7.5 16c-3.06 0-5.69 1.6-6.87 3.89C.1 20.94 2.03 22 3.22 22H8Zm13.8 0c1.18 0 2.12-1.05 1.61-2.1A7.06 7.06 0 0 0 17 16a7.06 7.06 0 0 0-6.41 3.9c-.51 1.05.43 2.1 1.61 2.1h9.6Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconUserList">
|
||||
M11.35 15c.54 0 1.08.04 1.6.13.23.03.4.24.4.48v5.89a.5.5 0 0 1-.5.5H2.49a.48.48 0 0 1-.46-.64A10 10 0 0 1 11.35 15Zm4.5 5c.27 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5h1Zm5.65 0c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-3.65a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5h3.65Zm-5.65-3c.27 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5h1Zm5.65 0c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-3.65a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5h3.65ZM12.35 2c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6 2.7-6 6-6Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconUserSetting">
|
||||
M16.86 14.85c-.36.21-.81.21-1.17 0l-.11-.07a.64.64 0 0 0-.83.13 5 5 0 0 0-.7 1.23c-.13.3.01.62.3.78l.1.06a1.17 1.17 0 0 1 0 2.04l-.1.06a.64.64 0 0 0-.3.79 5.06 5.06 0 0 0 .7 1.22c.2.25.55.3.83.13l.1-.06a1.17 1.17 0 0 1 1.77 1.01v.13c0 .32.21.6.53.65a5 5 0 0 0 1.4 0 .63.63 0 0 0 .54-.65v-.13a1.17 1.17 0 0 1 1.76-1.01l.11.06c.28.16.63.12.83-.13a5 5 0 0 0 .7-1.23.64.64 0 0 0-.3-.78l-.1-.06a1.17 1.17 0 0 1 0-2.04l.1-.06a.64.64 0 0 0 .3-.78 5.04 5.04 0 0 0-.7-1.23.63.63 0 0 0-.83-.13l-.11.07a1.17 1.17 0 0 1-1.76-1.02v-.13c0-.32-.21-.6-.53-.65a5 5 0 0 0-1.41 0 .64.64 0 0 0-.53.65v.13c0 .42-.22.81-.59 1.02Zm2.73 4.73a1.82 1.82 0 1 0-1.82-3.15 1.82 1.82 0 0 0 1.82 3.15Z
|
||||
M12.35 15.98 12 16c-1.98 0-3.74-1.66-4.71-4.14-.6-.25-1.18-1-1.44-1.97-.34-1.27-.28-2.4.65-2.76C6.6 2.71 8.34 1 12 1s5.4 1.71 5.5 6.13c.92.36 1 1.49.65 2.76-.26.97-.83 1.72-1.44 1.97l-.12.3a6.01 6.01 0 0 0-4.24 3.82ZM12.08 17H12c-3.85 0-7.2 1.2-8.87 2.95-.85.9.03 2.05 1.27 2.05h9.13a5.98 5.98 0 0 1-1.45-5Z
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
<StreamGeometry x:Key="SemiIconAbsoluteStroked">
|
||||
M13.62 5.04a1 1 0 1 0 1.42-1.42L12.7 1.3a1 1 0 0 0-1.42 0L8.96 3.62a1 1 0 0 0 1.42 1.42L11 4.4V11H4.41l.63-.62a1 1 0 1 0-1.42-1.42L1.3 11.3a1 1 0 0 0 0 1.42l2.33 2.33a1 1 0 0 0 1.42-1.42L4.4 13H11v6.59l-.62-.63a1 1 0 0 0-1.42 1.42l2.33 2.33a1 1 0 0 0 1.42 0l2.33-2.33a1 1 0 0 0-1.42-1.42l-.62.63V13h6.59l-.63.62a1 1 0 0 0 1.42 1.42l2.33-2.33a1 1 0 0 0 0-1.42l-2.33-2.33a1 1 0 1 0-1.42 1.42l.63.62H13V4.41l.62.63Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconAlarmStroked">
|
||||
M12 7.64c.5 0 .9.4.9.9v5.08l3.98 3.97a.9.9 0 1 1-1.29 1.29l-4.18-4.18-.03-.04a.9.9 0 0 1-.29-.66V8.55c0-.5.4-.91.91-.91Z
|
||||
M12 4a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z
|
||||
M3.54 1.41a2 2 0 1 1 2.82 2.83L4.24 6.36a2 2 0 1 1-2.83-2.82L3.54 1.4Z
|
||||
M20.46 1.41a2 2 0 1 0-2.82 2.83l2.12 2.12a2 2 0 1 0 2.83-2.82L20.46 1.4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconAlignHCenterStroked">
|
||||
M11 3a1 1 0 1 1 2 0v2h7a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-7v2h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4v2a1 1 0 1 1-2 0v-2H7a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h4v-2H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h7V3Zm1 14h4v-2H8v2h4Zm7-8H5V7h14v2Z
|
||||
</StreamGeometry>
|
||||
@@ -59,18 +65,39 @@
|
||||
<StreamGeometry x:Key="SemiIconBriefStroked">
|
||||
M5 1a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.41A2 2 0 0 0 20.41 7L15 1.59A2 2 0 0 0 13.59 1H5Zm8 2H5v18h14V9h-5a1 1 0 0 1-1-1V3Zm4.59 4L15 4.41V7h2.59Zm-6.09 5a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-5Zm-4.5.5c0-.28.22-.5.5-.5h1c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1Zm4.5 3.5a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-5Zm-4.5.5c0-.28.22-.5.5-.5h1c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconBriefcaseStroked">
|
||||
M15 1a2 2 0 0 1 2 2v3h4a2 2 0 0 1 2 2v12a2 2 0 0 1-1.8 1.99L21 22H3l-.2-.01A2 2 0 0 1 1 20V8c0-1.1.9-2 2-2h4V3c0-1.1.9-2 2-2h6ZM3 20h18v-7h-6v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-2H3v7Zm0-9h18V8H3v3Zm6.5-8a.5.5 0 0 0-.5.5V6h6V3.5a.5.5 0 0 0-.5-.5h-5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconButtonStroked">
|
||||
M2 6a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H2Zm1 10V8h18v8H3Zm4-5a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2H7Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCalendarClockStroked">
|
||||
M20 2a2 2 0 0 1 2 2v8.53a6 6 0 0 0-2-1.19V8a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7.8c.47.8 1.11 1.49 1.88 2H4a2 2 0 0 1-2-2V4c0-1.1.9-2 2-2h16ZM4.5 4a.5.5 0 0 0 0 1h15a.5.5 0 0 0 0-1h-15Z
|
||||
M8 15a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Z
|
||||
M12.34 15a5.99 5.99 0 0 0-.25 3h-.59a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h.84Z
|
||||
M8 10a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Z
|
||||
M12.5 10a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Z
|
||||
M17.5 10a1 1 0 0 1 1 1v.02a6.08 6.08 0 0 0-3 .52V11a1 1 0 0 1 1-1h1Z
|
||||
M18 12a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 .27c.41 0 .75.34.75.75v1.25l1.3 1.3a.75.75 0 1 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1-.1-.12.75.75 0 0 1-.14-.44v-1.55c0-.41.34-.75.75-.75Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCalendarStroked">
|
||||
M9.65 2.11a1.11 1.11 0 1 0-2.22 0v.87H3.1A2.1 2.1 0 0 0 1 5.08V20.9c0 1.16.94 2.1 2.1 2.1h17.8a2.1 2.1 0 0 0 2.1-2.1V5.08a2.1 2.1 0 0 0-2.1-2.1h-4.33V2.1a1.11 1.11 0 1 0-2.22 0v.87h-4.7V2.1Zm6.92 18.67h4.2v-3.71h-4.2v3.7Zm0-5.94h4.2v-3.7h-4.2v3.7Zm-2.22-3.7v3.7h-4.7v-3.7h4.7Zm1.11-2.23h5.32v-3.7h-4.2v.86a1.11 1.11 0 1 1-2.23 0V5.2h-4.7v.87a1.11 1.11 0 0 1-2.22 0V5.2h-4.2v3.71h12.23Zm-1.11 8.16v3.7h-4.7v-3.7h4.7Zm-6.92 3.7v-3.7h-4.2v3.7h4.2Zm0-5.93v-3.7h-4.2v3.7h4.2Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCameraStroked">
|
||||
M12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z
|
||||
M14.76 2a2 2 0 0 1 1.8 1.1L17.5 5H20a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h2.5l.95-1.9A2 2 0 0 1 9.24 2h5.52ZM8.3 5.9A2 2 0 0 1 6.5 7H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1h-2.5a2 2 0 0 1-1.79-1.1L14.76 4H9.24l-.95 1.9Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCandlestickChartStroked">
|
||||
M5 2a1 1 0 0 1 1 1v6h1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6v2a1 1 0 1 1-2 0v-2H3a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h1V3a1 1 0 0 1 1-1Zm0 15h1v-6H4v6h1Zm11-9a1 1 0 0 1 1-1h1V3a1 1 0 1 1 2 0v4h1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-1v4a1 1 0 1 1-2 0v-4h-1a1 1 0 0 1-1-1V8Zm4 7h-2V9h2v6ZM10 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h1v6a1 1 0 1 0 2 0v-6h1a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-1V3a1 1 0 1 0-2 0v2h-1Zm2 8h-1V7h2v6h-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCarouselStroked">
|
||||
M1 6h2v12H1v2h3a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H1v2Zm6-1a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm2 1v12h6V6H9Zm10-1a1 1 0 0 1 1-1h3v2h-2v12h2v2h-3a1 1 0 0 1-1-1V5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCartStroked">
|
||||
M9.65 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z
|
||||
M18.65 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z
|
||||
M5.5 2c.68 0 1.27.46 1.44 1.11l.03.13.14.79h14.71a1 1 0 0 1 .98 1.21l-1.56 7a1 1 0 0 1-.8.77l-.17.02H8.67L9.02 15h11.14a1 1 0 0 1 0 2H8.6a1.5 1.5 0 0 1-1.48-1.24L5.28 5.2l-.01-.07L5.07 4h-2.9a1 1 0 0 1 0-2H5.5ZM7.8 8.07l.52 2.96h11.14l1.1-5H7.46l.36 2.04Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCenterLeftStroked">
|
||||
M4 3a1 1 0 1 0-2 0v18a1 1 0 1 0 2 0V3Zm7 3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H11Zm1 10V8h8v8h-8Z
|
||||
</StreamGeometry>
|
||||
@@ -100,6 +127,9 @@
|
||||
<StreamGeometry x:Key="SemiIconChevronRightStroked">
|
||||
M7.9 20.17a1.25 1.25 0 0 1-.07-1.77l5.71-6.15-5.7-6.15a1.25 1.25 0 0 1 1.83-1.7l6.5 7c.44.48.44 1.22 0 1.7l-6.5 7c-.47.5-1.26.54-1.77.07Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconClockStroked">
|
||||
M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22Zm0 2a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 2a1 1 0 0 1 1 1v5.59l4.36 4.36a1 1 0 0 1-1.41 1.41l-4.6-4.6-.02-.02A1 1 0 0 1 11 12V6a1 1 0 0 1 1-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCloudStroked">
|
||||
M20 11.3V11c0-3.9-3.1-7-7-7-2.8 0-5.2 1.7-6.3 4-3.2.2-5.7 2.8-5.7 6 0 3.3 2.7 6 6 6h11.5a4.48 4.48 0 0 0 1.5-8.7ZM18.5 18H7a4.01 4.01 0 0 1-.9-7.9c.3-.1.6-.1.9-.1.31 0 .56 0 .84.1.13.04.28-.04.31-.17.13-.59.39-1.1.65-1.63C9.7 6.9 11.2 6 13 6a4.95 4.95 0 0 1 4.69 6.74.2.2 0 0 0 .19.26h.62c.4 0 .8.1 1.1.3a2.48 2.48 0 0 1-1.1 4.7Z
|
||||
</StreamGeometry>
|
||||
@@ -131,12 +161,19 @@
|
||||
<StreamGeometry x:Key="SemiIconCornerRadiusStroked">
|
||||
M12 4h9a1 1 0 1 0 0-2h-9A10 10 0 0 0 2 12v9a1 1 0 1 0 2 0v-9a8 8 0 0 1 8-8Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCreditCardStroked">
|
||||
M20 3a3 3 0 0 1 3 3v11a3 3 0 0 1-2.85 3H3.85A3 3 0 0 1 1 17.15V6a3 3 0 0 1 3-3h16ZM3 17a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-7H3v7ZM4 5a1 1 0 0 0-1 1v2h18V6a1 1 0 0 0-1-1H4Z
|
||||
M5 14a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCrossCircleStroked">
|
||||
M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-11 9a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.11 8.11a1 1 0 0 1 1.42 0L12 10.6l2.47-2.48a1 1 0 1 1 1.42 1.42L13.4 12l2.48 2.47a1 1 0 0 1-1.42 1.42L12 13.4 9.53 15.9a1 1 0 0 1-1.42-1.42L10.6 12 8.1 9.53a1 1 0 0 1 0-1.42Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCrossStroked">
|
||||
M3.62 19.12a1.25 1.25 0 0 0 1.76 1.76l7.12-7.11 7.12 7.11a1.25 1.25 0 0 0 1.76-1.76L14.27 12l7.11-7.12a1.25 1.25 0 0 0-1.76-1.76l-7.12 7.11-7.12-7.11a1.25 1.25 0 1 0-1.76 1.76L10.73 12l-7.11 7.12Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCrownStroked">
|
||||
M11.09 2a1 1 0 0 1 1.82 0l2.44 5.36a3 3 0 0 0 4.54 1.16l.14-.12 1.85-1.59c.61-.52 1.53.08 1.29.85L19.44 20.6a2 2 0 0 1-1.75 1.4H6.31a2 2 0 0 1-1.75-1.4L.83 7.66c-.24-.77.68-1.37 1.29-.85l1.85 1.6a3 3 0 0 0 4.6-.88l.08-.17L11.1 2Zm-.62 6.2a5 5 0 0 1-6.7 2.44L6.47 20h11.06l2.7-9.36a5 5 0 0 1-6.7-2.45L12 4.83 10.47 8.2Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconCustomerSupportStroked">
|
||||
M7 8a5 5 0 0 1 10 0v8a5 5 0 0 1-2.17 4.12.5.5 0 0 0-.33-.12h-4a.5.5 0 0 0-.5.5v2c0 .28.22.5.5.5h4a.5.5 0 0 0 .5-.5v-.17A7 7 0 0 0 18.93 17H21a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1h-2V8A7 7 0 1 0 5 8v1H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1V8Zm-3 7v-4h1v4H4Zm15-4v4h1v-4h-1Z
|
||||
</StreamGeometry>
|
||||
@@ -161,21 +198,42 @@
|
||||
<StreamGeometry x:Key="SemiIconExternalOpenStroked">
|
||||
M21 2a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V5.41l-9.3 9.3a1 1 0 0 1-1.4-1.42L18.58 4H15a1 1 0 1 1 0-2h6ZM2 5a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2H4v14h14v-7a1 1 0 1 1 2 0v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconEyeClosedStroked">
|
||||
M2.7 5.04c.54-.15 1.09.16 1.3.67.53 1.36 1.42 2.8 2.6 3.98a7.6 7.6 0 0 0 5.58 2.35 8.73 8.73 0 0 0 8.29-6.25c.17-.53.7-.87 1.23-.75.54.12.89.65.73 1.18a11.31 11.31 0 0 1-3.18 5.08l2.66 3.53a1 1 0 0 1-1.6 1.2l-2.66-3.53c-.77.46-1.6.83-2.5 1.09l1.49 4.09a1 1 0 1 1-1.88.68l-1.6-4.38a12.03 12.03 0 0 1-1.97.03l-1.58 4.35a1 1 0 1 1-1.88-.68l1.48-4.08a9.64 9.64 0 0 1-2.39-1.17l-2.71 3.6a1 1 0 0 1-1.6-1.2l2.76-3.66-.06-.06a13.75 13.75 0 0 1-3.15-4.85.94.94 0 0 1 .65-1.22Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconEyeClosedSolidStroked">
|
||||
M20.1 2.3a1 1 0 0 1 1.4 1.4L3.13 22.1a1 1 0 1 1-1.41-1.42l3.36-3.37C2.52 15.51 1 13.04 1 11.6c0-2.5 4.5-8 11-8 2.03 0 3.87.54 5.44 1.35l2.65-2.65ZM12 5.58c-2.67 0-4.97 1.13-6.62 2.57a9.39 9.39 0 0 0-1.86 2.15A3.1 3.1 0 0 0 3 11.6c0 .1.08.54.52 1.27.4.67 1.03 1.44 1.86 2.16.34.3.72.59 1.13.86l2.13-2.13a4 4 0 0 1 5.53-5.53l1.77-1.78A9.64 9.64 0 0 0 12 5.59Zm0 4a2 2 0 0 0-1.88 2.68l2.56-2.57A2 2 0 0 0 12 9.6Z
|
||||
M20.27 6.95C22 8.57 23 10.4 23 11.59c0 2.5-4.5 8-11 8-1.34 0-2.6-.24-3.74-.63l1.61-1.62c.68.16 1.39.25 2.13.25 2.67 0 4.97-1.14 6.62-2.57a9.39 9.39 0 0 0 1.86-2.16c.44-.73.52-1.17.52-1.27 0-.1-.08-.55-.52-1.28a9.2 9.2 0 0 0-1.63-1.95l1.42-1.41Z
|
||||
m-3.98 4.23.02.36a4 4 0 0 1-4.36 3.98l4.34-4.34Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconEyeOpenedStroked">
|
||||
M12 8a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z
|
||||
M12 4c6.5 0 11 5.5 11 8s-4.5 8-11 8-11-5.5-11-8 4.5-8 11-8Zm0 2C9.33 6 7.03 7.13 5.38 8.57a9.39 9.39 0 0 0-1.86 2.16A3.1 3.1 0 0 0 3 12c0 .1.08.55.52 1.27.4.68 1.03 1.44 1.86 2.16A10.14 10.14 0 0 0 12 18c2.67 0 4.97-1.13 6.62-2.57a9.39 9.39 0 0 0 1.86-2.16A3.1 3.1 0 0 0 21 12c0-.1-.08-.55-.52-1.27a9.39 9.39 0 0 0-1.86-2.16A10.14 10.14 0 0 0 12 6Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFillStroked">
|
||||
M7.42 2.17a1 1 0 0 1 1.41 0l9.43 9.44a1 1 0 0 1 0 1.41l-.02.02-6.7 6.7a2.5 2.5 0 0 1-3.53 0l-5.66-5.66a2.5 2.5 0 0 1 0-3.53l6.01-6.01-.94-.95a1 1 0 0 1 0-1.42Zm2.36 3.78 6.36 6.36-2.18 2.19H5.6l-1.83-1.83a.5.5 0 0 1 0-.71l6-6.01ZM21 19c0 1.1-.67 2-1.5 2s-1.5-.9-1.5-2c0-1.08.66-2.49 1.1-3.31a.44.44 0 0 1 .8 0c.44.82 1.1 2.23 1.1 3.31Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFilterStroked">
|
||||
M12.57 12.06 19.77 4H4.25l7.25 8.06v6.39l1.07.7v-7.09Zm2 8.94-.01.13a1 1 0 0 1-1.32.81l-.12-.05-3.07-2A1 1 0 0 1 9.5 19v-6.17L1.24 3.65A1 1 0 0 1 2 2h20a1 1 0 0 1 .76 1.65l-8.2 9.18V21Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFingerLeftStroked">
|
||||
M6.7 3.7a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L5.42 7h3.44v5.65c-.23-.26-.54-.5-.96-.61a2.98 2.98 0 0 0-1.54-.1c-.55.15-.93.5-1.14.96-.19.4-.22.84-.2 1.19 0 .36.05.73.1 1.07.15.93.64 2.85 4 6.52a1 1 0 0 0 .73.32h11a1 1 0 0 0 1-1v-7.47c0-.96-.33-1.7-.83-2.21a2.8 2.8 0 0 0-1.49-.8l-5.67-.87V7H21a1 1 0 1 0 0-2h-7.2a2.5 2.5 0 0 0-4.9 0H5.4l1.3-1.3Zm4.14 1.8a.5.5 0 1 1 1 0v5c0 .5.37.92.86 1 4 .6 6.14.93 6.47 1 .1 0 .26.07.4.22.12.12.27.35.27.81V20H10.3c-2.9-3.23-3.13-4.72-3.2-5.16A6.17 6.17 0 0 1 7 13.9c.08 0 .19.03.34.07l.07.1c.09.15.16.33.26.6l.05.14c.12.3.29.74.58 1.1.35.43.86.74 1.54.74v-.04c.34-.06.7-.25.82-.38.05-.08.11-.22.13-.27a.96.96 0 0 0 .05-.24 1.13 1.13 0 0 0 0-.1 12.2 12.2 0 0 0 0-.6v-9.5Zm-3.51 8.45Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFixedStroked">
|
||||
M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8-10c-2.4 0-4.6.85-6.33 2.26L4.31 2.89a1 1 0 0 0-1.42 1.42l1.37 1.36a9.96 9.96 0 0 0 0 12.66l-1.37 1.36a1 1 0 1 0 1.42 1.42l1.36-1.37a9.96 9.96 0 0 0 12.66 0l1.36 1.37a1 1 0 0 0 1.42-1.42l-1.37-1.36a9.96 9.96 0 0 0 0-12.66l1.37-1.36a1 1 0 0 0-1.42-1.42l-1.36 1.37A9.96 9.96 0 0 0 12 2Zm-2 10a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFlagStroked">
|
||||
M8 1c2.5 0 3.19.3 4.15.68L13 2c1.5.5 3 1 5 1 .89 0 1.78-.2 2.5-.42.7-.22 1.5.3 1.5 1.04v10.76c0 .38-.21.73-.56.87l-.3.12c-.78.28-1.96.63-3.14.63-2 0-3.5-.5-5-1-.31-.1-.58-.2-.84-.3-.98-.39-1.79-.7-4.16-.7-1.27 0-3.27.3-4 .5V21a1 1 0 0 1-.84.99h-.04a1 1 0 0 1-.24 0h-.04A1 1 0 0 1 2 21V3.58c0-.36.2-.69.51-.85C3.57 2.18 6.08 1 8 1Zm0 2c-.61 0-1.46.2-2.38.54-.6.22-1.17.47-1.62.68v8.37l.46-.13C5.36 12.21 6.54 12 8 12c1.27 0 2.2.08 3 .24.8.17 1.39.4 1.88.59l.75.27c1.5.5 2.73.9 4.37.9.68 0 1.4-.17 2-.36V4.78c-.61.13-1.3.22-2 .22-2.36 0-4.13-.6-5.63-1.1l-.95-.35c-.5-.2-.76-.3-1.17-.39a8.82 8.82 0 0 0-1.46-.15L8 3Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFlowChartStroked">
|
||||
M7.5 3a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v4.5a1 1 0 0 1-1 1H13V11h4.5a1 1 0 0 1 1 1v3.5H21a1 1 0 0 1 1 1V21a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 1-1h2.5V13h-9v2.5H10a1 1 0 0 1 1 1V21a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 1-1h2.5V12a1 1 0 0 1 1-1H11V8.5H8.5a1 1 0 0 1-1-1V3Zm-1 14.5H4V20h5v-2.5H6.5Zm11 0H15V20h5v-2.5h-2.5ZM9.5 4v2.5h5V4h-5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFolderStroked">
|
||||
M4 4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8.59L10 4.59A2 2 0 0 0 8.59 4H4Zm0 2h4.59l1 1-1 1H4V6Zm0 4v8h16V8h-8.59L10 9.41a2 2 0 0 1-1.41.59H4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFolderOpenStroked">
|
||||
M6.9 2a3 3 0 0 1 1.66.5l2 1.33a1 1 0 0 0 .55.17h5.75a3 3 0 0 1 3 3v.83h.74a2 2 0 0 1 1.94 2.6l-3.16 9.98a2 2 0 0 1-1.91 1.4H2a1 1 0 0 1-1-1V5a3 3 0 0 1 3-3h2.9ZM13 9.92h-.82l-3.52.05-1.45.02-1.07 2.95-2.47 6.86h13.8l3.16-9.98-7.62.1ZM4 4a1 1 0 0 0-1 1v10.76l1.26-3.5 1.06-2.95A2 2 0 0 1 7.18 8l4.98-.06 5.7-.07V7a1 1 0 0 0-1-1H11.1a3 3 0 0 1-1.67-.5l-2-1.33A1 1 0 0 0 6.9 4H4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconFollowStroked">
|
||||
M6 8c0 3.3 2.7 6 6 6s6-2.7 6-6-2.7-6-6-6-6 2.7-6 6Zm2 0c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4ZM2.12 20.56C2.35 20.05 4.65 15 12 15c0 0 1 0 1 1s-1 1-1 1c-6.2 0-8 4.2-8 4.4-.2.5-.8.7-1.3.5-.6-.2-.8-.8-.6-1.3l.02-.04ZM17 15a1 1 0 1 1 2 0v2h2a1 1 0 1 1 0 2h-2v2a1 1 0 1 1-2 0v-2h-2a1 1 0 1 1 0-2h2v-2Z
|
||||
</StreamGeometry>
|
||||
@@ -188,6 +246,12 @@
|
||||
<StreamGeometry x:Key="SemiIconGiftStroked">
|
||||
M8 3a3 3 0 0 0-2.83 4H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-8h1a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1h-2.17A3 3 0 0 0 16 3h-2c-.77 0-1.47.29-2 .76A2.99 2.99 0 0 0 10 3H8Zm5 6h7v2h-7V9Zm-2 0H4v2h7V9Zm0 4H6v7h5v-7Zm2 7h5v-7h-5v7ZM11 6v1H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1Zm6 0a1 1 0 0 1-1 1h-3V6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconGlobeStroked">
|
||||
M12.05 1a11.1 11.1 0 0 1 3.65.64A11 11 0 0 1 12.05 23h-.08a11.09 11.09 0 0 1-2.46-.29A11 11 0 0 1 12 1h.05Zm-.02 2A9.04 9.04 0 0 0 3 12h5.33a4.84 4.84 0 0 1 4.85 4.82v.08a.8.8 0 0 1-.8.73H9.69c-.52.07-.93.63-.93 1.68 0 .8.67 1.27 1.27 1.47.2.05.4.09.62.12l1.39.1a9 9 0 0 0 8.84-7.54c-.76.5-1.65.79-2.6.79a5.1 5.1 0 0 1-4.67-3.38H9.79c-.62 0-1.14-.5-1.03-1.11.58-3.17 2.72-4.5 5.39-4.46h.01c.17-.24.35-.47.54-.68l.2-.2c.28-.28.27-.74-.02-.95-.9-.3-1.86-.47-2.85-.47Zm-8.8 11a9 9 0 0 0 3.53 5.31c0-.8.16-1.66.64-2.37a2.86 2.86 0 0 1 2.39-1.32h1.12A2.85 2.85 0 0 0 8.33 14h-5.1Zm13.8-9.46c-.11.48-.35.93-.73 1.3a3.5 3.5 0 0 0-.47.57l-.6.92-1.1-.03c-1.01-.02-1.74.23-2.24.6a2.7 2.7 0 0 0-.77.97h3.85l.5 1.27c.53 1.34 1.66 2.11 2.8 2.11.57 0 1.11-.18 1.58-.51 0 0 .6-.39 1.05-1.07a9 9 0 0 0-3.87-6.13Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconGlobeStrokeStroked">
|
||||
M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22ZM9.5 17c.54 2.41 1.46 4 2.5 4s1.96-1.59 2.5-4h-5Zm-4.98 0a9.03 9.03 0 0 0 3.98 3.3c-.2-.42-.37-.86-.52-1.3-.2-.61-.38-1.28-.52-2H4.52Zm12.02 0c-.14.72-.32 1.39-.52 2-.15.44-.32.88-.53 1.3a9.03 9.03 0 0 0 4-3.3h-2.95Zm.39-7a28.65 28.65 0 0 1-.09 5h3.65a8.98 8.98 0 0 0 .28-5h-3.84Zm-7.85 0a26.56 26.56 0 0 0 .1 5h5.65a25.75 25.75 0 0 0 .1-5H9.07Zm-5.85 0a9.02 9.02 0 0 0 .28 5h3.65a27.95 27.95 0 0 1-.09-5H3.23Zm12.26-6.3c.2.42.38.86.53 1.3.3.89.53 1.9.7 3h3.34a9.03 9.03 0 0 0-4.57-4.3ZM12 3c-1.18 0-2.2 2.04-2.69 5h5.38c-.5-2.96-1.51-5-2.69-5Zm-3.5.7A9.03 9.03 0 0 0 3.94 8h3.35c.16-1.1.4-2.11.7-3 .14-.44.31-.88.51-1.3Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconGridStroked">
|
||||
M3 2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3Zm1 7V4h5v5H4Zm-1 4a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1H3Zm1 7v-5h5v5H4Zm9-17a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V3Zm2 1v5h5V4h-5Zm-1 9a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1h-7Zm1 7v-5h5v5h-5Z
|
||||
</StreamGeometry>
|
||||
@@ -202,9 +266,16 @@
|
||||
<StreamGeometry x:Key="SemiIconHomeStroked">
|
||||
M11.39 2.21a1 1 0 0 1 1.22 0l9 7A1 1 0 0 1 22 10v11a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-7h-4v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10c0-.3.14-.6.39-.79l9-7ZM4 10.5V20h4v-7a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v7h4v-9.51l-8-6.22-8 6.22Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconHornStroked">
|
||||
M16.42 1.37c.45-.05.82.64.82.64.01.03 1 1.52 1.56 6.94.56 5.43.05 7.1.04 7.12 0 0-.2.76-.65.81l-.15.01c-.62.04-1-.17-1.6-.67l-.28-.25a8.89 8.89 0 0 0-6.84-2c-.46.03-.91.09-1.37.14l-.68.09a2.93 2.93 0 0 1-2.97-1.64l-.16.03c-1 .11-1.92-.56-2.13-1.52l-.03-.2A1.95 1.95 0 0 1 3.86 8.7c.25-1.1 1.14-2 2.3-2.22l.23-.04.68-.08.68-.09.69-.06a8.76 8.76 0 0 0 5.93-3.19l.3-.37c.64-.82 1.16-1.22 1.75-1.28Zm-.46 2.86a10.75 10.75 0 0 1-7.3 3.96h-.05l-1.3.15-.7.09c-.4.04-.8.71-.8.71s-.36.8-.3 1.33.6 1.22.6 1.22.54.57.93.52l.66-.08c.44-.06.94-.12 1.46-.16a10.95 10.95 0 0 1 7.89 2.15c.03-1 0-2.59-.24-4.96-.25-2.44-.58-4-.85-4.93Zm4.65 1.73a2.93 2.93 0 0 1 .63 5.5l-.09.04c-.46.14-.9-.24-.95-.74 0-.02-.04-1-.16-1.96-.12-.97-.29-1.92-.29-1.92.01-.02.34-1.03.86-.92Z
|
||||
m-11.16 9.75.06.02.03.05.16.32a34.43 34.43 0 0 1 1.04 2.79c.14.42.09.66.02.8-.07.15-.23.3-.53.42l-.08.03a.9.9 0 0 1-.94-.26l-.05-.07a58.16 58.16 0 0 1-2.52-3.81l.34-.02c.64-.05 1.09-.1 1.57-.17l.44-.06h.05c.21-.04.32-.05.4-.04Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconHourglassStroked">
|
||||
M4 1a1 1 0 0 0 0 2h1v5c0 .27.1.52.3.7L8.58 12l-3.3 3.3A1 1 0 0 0 5 16v5H4a1 1 0 1 0 0 2h16a1 1 0 1 0 0-2h-1v-5a1 1 0 0 0-.3-.7L15.42 12l3.3-3.3A1 1 0 0 0 19 8V3h1a1 1 0 1 0 0-2H4Zm9.3 10.3L17 7.58V3H7v4.59l3.7 3.7a1 1 0 0 1 0 1.42L7 16.4V21h10v-4.59l-3.7-3.7a1 1 0 0 1 0-1.42ZM9 7a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1Zm0 11a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H9Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconIdCardStroked">
|
||||
M20 3a3 3 0 0 1 3 3v11a3 3 0 0 1-2.85 3H3.85A3 3 0 0 1 1 17.15V6a3 3 0 0 1 3-3h16ZM4 5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H4Zm4 8.86c1.67 0 3.13.51 3.85 1.26.37.39 0 .88-.55.88H4.7c-.54 0-.92-.5-.55-.88.72-.75 2.18-1.26 3.85-1.26Zm9-.86a1 1 0 1 1 0 2h-3a1 1 0 1 1 0-2h3ZM8 7c1.6 0 2.35.73 2.39 2.63.4.15.43.64.28 1.18-.11.42-.36.74-.62.84-.42 1.07-1.19 1.78-2.05 1.78-.86 0-1.63-.71-2.05-1.78-.26-.1-.51-.42-.62-.84-.15-.54-.12-1.03.28-1.18C5.65 7.73 6.41 7 8 7Zm11 2a1 1 0 1 1 0 2h-5a1 1 0 1 1 0-2h5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconImageStroked">
|
||||
M2 4c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm18 0H4v16h16V4ZM9 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM6 9a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm11.7 1.8a1 1 0 0 0-1.4 0l-3.87 3.86-1.8-1.44a1 1 0 0 0-1.34.07l-3.5 3.5a1 1 0 1 0 1.42 1.42l2.86-2.87 1.8 1.44a1 1 0 0 0 1.34-.07L17 12.9l.8.8a1 1 0 0 0 1.4-1.42l-1.5-1.5Z
|
||||
</StreamGeometry>
|
||||
@@ -254,6 +325,15 @@
|
||||
<StreamGeometry x:Key="SemiIconMarginStroked">
|
||||
M4 2a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm9 2h7v7h-2a1 1 0 1 0 0 2h2v7h-7v-2a1 1 0 1 0-2 0v2H4v-7h2a1 1 0 1 0 0-2H4V4h7v2a1 1 0 1 0 2 0V4ZM9 8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1H9Zm1 6v-4h4v4h-4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMicrophoneStroked">
|
||||
M16 21a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h8Zm3-10.5a1 1 0 0 1 1 1 8 8 1 1 1-16 0 1 1 0 1 1 2 0 6 6 0 0 0 12 0 1 1 0 0 1 1-1ZM12 1a4.5 4.5 0 0 1 4.5 4.5v6a4.5 4.5 1 1 1-9 0v-6A4.5 4.5 0 0 1 12 1Zm0 2a2.5 2.5 0 0 0-2.5 2.5v6a2.5 2.5 0 0 0 5 0v-6A2.5 2.5 0 0 0 12 3Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMicrophoneOffStroked">
|
||||
M16 21a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h8Z
|
||||
M12 1a4.5 4.5 0 0 1 4.5 4.3l3.6-3.6a1 1 0 0 1 1.4 1.42L3.13 21.51a1 1 0 1 1-1.41-1.42l3.85-3.85A7.96 7.96 0 0 1 4 11.5a1 1 0 1 1 2 0c0 1.22.37 2.36 1 3.3l1.08-1.09a4.47 4.47 0 0 1-.57-1.98l-.01-.23v-6A4.5 4.5 0 0 1 12 1Zm0 2a2.5 2.5 0 0 0-2.5 2.5v6c0 .24.03.48.1.7l4.9-4.9V5.5A2.5 2.5 0 0 0 12 3Z
|
||||
M19 10.5a1 1 0 0 1 1 1 8 8 0 0 1-11.87 7L9.62 17A6 6 0 0 0 18 11.5a1 1 0 0 1 1-1Z
|
||||
M16.5 11.5v.23a4.5 4.5 0 0 1-5.7 4.1l1.94-1.94a2.5 2.5 0 0 0 1.65-1.65l2.11-2.11v1.37Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMinusCircleStroked">
|
||||
M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm9-11a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z
|
||||
</StreamGeometry>
|
||||
@@ -269,6 +349,9 @@
|
||||
<StreamGeometry x:Key="SemiIconMonitorStroked">
|
||||
M1 5c0-1.1.9-2 2-2h18a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-8v2h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3v-2H3a2 2 0 0 1-2-2V5Zm20 10H3V5h18v10Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMoonStroked">
|
||||
M8.27 8.36c0-2.04.84-3.9 2.19-5.23a9 9 0 1 0 10.4 10.41 7.36 7.36 0 0 1-12.6-5.18Zm2 0a5.36 5.36 0 0 0 9.86 2.93l.08-.11c.4-.51 1.02-.67 1.52-.6.55.08 1.27.52 1.27 1.42A11 11 0 1 1 12 1c.9 0 1.34.72 1.42 1.27.08.53-.1 1.2-.7 1.6a5.36 5.36 0 0 0-2.45 4.5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMoreStroked">
|
||||
M7.5 12a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z
|
||||
M15 12a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z
|
||||
@@ -277,6 +360,9 @@
|
||||
<StreamGeometry x:Key="SemiIconMusicNoteStroked">
|
||||
M11.3 2.29a1 1 0 0 1 .95-.26l6.42 1.5c.45.1.77.51.77.98v4.05a1 1 0 0 1-1.23.97L13 8.3v10.18A3.52 3.52 0 0 1 9.48 22H7.52A3.52 3.52 0 0 1 4 18.48v-.46a3.52 3.52 0 0 1 3.52-3.52H11V3a1 1 0 0 1 .3-.71ZM13 6.24l4.44 1.06v-2L13 4.26v1.98ZM7.52 16.5H11v1.98c0 .84-.68 1.52-1.52 1.52H7.52C6.68 20 6 19.32 6 18.48v-.46c0-.84.68-1.52 1.52-1.52Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconMuteStroked">
|
||||
M10.38 2.22A1 1 0 0 1 12 3v18a1 1 0 0 1-1.63.78L4.66 17H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.65l5.72-4.78ZM5.92 8.54A2 2 0 0 1 4.65 9H3v6h1.65a2 2 0 0 1 1.28.46l4.07 3.4V5.14l-4.07 3.4Zm14.14-.83a1 1 0 0 1 1.42 1.41L19 11.6l2.48 2.47a1 1 0 1 1-1.42 1.42L17.6 13l-2.48 2.48a1 1 0 0 1-1.41-1.42l2.47-2.47-2.47-2.48a1 1 0 0 1 1.41-1.41l2.48 2.47 2.47-2.47Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconNineGridStroked">
|
||||
M5 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM2 5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm3 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm-3-1a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm2 7a1 1 0 1 0 2 0 1 1 0 0 0-2 0Zm1-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm7-10a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM9 5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm2 7a1 1 0 1 0 2 0 1 1 0 0 0-2 0Zm1-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 11a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm-3-1a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm7-14a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm2 7a1 1 0 1 0 2 0 1 1 0 0 0-2 0Zm1-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 11a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm-3-1a3 3 0 1 1 6 0 3 3 0 0 1-6 0Z
|
||||
</StreamGeometry>
|
||||
@@ -286,6 +372,12 @@
|
||||
<StreamGeometry x:Key="SemiIconOrderedListStroked">
|
||||
M5 4.5V9h.5c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5H3V5h-.5a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5v1Zm3 0c0-.28.22-.5.5-.5h12c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-12a.5.5 0 0 1-.5-.5v-1Zm0 10c0-.28.22-.5.5-.5h12c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-12a.5.5 0 0 1-.5-.5v-1ZM8.5 8a.5.5 0 0 0-.5.5v1c0 .28.22.5.5.5h7a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-7ZM8 18.5c0-.28.22-.5.5-.5h7c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-1Zm-6-5c0-.28.22-.5.5-.5h3c.28 0 .5.22.5.5v4a.5.5 0 0 1-.5.5H4v1h1.5c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4c0-.28.22-.5.5-.5H4v-1H2.5a.5.5 0 0 1-.5-.5v-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconPaperclipStroked">
|
||||
M2.66 15.62a6.48 6.48 0 0 0 1.93 4.85 6.48 6.48 0 0 0 4.85 1.93 6.03 6.03 0 0 0 3.99-1.58l3.71-3.7c.7-.72 1.37-1.38 1.86-1.87l.58-.58.16-.15.04-.05h.01v-.01a1 1 0 1 0-1.41-1.41h-.01l-.05.05-.16.16-.58.58-1.85 1.86-3.71 3.7A4.48 4.48 0 0 1 6 19.06a4.48 4.48 0 0 1-1.35-3.37c.04-1.16.5-2.14 1-2.64l8.83-8.83a2.7 2.7 0 0 1 1.5-.6 2.9 2.9 0 0 1 2.39.95 2.9 2.9 0 0 1 .95 2.38 2.7 2.7 0 0 1-.6 1.5l-7.07 7.08c-.15.15-.52.34-1 .37-.44.03-.84-.09-1.12-.37-.28-.28-.4-.68-.37-1.13.03-.47.22-.84.37-1l2.92-2.9 1.66-1.67.53-.53.14-.14.04-.04.01-.01a1 1 0 1 0-1.41-1.42l-5.3 5.3c-.56.56-.9 1.43-.96 2.28-.06.88.18 1.9.96 2.67.78.79 1.8 1.02 2.67.96.85-.06 1.72-.4 2.28-.96l7.07-7.07a4.64 4.64 0 0 0 1.17-2.74 4.9 4.9 0 0 0-1.53-3.97 4.9 4.9 0 0 0-3.98-1.53c-1.18.1-2.2.64-2.73 1.17l-8.84 8.84a6.03 6.03 0 0 0-1.58 3.99Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconPhoneStroked">
|
||||
M5.9 1.59a2.11 2.11 0 0 1 2.89.77l2.78 4.81c.58 1.01.23 2.3-.77 2.89l-1.55.89h-.01v.01a36.9 36.9 0 0 0 3.92 3.82h.01l.01-.01 1.08-1.87a2.11 2.11 0 0 1 2.88-.77l4.81 2.78c1.01.58 1.36 1.87.77 2.88l-2.22 3.85a2.11 2.11 0 0 1-2.21 1.02h-.03l-.02-.01a23.67 23.67 0 0 1-11.26-6.3 23.68 23.68 0 0 1-5.8-9.43V6.9a4.8 4.8 0 0 1-.15-.73 2.8 2.8 0 0 1 0-.88l.01-.05A2.1 2.1 0 0 1 2.06 3.8L5.9 1.59Zm1 1.73L3.07 5.54a.11.11 0 0 0-.06.08v.1L3 5.9c.02.16.05.31.08.4a21.68 21.68 0 0 0 5.3 8.63 21.67 21.67 0 0 0 10.27 5.76c.05 0 .09-.01.11-.05l2.22-3.85a.11.11 0 0 0-.04-.15l-4.81-2.78a.11.11 0 0 0-.15.04l-1.08 1.87a2 2 0 0 1-3.03.55 38.68 38.68 0 0 1-4.14-4.03 2 2 0 0 1 .51-3.08l1.55-.89c.05-.03.07-.1.04-.15L7.06 3.36a.11.11 0 0 0-.15-.04Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconPieChart2Stroked">
|
||||
M11 3.05a9 9 0 1 0 6.62 15.98l-6.47-6.47a.5.5 0 0 1-.15-.35V3.05Zm2 0V11h7.95A9 9 0 0 0 13 3.05ZM14.41 13l4.62 4.62A8.96 8.96 0 0 0 20.95 13H14.4ZM1 12a11 11 0 1 1 22 0 11 11 0 0 1-22 0Z
|
||||
</StreamGeometry>
|
||||
@@ -326,9 +418,15 @@
|
||||
M19 4a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 5V6H5v3h14Z
|
||||
M19 13a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3c0-1.1.9-2 2-2h14Zm0 5v-3H5v3h14Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconSafeStroked">
|
||||
M11.44 1.08c.37-.1.77-.1 1.15 0l8.7 2.64c.42.12.7.5.7.93.03 2.65-.03 11.8-2 14.36-1.97 2.57-6.36 3.68-7.63 3.95a1.6 1.6 0 0 1-.7 0c-1.24-.28-5.5-1.39-7.62-3.95C1.9 16.44 1.96 7.27 2.02 4.64c.01-.43.3-.8.7-.92l8.72-2.64ZM4.01 5.42c-.02 1.47 0 3.88.19 6.26.12 1.42.3 2.79.56 3.92.28 1.2.6 1.87.82 2.14A9.01 9.01 0 0 0 8.96 20c1.27.54 2.47.85 3.06.99.6-.14 1.83-.45 3.12-.99a8.15 8.15 0 0 0 3.26-2.2c.22-.28.52-.97.79-2.18.25-1.14.44-2.51.56-3.94.21-2.38.25-4.78.25-6.26L12 3l-8 2.42Zm11.02 2.7a1.38 1.38 0 0 1 2.05-.1c.52.53.55 1.36.06 1.92l-5.42 6.25a1 1 0 0 1-1.45.05l-3.24-3.26a1.43 1.43 0 0 1 0-2.02 1.4 1.4 0 0 1 2 0l1.99 2.02 4.01-4.86Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconSaveStroked">
|
||||
M2 4c0-1.1.9-2 2-2h10.96a2 2 0 0 1 1.41.59l5.04 5.04a2 2 0 0 1 .59 1.4V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm9 0H8v3h3V4ZM6 4v4a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V4h1.96L20 9.04V20h-2v-5a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v5H4V4h2Zm10 12v4H8v-4h8Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconScissorsStroked">
|
||||
M20 18.5a1.5 1.5 0 1 0-2.84.67l.03.05.01.03a1.5 1.5 0 0 0 2.8-.75Zm-16 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0Zm18 0a3.5 3.5 0 0 1-6.61 1.6l-1-1.79-2.36-4.08-2.41 4.18-1.04 1.75a3.5 3.5 0 1 1-.19-3.63l2.48-4.3L5.88 3.6a1 1 0 0 1 1.73-1l4.42 7.64 4.35-7.54a1 1 0 0 1 1.74 1l-4.94 8.54 2.46 4.25A3.5 3.5 0 0 1 22 18.5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconSearchStroked">
|
||||
M16 10a6 6 0 1 1-12 0 6 6 0 0 1 12 0Zm-1.1 6.32a8 8 0 1 1 1.41-1.41l5.4 5.38a1 1 0 0 1-1.42 1.42l-5.38-5.39Z
|
||||
</StreamGeometry>
|
||||
@@ -353,6 +451,10 @@
|
||||
<StreamGeometry x:Key="SemiIconShareStroked">
|
||||
M14 5.5a3.5 3.5 0 1 1 1 2.45l-5.13 3.11a3.5 3.5 0 0 1 .03 1.79l5.22 3.08A3.49 3.49 0 0 1 21 18.5a3.5 3.5 0 1 1-6.9-.85l-5.22-3.08A3.49 3.49 0 0 1 3 12a3.5 3.5 0 0 1 5.8-2.63l5.27-3.19A3.51 3.51 0 0 1 14 5.5ZM17.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm-11 6.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm9.5 8a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconShoppingBagStroked">
|
||||
M18 5a1 1 0 0 1 1 1A7 7 0 1 1 5 6a1 1 0 0 1 2 0 5 5 0 0 0 10 0 1 1 0 0 1 1-1Z
|
||||
M19 2a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H4.85A3 3 0 0 1 2 19V5a3 3 0 0 1 3-3h14ZM5 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconShrinkScreenStroked">
|
||||
M3.7 2.3a1 1 0 0 0-1.4 1.4l5.79 5.8H4.5a1 1 0 0 0 0 2h6a1 1 0 0 0 1-1v-6a1 1 0 1 0-2 0v3.59l-5.8-5.8Zm8.88 10.82a1 1 0 0 0-.08.38v6a1 1 0 1 0 2 0v-3.59l5.8 5.8a1 1 0 0 0 1.4-1.42l-5.79-5.79h3.59a1 1 0 1 0 0-2h-6a1 1 0 0 0-.7.29l-.01.01a1 1 0 0 0-.21.32Z
|
||||
</StreamGeometry>
|
||||
@@ -381,6 +483,9 @@
|
||||
<StreamGeometry x:Key="SemiIconStoryStroked">
|
||||
M20.36 12a8.36 8.36 0 1 1-16.72 0 8.36 8.36 0 0 1 16.72 0ZM23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-5.45-2.15A1.32 1.32 0 1 0 15.7 8l-5.67 5.66-2.37-2.36a1.32 1.32 0 0 0-1.86 1.86l3.3 3.3a1.32 1.32 0 0 0 1.86 0l6.6-6.6Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconSunStroked">
|
||||
M12 20c.83 0 1.5.67 1.5 1.5v1a1.5 1.5 0 0 1-3 0v-1c0-.83.67-1.5 1.5-1.5Zm-7.78-2.34a1.5 1.5 0 1 1 2.12 2.12l-.7.7a1.5 1.5 0 0 1-2.13-2.12l.71-.7Zm13.44 0a1.5 1.5 0 0 1 2.12 0l.7.7a1.5 1.5 0 0 1-2.12 2.13l-.7-.71a1.5 1.5 0 0 1 0-2.12ZM12 5a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm-9.5 3.5a1.5 1.5 0 0 1 0 3h-1a1.5 1.5 0 0 1 0-3h1Zm20 0a1.5 1.5 0 0 1 0 3h-1a1.5 1.5 0 0 1 0-3h1ZM3.51 3.51a1.5 1.5 0 0 1 2.13 0l.7.71a1.5 1.5 0 1 1-2.12 2.12l-.7-.7a1.5 1.5 0 0 1 0-2.13Zm14.85 0a1.5 1.5 0 0 1 2.13 2.13l-.71.7a1.5 1.5 0 1 1-2.12-2.12l.7-.7ZM12 0c.83 0 1.5.67 1.5 1.5v1a1.5 1.5 0 0 1-3 0v-1c0-.83.67-1.5 1.5-1.5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconTabArrowStroked">
|
||||
M2 5c0-1.1.9-2 2-2h11a1 1 0 1 1 0 2H4v14h16v-8a1 1 0 1 1 2 0v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5Z
|
||||
M18.3 8.7a1 1 0 0 1 0-1.4L19.58 6l-1.3-1.3a1 1 0 0 1 1.42-1.4l2 2a1 1 0 0 1 0 1.4l-2 2a1 1 0 0 1-1.42 0Z
|
||||
@@ -435,6 +540,11 @@
|
||||
<StreamGeometry x:Key="SemiIconUnlockStroked">
|
||||
M12 3a3 3 0 0 0-3 3v2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10c0-1.1.9-2 2-2h1V6a5 5 0 0 1 10 0h-2a3 3 0 0 0-3-3ZM6 20h12V10H6v10Zm8-5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconUserCardVideoStroked">
|
||||
M8 11H5V8h3v3Z
|
||||
M14 4a2 2 0 0 1 2 2v12a2 2 0 0 1-1.8 1.99L14 20H3l-.2-.01A2 2 0 0 1 1 18V6c0-1.1.9-2 2-2h11ZM3 18h11V6H3v12Z
|
||||
M21.55 6.72a1 1 0 0 1 1.45.9v8.76a1 1 0 0 1-1.45.9l-4-2a1 1 0 0 1-.55-.9V9.62a1 1 0 0 1 .55-.9l4-2ZM19 10.24v3.52l2 1V9.24l-2 1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconUserCircleStroked">
|
||||
M23.03 12.03a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-4.3 6.01A9 9 0 1 0 5.3 18a7.02 7.02 0 0 1 3.57-4.25A4.49 4.49 0 0 1 12 6a4.5 4.5 0 0 1 3.13 7.74 7.02 7.02 0 0 1 3.6 4.3Zm-1.75 1.5a5 5 0 0 0-9.96-.03 8.96 8.96 0 0 0 9.96.04ZM12 13a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z
|
||||
</StreamGeometry>
|
||||
@@ -464,6 +574,17 @@
|
||||
<StreamGeometry x:Key="SemiIconVideoUrlStroked">
|
||||
M4 2a2 2 0 0 0-2 2v16c0 1.1.9 2 2 2h4a1 1 0 1 0 0-2H4V4h16v10a1 1 0 1 0 2 0V4a2 2 0 0 0-2-2H4Zm5.5 5.13A1 1 0 0 0 8 8v8a1 1 0 0 0 1.5.87l7-4a1 1 0 0 0 0-1.74l-7-4ZM13.98 12 10 14.28V9.72L13.98 12ZM11 17h1v4h1v-4h1v4.5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5V17Zm9 0h-1v4.5c0 .28.22.5.5.5H22v-1h-2v-4Zm-4.5 0a.5.5 0 0 0-.5.5V22h1v-2h.17l.83 2h1l-.77-2h.27a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-2Zm1.5 1h-1v1h1v-1Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconVolume1Stroked">
|
||||
M10.38 2.22A1 1 0 0 1 12 3v18a1 1 0 0 1-1.63.78L4.66 17H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.65l5.72-4.78ZM5.92 8.54A2 2 0 0 1 4.65 9H3v6h1.65a2 2 0 0 1 1.28.46l4.07 3.4V5.14l-4.07 3.4Z
|
||||
M14.17 8.45a1 1 0 0 1 1.38-.28l.12.08.23.19A4.84 4.84 0 0 1 17.5 12a4.7 4.7 0 0 1-1.83 3.75l-.11.08a1 1 0 0 1-1.12-1.66l.13-.1c.1-.1.24-.23.38-.42.28-.37.55-.92.55-1.65a2.7 2.7 0 0 0-1.06-2.17 1 1 0 0 1-.27-1.38Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconVolume2Stroked">
|
||||
M10.38 2.22A1 1 0 0 1 12 3v18a1 1 0 0 1-1.63.78L4.66 17H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.65l5.72-4.78ZM5.92 8.54A2 2 0 0 1 4.65 9H3v6h1.65a2 2 0 0 1 1.28.46l4.07 3.4V5.14l-4.07 3.4Z
|
||||
M20 12c0-2.03-.86-3.56-1.76-4.6a8.55 8.55 0 0 0-1.74-1.54 1 1 0 1 1 1-1.72l.07.04a5.55 5.55 0 0 1 .67.47c.42.32.97.8 1.52 1.45A8.98 8.98 0 0 1 22 12a8.98 8.98 0 0 1-2.24 5.9 10.56 10.56 0 0 1-2.19 1.92l-.06.04a1 1 0 0 1-1.01-1.72l.12-.08.4-.29c.32-.26.77-.65 1.22-1.17A6.98 6.98 0 0 0 20 12Zm-5.56 2.17.13-.1c.1-.1.24-.23.38-.42.28-.37.55-.92.55-1.65a2.7 2.7 0 0 0-1.06-2.17 1 1 0 0 1 1.11-1.66l.12.08.23.19A4.84 4.84 0 0 1 17.5 12a4.7 4.7 0 0 1-1.83 3.75l-.11.08a1 1 0 0 1-1.12-1.66Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconVolumeSilentStroked">
|
||||
M10.38 2.22A1 1 0 0 1 12 3v18a1 1 0 0 1-1.63.78L4.66 17H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.65l5.72-4.78ZM5.92 8.54A2 2 0 0 1 4.65 9H3v6h1.65a2 2 0 0 1 1.28.46l4.07 3.4V5.14l-4.07 3.4Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconVoteStroked">
|
||||
M5 4.5C5 3.67 5.67 3 6.5 3h11c.83 0 1.5.67 1.5 1.5v11c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 5 15.5v-11ZM7 5v10h10V5H7ZM5 19.5c0-.28.22-.5.5-.5h13c.28 0 .5.22.5.5v1a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-1ZM2 14a1 1 0 0 0-1 1v5.5c0 .28.22.5.5.5h1a.5.5 0 0 0 .5-.5V16h.5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H2Zm19 2h-.5a.5.5 0 0 1-.5-.5v-1c0-.28.22-.5.5-.5H22a1 1 0 0 1 1 1v5.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V16Zm-5.3-7.3a1 1 0 0 0-1.4-1.4L11 10.58l-1.3-1.3a1 1 0 0 0-1.4 1.42l2 2a1 1 0 0 0 1.4 0l4-4Z
|
||||
</StreamGeometry>
|
||||
@@ -474,6 +595,9 @@
|
||||
M14 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V4h-5a1 1 0 0 1-1-1Zm-4 18a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-6a1 1 0 1 1 2 0v5h5a1 1 0 0 1 1 1ZM2 9a1 1 0 0 0 2 0V4h5a1 1 0 1 0 0-2H3a1 1 0 0 0-1 1v6Zm19 5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-6a1 1 0 1 1 0-2h5v-5a1 1 0 0 1 1-1ZM8.5 7.5a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1h-7Zm1 7v-5h5v5h-5Z
|
||||
</StreamGeometry>
|
||||
|
||||
<StreamGeometry x:Key="SemiIconWrenchStroked">
|
||||
M13.92 8.46a5.46 5.46 0 0 0-6.61-5.34l2.13 2.13c.75.76.75 1.97 0 2.72L7.97 9.44c-.75.75-1.96.75-2.72 0L3.12 7.3a5.48 5.48 0 0 0 5.34 6.61c.7 0 1.36-.13 1.97-.37l.61-.23 7.43 7.43c.33.33.87.33 1.2 0l1.08-1.08a.85.85 0 0 0 0-1.2l-7.43-7.43.23-.6c.24-.62.37-1.28.37-1.98Zm2 0c0 .72-.1 1.4-.29 2.06l6.54 6.54a2.85 2.85 0 0 1 0 4.03l-1.09 1.08a2.85 2.85 0 0 1-4.02 0l-6.54-6.54a7.46 7.46 0 0 1-8.99-9.94l.09-.18c.48-.86 1.62-.91 2.25-.28l2.74 2.74L7.97 6.6 5.23 3.87c-.67-.67-.57-1.93.46-2.34l.33-.12a7.45 7.45 0 0 1 9.9 7.05Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="SemiIconConfigStroked">
|
||||
M16.95 4.24c0-.63.5-1.13 1.13-1.13h3.31a1.13 1.13 0 0 1 0 2.25h-3.31c-.62 0-1.13-.5-1.13-1.12Z
|
||||
M13.66.9c.62 0 1.12.5 1.12 1.13v4.42a1.13 1.13 0 0 1-2.25 0V2.03c0-.63.5-1.13 1.13-1.13Z
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Avalonia.Metadata;
|
||||
|
||||
[assembly: XmlnsPrefix("https://irihi.tech/semi", "semi")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.Converters")]
|
||||
[assembly:XmlnsPrefix("https://irihi.tech/semi", "semi")]
|
||||
[assembly:XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia")]
|
||||
@@ -1,15 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.0-preview1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 12.0.0-preview1</PackageReleaseNotes>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Version>11.3.7.3</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 11.3.7.3</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Irihi.Avalonia.Shared"/>
|
||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorBackground1" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="CommandBarBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar overflow popup -->
|
||||
<StaticResource x:Key="CommandBarOverflowBackground" ResourceKey="SemiColorBackground3" />
|
||||
<StaticResource x:Key="CommandBarOverflowBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="CommandBarOverflowBoxShadow" ResourceKey="SemiShadowElevated" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,7 +7,6 @@
|
||||
<StaticResource x:Key="TextBoxPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<StaticResource x:Key="TextBoxFocusBorderBrush" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="TextBoxForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TextBoxPlaceholderForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="TextBoxInnerForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="TextBoxDisabledBackground" ResourceKey="SemiColorDisabledFill" />
|
||||
<StaticResource x:Key="TextBoxDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
<ResourceInclude Source="DataValidationErrors.axaml" />
|
||||
<ResourceInclude Source="DatePicker.axaml" />
|
||||
<ResourceInclude Source="DateTimePickerShared.axaml" />
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorButtonText" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorWindowText" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorWindow" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="CommandBarBorderBrush" ResourceKey="SemiColorWindowText" />
|
||||
<!-- CommandBar overflow popup -->
|
||||
<StaticResource x:Key="CommandBarOverflowBackground" ResourceKey="SemiColorWindow" />
|
||||
<StaticResource x:Key="CommandBarOverflowBorderBrush" ResourceKey="SemiColorWindowText" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,7 +7,6 @@
|
||||
<StaticResource x:Key="TextBoxPressedBackground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="TextBoxFocusBorderBrush" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="TextBoxForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="TextBoxPlaceholderForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="TextBoxInnerForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="TextBoxDisabledBackground" ResourceKey="SemiColorWindow" />
|
||||
<StaticResource x:Key="TextBoxDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
<ResourceInclude Source="DataValidationErrors.axaml" />
|
||||
<ResourceInclude Source="DatePicker.axaml" />
|
||||
<ResourceInclude Source="DateTimePickerShared.axaml" />
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorBackground1" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="CommandBarBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar overflow popup -->
|
||||
<StaticResource x:Key="CommandBarOverflowBackground" ResourceKey="SemiColorBackground3" />
|
||||
<StaticResource x:Key="CommandBarOverflowBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="CommandBarOverflowBoxShadow" ResourceKey="SemiShadowElevated" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,7 +7,6 @@
|
||||
<StaticResource x:Key="TextBoxPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<StaticResource x:Key="TextBoxFocusBorderBrush" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="TextBoxForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TextBoxPlaceholderForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="TextBoxInnerForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="TextBoxDisabledBackground" ResourceKey="SemiColorDisabledFill" />
|
||||
<StaticResource x:Key="TextBoxDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
<ResourceInclude Source="DataValidationErrors.axaml" />
|
||||
<ResourceInclude Source="DatePicker.axaml" />
|
||||
<ResourceInclude Source="DateTimePickerShared.axaml" />
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<x:Double x:Key="AppBarButtonWidth">68</x:Double>
|
||||
<x:Double x:Key="AppBarButtonCompactWidth">40</x:Double>
|
||||
<x:Double x:Key="AppBarButtonMinHeight">40</x:Double>
|
||||
<x:Double x:Key="AppBarButtonIconSize">20</x:Double>
|
||||
<Thickness x:Key="AppBarButtonPadding">8 4</Thickness>
|
||||
<StaticResource x:Key="AppBarButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="AppBarButtonLabelFontSize" ResourceKey="SemiFontSizeSmall" />
|
||||
<x:Double x:Key="AppBarButtonOverflowMinHeight">36</x:Double>
|
||||
<Thickness x:Key="AppBarButtonOverflowPadding">12 6</Thickness>
|
||||
<!-- AppBarSeparator -->
|
||||
<x:Double x:Key="AppBarSeparatorWidth">1</x:Double>
|
||||
<x:Double x:Key="AppBarSeparatorMinHeight">24</x:Double>
|
||||
<Thickness x:Key="AppBarSeparatorMargin">8 4</Thickness>
|
||||
<x:Double x:Key="AppBarSeparatorOverflowHeight">1</x:Double>
|
||||
<Thickness x:Key="AppBarSeparatorOverflowMargin">4 4</Thickness>
|
||||
<!-- CommandBar -->
|
||||
<x:Double x:Key="CommandBarMinHeight">48</x:Double>
|
||||
<Thickness x:Key="CommandBarPadding">4 0</Thickness>
|
||||
<StaticResource x:Key="CommandBarCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<StaticResource x:Key="CommandBarBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
<!-- CommandBar overflow popup -->
|
||||
<StaticResource x:Key="CommandBarOverflowCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<Thickness x:Key="CommandBarOverflowPadding">0 4</Thickness>
|
||||
<x:Double x:Key="CommandBarOverflowMinWidth">160</x:Double>
|
||||
<!-- Overflow button glyph -->
|
||||
<StaticResource x:Key="CommandBarOverflowButtonGlyph" ResourceKey="SemiIconMore" />
|
||||
</ResourceDictionary>
|
||||
@@ -11,7 +11,6 @@
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
<ResourceInclude Source="DataValidationErrors.axaml" />
|
||||
<ResourceInclude Source="DatePicker.axaml" />
|
||||
<ResourceInclude Source="DateTimePickerShared.axaml" />
|
||||
|
||||
Reference in New Issue
Block a user