mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45b1c9ab73 | ||
|
|
b780b793c8 | ||
|
|
de6dc99efb | ||
|
|
71b1c38ec4 | ||
|
|
992017951b | ||
|
|
a796cb828b | ||
|
|
3b41331c67 | ||
|
|
a6711ab453 | ||
|
|
9eab777faa | ||
|
|
ccdbf25004 | ||
|
|
626dff4e69 | ||
|
|
054b6f59d5 | ||
|
|
32687b1820 | ||
|
|
d0b9f2d7c9 | ||
|
|
a671ee3fcb | ||
|
|
67c0db10ac | ||
|
|
6cda56a830 | ||
|
|
d7690e464b | ||
|
|
41811a84a9 | ||
|
|
51abb760c9 | ||
|
|
f4c0e0d79a | ||
|
|
c3c6ef629f | ||
|
|
de08d4a20f | ||
|
|
9f432ddee6 | ||
|
|
21635cfb56 | ||
|
|
1d54b8ca4b | ||
|
|
cf90be7cea | ||
|
|
9aa24c066b | ||
|
|
d03e80d0ef | ||
|
|
5a1d87e163 | ||
|
|
86b2ad53fa | ||
|
|
7e33078f00 | ||
|
|
8022a80f0e | ||
|
|
08552cf57e | ||
|
|
ffbd8efef7 | ||
|
|
ea182c07f0 | ||
|
|
776ac47a98 | ||
|
|
af013bf938 | ||
|
|
2192aabf14 | ||
|
|
589221bf88 | ||
|
|
27b08caae7 | ||
|
|
a6855ab7db | ||
|
|
7a11884d97 | ||
|
|
6488c42ea9 | ||
|
|
645876fe32 | ||
|
|
74bd41a5c4 | ||
|
|
4e48cde1e7 | ||
|
|
90023554e8 | ||
|
|
f30b2dc263 | ||
|
|
8094582911 | ||
|
|
6dcc27acbc | ||
|
|
30f39d1383 | ||
|
|
42233d272c | ||
|
|
38e4866531 | ||
|
|
623ce798df | ||
|
|
19dcb020f1 | ||
|
|
9081855ab1 | ||
|
|
3210269589 | ||
|
|
857e14368b | ||
|
|
9ba6a22b6d | ||
|
|
251f884248 |
15
.github/FUNDING.yml
vendored
Normal file
15
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: semiavalonia
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
2
.github/workflows/pack-nightly.yml
vendored
2
.github/workflows/pack-nightly.yml
vendored
@@ -21,7 +21,7 @@ on:
|
||||
Semi_Avalonia_DataGrid:
|
||||
description: 'Pack Semi.Avalonia.DataGrid'
|
||||
required: true
|
||||
default: 'true'
|
||||
default: 'false'
|
||||
type: boolean
|
||||
Semi_Avalonia_TreeDataGrid:
|
||||
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
||||
|
||||
2
.github/workflows/pack.yml
vendored
2
.github/workflows/pack.yml
vendored
@@ -16,7 +16,7 @@ on:
|
||||
Semi_Avalonia_DataGrid:
|
||||
description: 'Pack Semi.Avalonia.DataGrid'
|
||||
required: true
|
||||
default: 'true'
|
||||
default: 'false'
|
||||
type: boolean
|
||||
Semi_Avalonia_TreeDataGrid:
|
||||
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
||||
|
||||
3
.github/workflows/release-tag.yml
vendored
3
.github/workflows/release-tag.yml
vendored
@@ -20,9 +20,6 @@ jobs:
|
||||
- name: Pack Semi.Avalonia.ColorPicker
|
||||
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
|
||||
|
||||
- name: Pack Semi.Avalonia.DataGrid
|
||||
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AvaloniaVersion>11.2.3</AvaloniaVersion>
|
||||
<AvaloniaVersion>11.2.5</AvaloniaVersion>
|
||||
<DataGridVersion>11.2.5</DataGridVersion>
|
||||
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker;assembly=Semi.Avalonia.ColorPicker"
|
||||
xmlns:controls="using:Avalonia.Controls"
|
||||
xmlns:semi="https://irihi.tech/semi"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="1450"
|
||||
@@ -11,18 +10,15 @@
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="20">
|
||||
<StackPanel
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal"
|
||||
Spacing="20">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ColorView Name="Test" ColorSpectrumShape="Ring" />
|
||||
<ColorView ColorSpectrumShape="Box" />
|
||||
<ColorView Palette="{DynamicResource SemiColorPalette}" />
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Top" Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ColorView
|
||||
Name="SimpleColorViewTest"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
HsvColor="hsv(180,80%,70%)"
|
||||
IsAlphaVisible="True"
|
||||
Theme="{StaticResource SimpleColorView}" />
|
||||
<StackPanel>
|
||||
@@ -30,63 +26,55 @@
|
||||
<TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<ColorPicker Margin="8" ColorSpectrumShape="Ring">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ColorPicker ColorSpectrumShape="Ring">
|
||||
<ColorPicker.Palette>
|
||||
<controls:FlatHalfColorPalette />
|
||||
<FlatHalfColorPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
<ColorPicker Margin="8" ColorSpectrumShape="Box">
|
||||
<ColorPicker ColorSpectrumShape="Box">
|
||||
<ColorPicker.Palette>
|
||||
<colorPicker:SemiColorLightPalette />
|
||||
<semi:SemiColorLightPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
ColorSpectrumShape="Box"
|
||||
Theme="{DynamicResource HexColorPicker}">
|
||||
Theme="{DynamicResource HexColorPicker}"
|
||||
ColorSpectrumShape="Box">
|
||||
<ColorPicker.Palette>
|
||||
<colorPicker:SemiColorLightPalette />
|
||||
<semi:SemiColorLightPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" >
|
||||
<TextBlock Text="Use Style to customize button"></TextBlock>
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<TextBlock Text="Use Style to customize button" />
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
Width="32"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
>
|
||||
MinWidth="32"
|
||||
HsvColor="hsv(180,80%,70%)">
|
||||
<ColorPicker.Content>
|
||||
<Border
|
||||
Margin="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{Binding $parent[ColorPicker].HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
Background="{Binding $parent[ColorPicker].HsvColor, Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="1" />
|
||||
</ColorPicker.Content>
|
||||
<ColorPicker.Styles>
|
||||
<Style Selector="DropDownButton">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Style Selector="^ /template/ PathIcon">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ColorPicker.Styles>
|
||||
</ColorPicker>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
Theme="{StaticResource SimpleColorPicker}" />
|
||||
Theme="{StaticResource SimpleColorPicker}"
|
||||
HsvColor="hsv(180,80%,70%)" />
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
Theme="{StaticResource HexSimpleColorPicker}" />
|
||||
Theme="{StaticResource HexSimpleColorPicker}"
|
||||
HsvColor="hsv(180,80%,70%)" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:Semi.Avalonia.Demo.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
|
||||
d:DesignHeight="450"
|
||||
@@ -15,8 +14,9 @@
|
||||
<TabItem Header="DataGrid">
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<ToggleSwitch Content="Disable" Name="DisableToggle" />
|
||||
<ToggleSwitch Content="ScrollViewerHide" Name="ScrollViewerHide" />
|
||||
<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"
|
||||
@@ -25,8 +25,9 @@
|
||||
CanUserSortColumns="True"
|
||||
HeadersVisibility="All"
|
||||
IsReadOnly="True"
|
||||
ScrollViewer.AllowAutoHide="{Binding #ScrollViewerHide.IsChecked}"
|
||||
IsEnabled="{Binding #DisableToggle.IsChecked}"
|
||||
Classes.InsetContent="{Binding #inset.IsChecked}"
|
||||
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
|
||||
IsEnabled="{Binding #enable.IsChecked}"
|
||||
ItemsSource="{Binding GridData1}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="#8B44AC" Geometry="M74.8535 85.8231C75.0263 85.8231 75.1954 85.8231 75.3679 85.8231C80.7347 85.8231 85.1439 81.8027 85.7614 76.6019L85.8357 41.7604C85.2255 18.5931 66.2537 0 42.9393 0C19.2399 0 0.02771 19.2122 0.02771 42.9116C0.02771 66.3573 18.8309 85.418 42.18 85.8231H74.8535Z" />
|
||||
<GeometryDrawing Brush="#F9F9FB" Geometry="M43.0585 14.6143C29.5513 14.6143 18.2555 24.082 15.4454 36.7432C18.1357 37.4975 20.1087 39.9679 20.1087 42.8992C20.1087 45.8305 18.1357 48.301 15.4454 49.0552C18.2555 61.7164 29.5513 71.1842 43.0585 71.1842C47.9754 71.1842 52.5993 69.9296 56.6276 67.723V70.9926H71.3435V44.0716C71.3569 43.7138 71.3435 43.2603 71.3435 42.8992C71.3435 27.2779 58.6799 14.6143 43.0585 14.6143ZM29.5096 42.8992C29.5096 35.4164 35.5757 29.3503 43.0585 29.3503C50.5414 29.3503 56.6074 35.4164 56.6074 42.8992C56.6074 50.3821 50.5414 56.4481 43.0585 56.4481C35.5757 56.4481 29.5096 50.3821 29.5096 42.8992Z" />
|
||||
<GeometryDrawing Brush="#F9F9FB" Geometry="M18.105 42.8805C18.105 45.3803 16.0785 47.4068 13.5787 47.4068C11.0789 47.4068 9.05237 45.3803 9.05237 42.8805C9.05237 40.3807 11.0789 38.3542 13.5787 38.3542C16.0785 38.3542 18.105 40.3807 18.105 42.8805Z" />
|
||||
<GeometryDrawing Brush="#0D6EFD" Geometry="M74.8535 85.8231C75.0263 85.8231 75.1954 85.8231 75.3679 85.8231C80.7347 85.8231 85.1439 81.8027 85.7614 76.6019L85.8357 41.7604C85.2255 18.5931 66.2537 0 42.9393 0C19.2399 0 0.02771 19.2122 0.02771 42.9116C0.02771 66.3573 18.8309 85.418 42.18 85.8231H74.8535Z" />
|
||||
<GeometryDrawing Brush="White" Geometry="M43.0585 14.6143C29.5513 14.6143 18.2555 24.082 15.4454 36.7432C18.1357 37.4975 20.1087 39.9679 20.1087 42.8992C20.1087 45.8305 18.1357 48.301 15.4454 49.0552C18.2555 61.7164 29.5513 71.1842 43.0585 71.1842C47.9754 71.1842 52.5993 69.9296 56.6276 67.723V70.9926H71.3435V44.0716C71.3569 43.7138 71.3435 43.2603 71.3435 42.8992C71.3435 27.2779 58.6799 14.6143 43.0585 14.6143ZM29.5096 42.8992C29.5096 35.4164 35.5757 29.3503 43.0585 29.3503C50.5414 29.3503 56.6074 35.4164 56.6074 42.8992C56.6074 50.3821 50.5414 56.4481 43.0585 56.4481C35.5757 56.4481 29.5096 50.3821 29.5096 42.8992Z" />
|
||||
<GeometryDrawing Brush="White" Geometry="M18.105 42.8805C18.105 45.3803 16.0785 47.4068 13.5787 47.4068C11.0789 47.4068 9.05237 45.3803 9.05237 42.8805C9.05237 40.3807 11.0789 38.3542 13.5787 38.3542C16.0785 38.3542 18.105 40.3807 18.105 42.8805Z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
@@ -234,7 +234,7 @@
|
||||
VerticalAlignment="Top"
|
||||
Palette="{DynamicResource SemiColorPalette}"
|
||||
SelectedIndex="2"
|
||||
Color="#8B44AC" />
|
||||
Color="#0D6EFD" />
|
||||
<StackPanel Width="300" Margin="8">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Slider
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class Overview : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.5";
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.6";
|
||||
|
||||
public string MainStyle { get; set; } =
|
||||
"""
|
||||
@@ -20,7 +20,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.5";
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.6";
|
||||
|
||||
public string ColorPickerStyle { get; set; } =
|
||||
"""
|
||||
@@ -29,7 +29,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.5";
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.6";
|
||||
|
||||
public string DataGridStyle { get; set; } =
|
||||
"""
|
||||
@@ -38,7 +38,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.1";
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.2";
|
||||
|
||||
public string TreeDataGridStyle { get; set; } =
|
||||
"""
|
||||
|
||||
@@ -9,66 +9,22 @@
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<ToggleSwitch Name="inset" Content="Inset Content" />
|
||||
<ToggleSwitch Name="autohide" Content="Allow AutoHide" />
|
||||
<ScrollViewer
|
||||
Width="200"
|
||||
Height="200"
|
||||
Margin="10"
|
||||
Width="200" Height="200"
|
||||
AllowAutoHide="{Binding #autohide.IsChecked}"
|
||||
Classes.InsetContent="{Binding #inset.IsChecked}"
|
||||
HorizontalScrollBarVisibility="Auto">
|
||||
<Grid RowDefinitions="Auto,Auto"
|
||||
ColumnDefinitions="Auto,Auto"
|
||||
Width="300" Height="300">
|
||||
<Rectangle
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiYellow2}" />
|
||||
<Rectangle
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiBlue2}" />
|
||||
<Rectangle
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiPink2}" />
|
||||
<Rectangle
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiGreen2}" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
<ScrollViewer
|
||||
Width="200"
|
||||
Height="200"
|
||||
Margin="10"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
Theme="{DynamicResource StaticScrollViewer}">
|
||||
<Grid RowDefinitions="Auto,Auto"
|
||||
ColumnDefinitions="Auto,Auto"
|
||||
Width="300" Height="300">
|
||||
<Rectangle
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiYellow2}" />
|
||||
<Rectangle
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiBlue2}" />
|
||||
<Rectangle
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiPink2}" />
|
||||
<Rectangle
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Width="150"
|
||||
Height="150"
|
||||
Fill="{DynamicResource SemiGreen2}" />
|
||||
</Grid>
|
||||
<UniformGrid
|
||||
Rows="2" Columns="2"
|
||||
Width="300" Height="300">
|
||||
<Rectangle Fill="{DynamicResource SemiYellow2}" />
|
||||
<Rectangle Fill="{DynamicResource SemiBlue2}" />
|
||||
<Rectangle Fill="{DynamicResource SemiPink2}" />
|
||||
<Rectangle Fill="{DynamicResource SemiGreen2}" />
|
||||
</UniformGrid>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
@@ -22,8 +22,8 @@
|
||||
</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\Semi.Avalonia.csproj"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -114,6 +114,12 @@ public partial class MainViewModel : ObservableObject
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("de-de")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Español",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("es-es")
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -3,15 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Metadata;
|
||||
|
||||
namespace Semi.Avalonia.TreeDataGrid.Demo.Converters;
|
||||
|
||||
public class FileIconConverter: IMultiValueConverter
|
||||
public class FileIconConverter : IMultiValueConverter
|
||||
{
|
||||
[Content]
|
||||
public Dictionary<string, PathGeometry> Items { get; set; } = new Dictionary<string, PathGeometry>();
|
||||
[Content] public IDictionary<string, object?> Items { get; } = new Dictionary<string, object?>();
|
||||
|
||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
@@ -21,8 +19,10 @@ public class FileIconConverter: IMultiValueConverter
|
||||
{
|
||||
return Items["file"];
|
||||
}
|
||||
|
||||
return isOpen ? Items["folderOpen"] : Items["folderClosed"];
|
||||
}
|
||||
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,9 @@
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<converters:FileIconConverter x:Key="FileIconConverter">
|
||||
<PathGeometry x:Key="file">M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z</PathGeometry>
|
||||
<PathGeometry x:Key="folderOpen">M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z</PathGeometry>
|
||||
<PathGeometry x:Key="folderClosed">M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z</PathGeometry>
|
||||
<StaticResource x:Key="file" ResourceKey="SemiIconFile" />
|
||||
<StaticResource x:Key="folderOpen" ResourceKey="SemiIconFolderOpen" />
|
||||
<StaticResource x:Key="folderClosed" ResourceKey="SemiIconFolder" />
|
||||
</converters:FileIconConverter>
|
||||
</Window.Resources>
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
@@ -58,7 +58,7 @@
|
||||
</TreeDataGrid.Resources>
|
||||
<TreeDataGrid.Styles>
|
||||
<Style Selector="TreeDataGrid TreeDataGridRow:nth-last-child(2n)">
|
||||
<Setter Property="Background" Value="#20808080" />
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
||||
</Style>
|
||||
</TreeDataGrid.Styles>
|
||||
</TreeDataGrid>
|
||||
@@ -86,10 +86,8 @@
|
||||
<DataTemplate x:Key="FileNameCell" DataType="vm:FileNodeViewModel">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="8,0"
|
||||
VerticalAlignment="Center">
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Margin="8,0">
|
||||
<PathIcon.Data>
|
||||
<MultiBinding Converter="{StaticResource FileIconConverter}">
|
||||
<Binding Path="IsDirectory" />
|
||||
@@ -127,7 +125,7 @@
|
||||
</TreeDataGrid.Resources>
|
||||
<TreeDataGrid.Styles>
|
||||
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)">
|
||||
<Setter Property="Background" Value="#20808080" />
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
||||
</Style>
|
||||
</TreeDataGrid.Styles>
|
||||
</TreeDataGrid>
|
||||
@@ -135,4 +133,4 @@
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,9 +1,9 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.2.1.5</Version>
|
||||
<Version>11.2.1.6</Version>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
|
||||
3
src/Semi.Avalonia.ColorPicker/AssemblyInfo.cs
Normal file
3
src/Semi.Avalonia.ColorPicker/AssemblyInfo.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
using Avalonia.Metadata;
|
||||
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.ColorPicker")]
|
||||
@@ -1,62 +1,48 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Avalonia.Controls"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:primitives="using:Avalonia.Controls.Primitives"
|
||||
x:CompileBindings="True">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSlider.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSpectrum.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorView.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
|
||||
<converters:ToBrushConverter x:Key="ToBrushConverter" />
|
||||
|
||||
<ControlTheme x:Key="{x:Type ColorPicker}" TargetType="ColorPicker">
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Width" Value="64" />
|
||||
<Setter Property="MinWidth" Value="64" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ColorPickerMinHeight}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ColorPickerCornerRadius}" />
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<Panel>
|
||||
<Border
|
||||
Margin="1,1,0,1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
<Border
|
||||
Margin="1,1,0,1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
Background="{TemplateBinding HsvColor, Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||
</Panel>
|
||||
</Template>
|
||||
</Setter>
|
||||
<Setter Property="Palette">
|
||||
<controls:FluentColorPalette />
|
||||
<FluentColorPalette />
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="{x:Type ColorPicker}">
|
||||
<DropDownButton
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ClipToBounds="True"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
ClipToBounds="True"
|
||||
UseLayoutRounding="False">
|
||||
<DropDownButton.Styles>
|
||||
<Style Selector="FlyoutPresenter.nopadding">
|
||||
@@ -113,13 +99,10 @@
|
||||
<!-- Spectrum Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<Grid Margin="12" RowDefinitions="*">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -127,7 +110,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="32" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumThirdComponentSlider"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,12,0"
|
||||
@@ -141,8 +124,8 @@
|
||||
IsPerceptive="False"
|
||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||
Orientation="Vertical" />
|
||||
<primitives:ColorSpectrum
|
||||
x:Name="ColorSpectrum"
|
||||
<ColorSpectrum
|
||||
Name="ColorSpectrum"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
@@ -155,7 +138,7 @@
|
||||
MinSaturation="{TemplateBinding MinSaturation}"
|
||||
MinValue="{TemplateBinding MinValue}"
|
||||
Shape="{TemplateBinding ColorSpectrumShape}" />
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumAlphaSlider"
|
||||
Grid.Column="2"
|
||||
Margin="12,0,0,0"
|
||||
@@ -167,24 +150,21 @@
|
||||
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
||||
IsEnabled="{TemplateBinding IsAlphaEnabled}"
|
||||
Orientation="Vertical">
|
||||
<primitives:ColorSlider.IsVisible>
|
||||
<ColorSlider.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</primitives:ColorSlider.IsVisible>
|
||||
</primitives:ColorSlider>
|
||||
</ColorSlider.IsVisible>
|
||||
</ColorSlider>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<!-- Palette Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewPaletteIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewPaletteIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<ListBox
|
||||
Margin="12"
|
||||
@@ -217,18 +197,15 @@
|
||||
<!-- Components Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewComponentsIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewComponentsIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<Grid
|
||||
Margin="12"
|
||||
ColumnDefinitions="Auto,*"
|
||||
RowDefinitions="Auto,24,1*,1*,1*,1*,12"
|
||||
RowDefinitions="Auto,24,*,*,*,*,12"
|
||||
Tag="{TemplateBinding ColorModel}">
|
||||
<Grid.Styles>
|
||||
<Style Selector="NumericUpDown">
|
||||
@@ -272,13 +249,13 @@
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
ColumnDefinitions="1*,12,1*">
|
||||
ColumnDefinitions="*,12,*">
|
||||
<!-- RadioButtonGroup -->
|
||||
<Border
|
||||
Padding="2"
|
||||
Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}"
|
||||
CornerRadius="3">
|
||||
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}">
|
||||
<Grid ColumnDefinitions="*,*" IsVisible="{TemplateBinding IsColorModelVisible}">
|
||||
<RadioButton
|
||||
Name="RgbRadioButton"
|
||||
Grid.Column="0"
|
||||
@@ -287,9 +264,9 @@
|
||||
Content="RGB"
|
||||
CornerRadius="3,0,0,3"
|
||||
IsChecked="{TemplateBinding ColorModel,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorModel.Rgba},
|
||||
Mode=TwoWay}"
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorModel.Rgba},
|
||||
Mode=TwoWay}"
|
||||
Theme="{DynamicResource ColorViewRadioButton}" />
|
||||
<RadioButton
|
||||
Name="HsvRadioButton"
|
||||
@@ -299,21 +276,20 @@
|
||||
Content="HSV"
|
||||
CornerRadius="0,3,3,0"
|
||||
IsChecked="{TemplateBinding ColorModel,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorModel.Hsva},
|
||||
Mode=TwoWay}"
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorModel.Hsva},
|
||||
Mode=TwoWay}"
|
||||
Theme="{DynamicResource ColorViewRadioButton}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<TextBox
|
||||
Name="PART_HexTextBox"
|
||||
Grid.Column="2"
|
||||
Height="32"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Hexadecimal Color"
|
||||
InnerLeftContent="#"
|
||||
IsVisible="{TemplateBinding IsHexInputVisible}"
|
||||
MaxLength="9" />
|
||||
MaxLength="8" />
|
||||
</Grid>
|
||||
<!-- Color component editing controls -->
|
||||
<!-- Component 1 RGB:Red HSV:Hue -->
|
||||
@@ -332,15 +308,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component1Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component1Slider"
|
||||
<ColorSlider
|
||||
Name="Component1Slider"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component1"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -363,15 +338,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component2Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component2Slider"
|
||||
<ColorSlider
|
||||
Name="Component2Slider"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component2"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -394,15 +368,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component3Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component3Slider"
|
||||
<ColorSlider
|
||||
Name="Component3Slider"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component3"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -432,34 +405,33 @@
|
||||
</MultiBinding>
|
||||
</NumericUpDown.IsVisible>
|
||||
</NumericUpDown>
|
||||
<primitives:ColorSlider
|
||||
x:Name="AlphaComponentSlider"
|
||||
<ColorSlider
|
||||
Name="AlphaComponentSlider"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Alpha"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsEnabled="{TemplateBinding IsAlphaEnabled}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
Orientation="Horizontal"
|
||||
TickFrequency="1">
|
||||
<primitives:ColorSlider.IsVisible>
|
||||
<ColorSlider.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</primitives:ColorSlider.IsVisible>
|
||||
</primitives:ColorSlider>
|
||||
</ColorSlider.IsVisible>
|
||||
</ColorSlider>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<!-- Previewer -->
|
||||
<!-- Note that top/bottom margins have -5 to remove for drop shadow padding -->
|
||||
<primitives:ColorPreviewer
|
||||
<ColorPreviewer
|
||||
Grid.Row="1"
|
||||
Margin="12,-5,12,7"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
@@ -471,9 +443,9 @@
|
||||
</DropDownButton>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
<Style Selector="^ /template/ DropDownButton">
|
||||
<Setter Property="Padding" Value="0 0 10 0"></Setter>
|
||||
<Setter Property="Padding" Value="0 0 10 0" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
@@ -481,7 +453,7 @@
|
||||
x:Key="HexColorPicker"
|
||||
BasedOn="{StaticResource {x:Type ColorPicker}}"
|
||||
TargetType="ColorPicker">
|
||||
<Setter Property="Width" Value="200" />
|
||||
<Setter Property="MinWidth" Value="200" />
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
@@ -499,8 +471,7 @@
|
||||
Margin="1,1,0,1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
@@ -525,9 +496,12 @@
|
||||
<DropDownButton
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ClipToBounds="True"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
@@ -557,8 +531,8 @@
|
||||
Grid.Row="0"
|
||||
CornerRadius="8 8 0 0"
|
||||
ClipToBounds="True">
|
||||
<primitives:ColorSpectrum
|
||||
x:Name="ColorSpectrum"
|
||||
<ColorSpectrum
|
||||
Name="ColorSpectrum"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Components="{TemplateBinding ColorSpectrumComponents}"
|
||||
@@ -571,7 +545,7 @@
|
||||
MinValue="{TemplateBinding MinValue}"
|
||||
Shape="{TemplateBinding ColorSpectrumShape}" />
|
||||
</Border>
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumThirdComponentSlider"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -583,8 +557,8 @@
|
||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||
Orientation="Horizontal" />
|
||||
|
||||
<primitives:ColorSlider
|
||||
x:Name="ColorSpectrumAlphaSlider"
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumAlphaSlider"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
@@ -597,8 +571,7 @@
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Orientation="Horizontal">
|
||||
</primitives:ColorSlider>
|
||||
Orientation="Horizontal" />
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -675,7 +648,7 @@
|
||||
x:Key="HexSimpleColorPicker"
|
||||
BasedOn="{StaticResource SimpleColorPicker}"
|
||||
TargetType="ColorPicker">
|
||||
<Setter Property="Width" Value="200" />
|
||||
<Setter Property="MinWidth" Value="200" />
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
@@ -693,8 +666,7 @@
|
||||
Margin="1,1,0,1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
@@ -709,4 +681,4 @@
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -33,17 +33,16 @@
|
||||
Name="PART_AccentDecrement2Border"
|
||||
Grid.Column="0"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='-2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource LeftCornerRadiusFilterConverter}}"
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='-2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource LeftCornerRadiusFilterConverter}}"
|
||||
Tag="-2" />
|
||||
<Border
|
||||
Name="PART_AccentDecrement1Border"
|
||||
Grid.Column="1"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='-1'}"
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='-1'}"
|
||||
Tag="-1" />
|
||||
</Grid>
|
||||
<!-- Right accent colors -->
|
||||
@@ -63,17 +62,16 @@
|
||||
Name="PART_AccentIncrement1Border"
|
||||
Grid.Column="0"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='1'}"
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='1'}"
|
||||
Tag="1" />
|
||||
<Border
|
||||
Name="PART_AccentIncrement2Border"
|
||||
Grid.Column="1"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource RightCornerRadiusFilterConverter}}"
|
||||
Converter={StaticResource AccentColorConverter},
|
||||
ConverterParameter='2'}"
|
||||
CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource RightCornerRadiusFilterConverter}}"
|
||||
Tag="2" />
|
||||
</Grid>
|
||||
<!-- Preview color: Must be last for drop shadow Z-index -->
|
||||
@@ -85,12 +83,13 @@
|
||||
BoxShadow="{DynamicResource ColorPreviewerMainBoxShadow}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Panel>
|
||||
<Border Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<Border
|
||||
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<Border
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
@@ -100,15 +99,15 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
IsVisible="{TemplateBinding IsAccentColorsVisible,
|
||||
Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{TemplateBinding IsAccentColorsVisible,Converter={x:Static BoolConverters.Not}}">
|
||||
<Panel>
|
||||
<Border Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<Border
|
||||
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<Border
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{TemplateBinding HsvColor,
|
||||
Converter={StaticResource ToBrushConverter}}"
|
||||
Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
|
||||
@@ -11,19 +11,17 @@
|
||||
<Setter Property="UseLayoutRounding" Value="False" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="999" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ColorSliderThumbCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Margin="1"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BoxShadow="{DynamicResource ColorSliderBoxShadow}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Margin="1"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BoxShadow="{DynamicResource ColorSliderBoxShadow}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
@@ -45,20 +43,16 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Rectangle
|
||||
Width="{Binding #PART_Track.Bounds.Width}"
|
||||
Height="{Binding #PART_Track.Bounds.Height}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{TemplateBinding Background}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Height="12"
|
||||
@@ -68,8 +62,7 @@
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="Horizontal"
|
||||
Value="{TemplateBinding Value,
|
||||
Mode=TwoWay}">
|
||||
Value="{TemplateBinding Value,Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
@@ -106,10 +99,8 @@
|
||||
</Track.IncreaseButton>
|
||||
<Thumb
|
||||
Name="ColorSliderThumb"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Width="{TemplateBinding Height}"
|
||||
Height="{TemplateBinding Height}"
|
||||
DataContext="{TemplateBinding Value}"
|
||||
Theme="{StaticResource ColorSliderThumbTheme}" />
|
||||
</Track>
|
||||
@@ -136,20 +127,16 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Rectangle
|
||||
Width="{Binding #PART_Track.Bounds.Width}"
|
||||
Height="{Binding #PART_Track.Bounds.Height}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{TemplateBinding Background}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Width="12"
|
||||
@@ -159,8 +146,7 @@
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="Vertical"
|
||||
Value="{TemplateBinding Value,
|
||||
Mode=TwoWay}">
|
||||
Value="{TemplateBinding Value,Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
@@ -199,8 +185,6 @@
|
||||
Name="ColorSliderThumb"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Width}"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
DataContext="{TemplateBinding Value}"
|
||||
Theme="{StaticResource ColorSliderThumbTheme}" />
|
||||
</Track>
|
||||
@@ -231,4 +215,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -1,125 +1,115 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Avalonia.Controls"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
x:CompileBindings="True">
|
||||
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
|
||||
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
|
||||
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" />
|
||||
|
||||
|
||||
<ControlTheme x:Key="{x:Type ColorSpectrum}" TargetType="ColorSpectrum">
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ColorSpectrumCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ColorSpectrum}">
|
||||
<ControlTemplate TargetType="{x:Type ColorSpectrum}">
|
||||
<Panel
|
||||
Name="PART_LayoutRoot"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Panel
|
||||
Name="PART_LayoutRoot"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Panel
|
||||
Name="PART_SizingPanel"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ClipToBounds="True">
|
||||
<Rectangle
|
||||
Name="PART_SpectrumRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Rectangle
|
||||
Name="PART_SpectrumOverlayRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Ellipse
|
||||
Name="PART_SpectrumEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" />
|
||||
<Ellipse
|
||||
Name="PART_SpectrumOverlayEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" />
|
||||
<Canvas
|
||||
Name="PART_InputTarget"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent">
|
||||
<!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers -->
|
||||
<Panel
|
||||
Name="PART_SelectionEllipsePanel"
|
||||
ToolTip.Placement="Top"
|
||||
ToolTip.VerticalOffset="-10">
|
||||
<Ellipse
|
||||
Name="FocusEllipse"
|
||||
Margin="-2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
StrokeThickness="2" />
|
||||
<Ellipse
|
||||
Name="SelectionEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
StrokeThickness="2" />
|
||||
<ToolTip.Tip>
|
||||
<!-- Set in code-behind -->
|
||||
</ToolTip.Tip>
|
||||
</Panel>
|
||||
</Canvas>
|
||||
<Rectangle
|
||||
Name="BorderRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,
|
||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Ellipse
|
||||
Name="BorderEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" />
|
||||
</Panel>
|
||||
Name="PART_SizingPanel"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ClipToBounds="True">
|
||||
<Rectangle
|
||||
Name="PART_SpectrumRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Rectangle
|
||||
Name="PART_SpectrumOverlayRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Ellipse
|
||||
Name="PART_SpectrumEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
|
||||
<Ellipse
|
||||
Name="PART_SpectrumOverlayEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
|
||||
<Canvas
|
||||
Name="PART_InputTarget"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent">
|
||||
<!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers -->
|
||||
<Panel
|
||||
Name="PART_SelectionEllipsePanel"
|
||||
ToolTip.Placement="Top"
|
||||
ToolTip.VerticalOffset="-10">
|
||||
<Ellipse
|
||||
Name="FocusEllipse"
|
||||
Margin="-2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
StrokeThickness="2" />
|
||||
<Ellipse
|
||||
Name="SelectionEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
StrokeThickness="2" />
|
||||
<ToolTip.Tip>
|
||||
<!-- Set in code-behind -->
|
||||
</ToolTip.Tip>
|
||||
</Panel>
|
||||
</Canvas>
|
||||
<Rectangle
|
||||
Name="BorderRectangle"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Box}}"
|
||||
RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
|
||||
RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||
<Ellipse
|
||||
Name="BorderEllipse"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{TemplateBinding Shape,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Normal -->
|
||||
<!-- Separating this allows easier customization in applications -->
|
||||
<Style Selector="^ /template/ Ellipse#BorderEllipse, ^ /template/ Rectangle#BorderRectangle">
|
||||
<Style Selector="^ /template/ Ellipse#BorderEllipse,^ /template/ Rectangle#BorderRectangle">
|
||||
<Setter Property="Stroke" Value="{DynamicResource ColorSpectrumBorderBrush}" />
|
||||
<Setter Property="StrokeThickness" Value="1" />
|
||||
</Style>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Avalonia.Controls"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:globalization="using:System.Globalization"
|
||||
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
|
||||
xmlns:primitives="using:Avalonia.Controls.Primitives"
|
||||
xmlns:cvts="clr-namespace:Semi.Avalonia.ColorPicker.Converters"
|
||||
x:CompileBindings="True">
|
||||
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
|
||||
@@ -19,6 +17,15 @@
|
||||
<cvts:ToColorModel x:Key="ToColorModel" />
|
||||
<globalization:NumberFormatInfo x:Key="ColorViewComponentNumberFormat" NumberDecimalDigits="0" />
|
||||
|
||||
<Design.PreviewWith>
|
||||
<ColorView
|
||||
Theme="{StaticResource SimpleColorView}"
|
||||
IsAlphaVisible="True"
|
||||
IsAlphaEnabled="True"
|
||||
ColorModel="Hsva"
|
||||
HsvColor="hsv(120,7%,90%)" />
|
||||
</Design.PreviewWith>
|
||||
|
||||
<VisualBrush
|
||||
x:Key="ColorControlCheckeredBackgroundBrush"
|
||||
DestinationRect="0,0,8,8"
|
||||
@@ -116,12 +123,12 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="ColorViewRadioButton" TargetType="RadioButton">
|
||||
<Setter Property="RadioButton.Cursor" Value="Hand" />
|
||||
<Setter Property="RadioButton.FontWeight" Value="{DynamicResource ColorViewRadioButtonFontWeight}" />
|
||||
<Setter Property="RadioButton.Padding" Value="{DynamicResource ColorViewRadioButtonPadding}" />
|
||||
<Setter Property="RadioButton.Foreground" Value="{DynamicResource ColorViewRadioButtonForeground}" />
|
||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonBackground}" />
|
||||
<Setter Property="RadioButton.Template">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource ColorViewRadioButtonFontWeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ColorViewRadioButtonPadding}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ColorViewRadioButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonBackground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
@@ -163,10 +170,10 @@
|
||||
|
||||
<ControlTheme x:Key="{x:Type ColorView}" TargetType="ColorView">
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
||||
<Setter Property="ColorView.Width" Value="300" />
|
||||
<Setter Property="ColorView.Height" Value="300" />
|
||||
<Setter Property="ColorView.Palette">
|
||||
<controls:FluentColorPalette />
|
||||
<Setter Property="Width" Value="300" />
|
||||
<Setter Property="Height" Value="300" />
|
||||
<Setter Property="Palette">
|
||||
<FluentColorPalette />
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="{x:Type ColorView}">
|
||||
@@ -208,13 +215,10 @@
|
||||
<!-- Spectrum Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<Grid Margin="12" RowDefinitions="*">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -222,7 +226,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="32" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumThirdComponentSlider"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,12,0"
|
||||
@@ -236,8 +240,8 @@
|
||||
IsPerceptive="False"
|
||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||
Orientation="Vertical" />
|
||||
<primitives:ColorSpectrum
|
||||
x:Name="ColorSpectrum"
|
||||
<ColorSpectrum
|
||||
Name="ColorSpectrum"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
@@ -250,8 +254,8 @@
|
||||
MinSaturation="{TemplateBinding MinSaturation}"
|
||||
MinValue="{TemplateBinding MinValue}"
|
||||
Shape="{TemplateBinding ColorSpectrumShape}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="ColorSpectrumAlphaSlider"
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumAlphaSlider"
|
||||
Grid.Column="2"
|
||||
Margin="12,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -262,24 +266,21 @@
|
||||
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
||||
IsEnabled="{TemplateBinding IsAlphaEnabled}"
|
||||
Orientation="Vertical">
|
||||
<primitives:ColorSlider.IsVisible>
|
||||
<ColorSlider.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</primitives:ColorSlider.IsVisible>
|
||||
</primitives:ColorSlider>
|
||||
</ColorSlider.IsVisible>
|
||||
</ColorSlider>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<!-- Palette Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewPaletteIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewPaletteIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<ListBox
|
||||
Margin="12"
|
||||
@@ -312,18 +313,15 @@
|
||||
<!-- Components Tab -->
|
||||
<TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}">
|
||||
<TabItem.Header>
|
||||
<Border Height="{DynamicResource ColorViewTabStripHeight}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ColorViewComponentsIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</Border>
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource ColorViewComponentsIconGlyph}"
|
||||
Foreground="{Binding $parent[TabItem].Foreground}" />
|
||||
</TabItem.Header>
|
||||
<Grid
|
||||
Margin="12"
|
||||
ColumnDefinitions="Auto,*"
|
||||
RowDefinitions="Auto,24,1*,1*,1*,1*,12"
|
||||
RowDefinitions="Auto,24,*,*,*,*,12"
|
||||
UseLayoutRounding="False">
|
||||
<Grid.Styles>
|
||||
<Style Selector="NumericUpDown">
|
||||
@@ -339,43 +337,42 @@
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
ColumnDefinitions="1*,12,1*">
|
||||
ColumnDefinitions="*,12,*">
|
||||
<!-- RadioButtonGroup -->
|
||||
<Border
|
||||
Padding="2"
|
||||
Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}"
|
||||
CornerRadius="3">
|
||||
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}">
|
||||
<Grid ColumnDefinitions="*,*" IsVisible="{TemplateBinding IsColorModelVisible}">
|
||||
<RadioButton
|
||||
x:Name="RgbRadioButton"
|
||||
Name="RgbRadioButton"
|
||||
Grid.Column="0"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Content="RGB"
|
||||
CornerRadius="3,0,0,3"
|
||||
IsChecked="{TemplateBinding ColorModel,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorModel.Rgba},
|
||||
Mode=TwoWay}"
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorModel.Rgba},
|
||||
Mode=TwoWay}"
|
||||
Theme="{DynamicResource ColorViewRadioButton}" />
|
||||
<RadioButton
|
||||
x:Name="HsvRadioButton"
|
||||
Name="HsvRadioButton"
|
||||
Grid.Column="1"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Content="HSV"
|
||||
CornerRadius="0,3,3,0"
|
||||
IsChecked="{TemplateBinding ColorModel,
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static controls:ColorModel.Hsva},
|
||||
Mode=TwoWay}"
|
||||
Converter={StaticResource EnumToBoolConverter},
|
||||
ConverterParameter={x:Static ColorModel.Hsva},
|
||||
Mode=TwoWay}"
|
||||
Theme="{DynamicResource ColorViewRadioButton}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<TextBox
|
||||
x:Name="PART_HexTextBox"
|
||||
Name="PART_HexTextBox"
|
||||
Grid.Column="2"
|
||||
Height="32"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Hexadecimal Color"
|
||||
InnerLeftContent="#"
|
||||
@@ -399,15 +396,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component1Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component1Slider"
|
||||
<ColorSlider
|
||||
Name="Component1Slider"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component1"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -430,15 +426,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component2Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component2Slider"
|
||||
<ColorSlider
|
||||
Name="Component2Slider"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component2"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -461,15 +456,14 @@
|
||||
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
|
||||
ShowButtonSpinner="False"
|
||||
Value="{Binding Value, ElementName=Component3Slider}" />
|
||||
<primitives:ColorSlider
|
||||
x:Name="Component3Slider"
|
||||
<ColorSlider
|
||||
Name="Component3Slider"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Component3"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
@@ -499,34 +493,33 @@
|
||||
</MultiBinding>
|
||||
</NumericUpDown.IsVisible>
|
||||
</NumericUpDown>
|
||||
<primitives:ColorSlider
|
||||
x:Name="AlphaComponentSlider"
|
||||
<ColorSlider
|
||||
Name="AlphaComponentSlider"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColorComponent="Alpha"
|
||||
ColorModel="{TemplateBinding ColorModel,
|
||||
Mode=OneWay}"
|
||||
ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
IsEnabled="{TemplateBinding IsAlphaEnabled}"
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
Orientation="Horizontal"
|
||||
TickFrequency="1">
|
||||
<primitives:ColorSlider.IsVisible>
|
||||
<ColorSlider.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
</MultiBinding>
|
||||
</primitives:ColorSlider.IsVisible>
|
||||
</primitives:ColorSlider>
|
||||
</ColorSlider.IsVisible>
|
||||
</ColorSlider>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<!-- Previewer -->
|
||||
<!-- Note that top/bottom margins have -5 to remove for drop shadow padding -->
|
||||
<primitives:ColorPreviewer
|
||||
<ColorPreviewer
|
||||
Grid.Row="1"
|
||||
Margin="12,-5,12,7"
|
||||
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
||||
@@ -583,8 +576,8 @@
|
||||
Grid.Row="0"
|
||||
CornerRadius="8 8 0 0"
|
||||
ClipToBounds="True">
|
||||
<primitives:ColorSpectrum
|
||||
x:Name="ColorSpectrum"
|
||||
<ColorSpectrum
|
||||
Name="ColorSpectrum"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Components="{TemplateBinding ColorSpectrumComponents}"
|
||||
@@ -597,7 +590,7 @@
|
||||
MinValue="{TemplateBinding MinValue}"
|
||||
Shape="{TemplateBinding ColorSpectrumShape}" />
|
||||
</Border>
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
Name="ColorSpectrumThirdComponentSlider"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -609,7 +602,7 @@
|
||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||
Orientation="Horizontal" />
|
||||
|
||||
<primitives:ColorSlider
|
||||
<ColorSlider
|
||||
x:Name="ColorSpectrumAlphaSlider"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -623,8 +616,7 @@
|
||||
IsRoundingEnabled="True"
|
||||
IsSnapToTickEnabled="True"
|
||||
TickFrequency="1"
|
||||
Orientation="Horizontal">
|
||||
</primitives:ColorSlider>
|
||||
Orientation="Horizontal" />
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -693,13 +685,4 @@
|
||||
<Setter Property="Width" Value="176" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<Design.PreviewWith>
|
||||
<ColorView
|
||||
Theme="{StaticResource SimpleColorView}"
|
||||
IsAlphaVisible="True"
|
||||
IsAlphaEnabled="True"
|
||||
ColorModel="Hsva"
|
||||
HsvColor="hsv(120,7%,90%)" />
|
||||
</Design.PreviewWith>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
12
src/Semi.Avalonia.ColorPicker/Controls/_index.axaml
Normal file
12
src/Semi.Avalonia.ColorPicker/Controls/_index.axaml
Normal file
@@ -0,0 +1,12 @@
|
||||
<ResourceDictionary
|
||||
x:CompileBindings="True"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSlider.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSpectrum.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorView.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,21 +1,17 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedForeground" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPointeroverBackground" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPressedBackground" Color="#A9D7FF" />
|
||||
|
||||
<SolidColorBrush x:Key="ColorViewTabItemSelectedForeground" Color="#54A9FF" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="ColorSliderDefaultBorderBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="ColorSliderLightBorderBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
||||
|
||||
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
|
||||
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
|
||||
<StaticResource x:Key="ColorViewRadioButtonForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonBackground" ResourceKey="SemiColorBackground0" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryPointerover" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryActive" />
|
||||
<StaticResource x:Key="ColorViewTabItemSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorSliderDefaultBorderBrush" ResourceKey="SemiColorBlack" />
|
||||
<StaticResource x:Key="ColorSliderLightBorderBrush" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="ColorSliderDarkBorderBrush" ResourceKey="SemiColorBlack" />
|
||||
<StaticResource x:Key="ColorSpectrumBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="ColorPreviewerMainBoxShadow" ResourceKey="SemiShadowElevated" />
|
||||
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
|
||||
</ResourceDictionary>
|
||||
@@ -6,7 +6,7 @@
|
||||
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/_index.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Shared.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedForeground" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedBackground" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPointeroverBackground" Color="#0062D6" />
|
||||
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPressedBackground" Color="#004FB3" />
|
||||
|
||||
<SolidColorBrush x:Key="ColorViewTabItemSelectedForeground" Color="#0077FA" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="ColorSliderDefaultBorderBrush" Color="Black" />
|
||||
<SolidColorBrush x:Key="ColorSliderLightBorderBrush" Color="White" />
|
||||
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
||||
|
||||
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
|
||||
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
|
||||
<StaticResource x:Key="ColorViewRadioButtonForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonBackground" ResourceKey="SemiColorBackground0" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryPointerover" />
|
||||
<StaticResource x:Key="ColorViewRadioButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryActive" />
|
||||
<StaticResource x:Key="ColorViewTabItemSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ColorSliderDefaultBorderBrush" ResourceKey="SemiColorBlack" />
|
||||
<StaticResource x:Key="ColorSliderLightBorderBrush" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="ColorSliderDarkBorderBrush" ResourceKey="SemiColorBlack" />
|
||||
<StaticResource x:Key="ColorSpectrumBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="ColorPreviewerMainBoxShadow" ResourceKey="SemiShadowElevated" />
|
||||
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
|
||||
</ResourceDictionary>
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.5</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.6</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
@@ -12,7 +12,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker">
|
||||
<FontWeight x:Key="ColorViewRadioButtonFontWeight">600</FontWeight>
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
<StaticResource x:Key="ColorViewRadioButtonFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
<Thickness x:Key="ColorViewRadioButtonPadding">16 4</Thickness>
|
||||
<x:Double x:Key="ColorViewNumericUpDownWidth">70</x:Double>
|
||||
|
||||
<StreamGeometry x:Key="ColorViewSpectrumIconGlyph">M1.22 20.77a4.24 4.24 0 0 1 .02-5.98l9.33-9.28-.94-.95a1.41 1.41 0 0 1 0-1.99 1.39 1.39 0 0 1 1.97 0l.95.97L14.9 1.2a4.16 4.16 0 0 1 5.89.02 4.24 4.24 0 0 1-.02 5.98l-2.3 2.28 1.02 1.02c.54.55.54 1.44 0 1.99-.55.55-1.43.55-1.97 0l-1.03-1.03-9.37 9.32a4.16 4.16 0 0 1-5.89-.02ZM12.54 7.49l1.97 1.99-9.35 9.3c-.55.55-1.42.55-1.97 0a1.41 1.41 0 0 1 .01-2l9.34-9.29Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="ColorViewPaletteIconGlyph">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>
|
||||
<StreamGeometry x:Key="ColorViewComponentsIconGlyph">M4 6.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9.5 3a1.5 1.5 0 1 0 0 3h11a1.5 1.5 0 0 0 0-3h-11ZM8 11.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 8 11.5Zm0 7c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 8 18.5Zm-2-7a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-2 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z</StreamGeometry>
|
||||
<!-- <StaticResource x:Key="ColorViewSpectrumIconGlyph" ResourceKey="SemiIconEyedropper" /> -->
|
||||
<!-- <StaticResource x:Key="ColorViewPaletteIconGlyph" ResourceKey="SemiIconColorPalette" /> -->
|
||||
<!-- <StaticResource x:Key="ColorViewComponentsIconGlyph" ResourceKey="SemiIconList" /> -->
|
||||
<StaticResource x:Key="ColorViewSpectrumIconGlyph" ResourceKey="SemiIconEyedropper" />
|
||||
<StaticResource x:Key="ColorViewPaletteIconGlyph" ResourceKey="SemiIconColorPalette" />
|
||||
<StaticResource x:Key="ColorViewComponentsIconGlyph" ResourceKey="SemiIconList" />
|
||||
|
||||
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
||||
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
|
||||
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
|
||||
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
|
||||
<StaticResource x:Key="ColorSliderWidth" ResourceKey="SemiSpacingBase" />
|
||||
<StaticResource x:Key="ColorSliderCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<StaticResource x:Key="ColorSliderThumbBorderBrush" ResourceKey="SemiThicknessSuperTight" />
|
||||
<StaticResource x:Key="ColorSliderThumbCornerRadius" ResourceKey="SemiBorderRadiusFull" />
|
||||
|
||||
<x:Double x:Key="ColorPreviewerAccentSectionWidth">80</x:Double>
|
||||
<x:Double x:Key="ColorPreviewerAccentSectionHeight">20</x:Double>
|
||||
<x:Double x:Key="ColorPreviewerHeight">48</x:Double>
|
||||
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
||||
<StaticResource x:Key="ColorPreviewerCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
|
||||
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
|
||||
<semi:SemiColorDarkPalette x:Key="SemiColorPalette" />
|
||||
|
||||
<StaticResource x:Key="ColorSpectrumCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
|
||||
<StaticResource x:Key="ColorPickerMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="ColorPickerCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<PlacementMode x:Key="ColorPickerFlyoutPlacement">AnchorAndGravity</PlacementMode>
|
||||
<PlacementMode x:Key="SimpleColorPickerFlyoutPlacement">BottomEdgeAlignedLeft</PlacementMode>
|
||||
</ResourceDictionary>
|
||||
@@ -1,29 +1,21 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="DataGridLineBrush" Opacity="0.08" Color="White" />
|
||||
|
||||
<StaticResource x:Key="DataGridLineBrush" ResourceKey="SemiColorBorder" />
|
||||
<SolidColorBrush x:Key="DataGridCellBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DataGridCellFocusBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="DataGridCellCurrentBorderBrush" Opacity="0.08" Color="White" />
|
||||
<SolidColorBrush x:Key="DataGridCellErrorBrush" Color="#6C090B" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||
<StaticResource x:Key="DataGridCellFocusBorderBrush" ResourceKey="SemiColorTertiaryLightActive" />
|
||||
<StaticResource x:Key="DataGridCellCurrentBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="DataGridCellErrorBrush" ResourceKey="SemiColorDangerLight" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.20" Color="White" />
|
||||
|
||||
<StaticResource x:Key="DataGridColumnHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowErrorBackground" Color="#6C090B" />
|
||||
<StaticResource x:Key="DataGridRowErrorBackground" ResourceKey="SemiColorDangerLight" />
|
||||
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Opacity="0.2" Color="#FF54A9FF" />
|
||||
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Opacity="0.3" Color="#FF54A9FF" />
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#E6E8EA" Opacity="0.04" />
|
||||
<StaticResource x:Key="DataGridRowPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="DataGridRowSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="DataGridRowSelectedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderExpandIconForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderCurrentBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="DataGridDisabledBackground" ResourceKey="SemiColorDisabledFill" />
|
||||
</ResourceDictionary>
|
||||
@@ -126,21 +126,19 @@
|
||||
Name="HeaderBackground"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="4"
|
||||
CornerRadius="3" />
|
||||
CornerRadius="{DynamicResource DataGridColumnHeaderCornerRadius}" />
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<ContentPresenter
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<PathIcon
|
||||
Name="SortIcon"
|
||||
Grid.Column="1"
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Margin="0,0,8,0"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
@@ -293,7 +291,7 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="{DynamicResource DataGridRowMargin}"
|
||||
Background="{DynamicResource DataGridRowBackground}"
|
||||
CornerRadius="3" />
|
||||
CornerRadius="{DynamicResource DataGridRowCornerRadius}" />
|
||||
<Rectangle
|
||||
Name="InvalidVisualElement"
|
||||
Grid.ColumnSpan="2"
|
||||
@@ -358,8 +356,7 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
@@ -375,7 +372,7 @@
|
||||
<ControlTheme x:Key="{x:Type DataGridRowGroupHeader}" TargetType="DataGridRowGroupHeader">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataGridRowGroupHeaderBackground}" />
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource DataGridRowGroupHeaderMinHeight}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate x:DataType="collections:DataGridCollectionViewGroup" TargetType="DataGridRowGroupHeader">
|
||||
<DataGridFrozenGrid
|
||||
@@ -400,20 +397,18 @@
|
||||
Grid.Column="3"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
Orientation="Horizontal"
|
||||
Spacing="4">
|
||||
<TextBlock
|
||||
Name="PART_PropertyNameElement"
|
||||
Margin="4,0,0,0"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding IsPropertyNameVisible}" />
|
||||
<ContentControl
|
||||
Name="PART_GroupKeyContentControl"
|
||||
Margin="4,0,0,0"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Content="{Binding Key}" />
|
||||
<TextBlock
|
||||
Name="PART_ItemCountElement"
|
||||
Margin="4,0,0,0"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding IsItemCountVisible}" />
|
||||
</StackPanel>
|
||||
@@ -530,6 +525,7 @@
|
||||
Name="PART_VerticalScrollbar"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
AllowAutoHide="{Binding Path=(ScrollViewer.AllowAutoHide), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Orientation="Vertical" />
|
||||
|
||||
<Grid
|
||||
@@ -540,6 +536,7 @@
|
||||
<ScrollBar
|
||||
Name="PART_HorizontalScrollbar"
|
||||
Grid.Column="1"
|
||||
AllowAutoHide="{Binding Path=(ScrollViewer.AllowAutoHide), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Height="{DynamicResource ScrollBarSize}"
|
||||
Orientation="Horizontal" />
|
||||
</Grid>
|
||||
@@ -552,7 +549,7 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="{DynamicResource DataGridDisabledBackground}"
|
||||
CornerRadius="2"
|
||||
CornerRadius="{DynamicResource DataGridDisabledCornerRadius}"
|
||||
IsHitTestVisible="False"
|
||||
IsVisible="{Binding !$parent[DataGrid].IsEnabled}" />
|
||||
</Grid>
|
||||
@@ -572,7 +569,7 @@
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^[(ScrollViewer.AllowAutoHide)=False]">
|
||||
<Style Selector="^.InsetContent">
|
||||
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
@@ -582,4 +579,4 @@
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -1,29 +1,21 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="DataGridLineBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
|
||||
<StaticResource x:Key="DataGridLineBrush" ResourceKey="SemiColorBorder" />
|
||||
<SolidColorBrush x:Key="DataGridCellBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DataGridCellFocusBorderBrush" Color="#C6CACD" />
|
||||
<SolidColorBrush x:Key="DataGridCellCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="DataGridCellErrorBrush" Color="#FEF2ED" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.62" Color="#1C1F23" />
|
||||
<StaticResource x:Key="DataGridCellFocusBorderBrush" ResourceKey="SemiColorTertiaryLightActive" />
|
||||
<StaticResource x:Key="DataGridCellCurrentBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="DataGridCellErrorBrush" ResourceKey="SemiColorDangerLight" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||
|
||||
<StaticResource x:Key="DataGridColumnHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowErrorBackground" Color="#FEF2ED" />
|
||||
<StaticResource x:Key="DataGridRowErrorBackground" ResourceKey="SemiColorDangerLight" />
|
||||
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Color="#EAF5FF" />
|
||||
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Color="#CBE7FE" />
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
|
||||
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#2E3238" Opacity="0.02" />
|
||||
<StaticResource x:Key="DataGridRowPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="DataGridRowSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="DataGridRowSelectedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderExpandIconForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderCurrentBorderBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="DataGridDisabledBackground" ResourceKey="SemiColorDisabledFill" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,10 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="../Package.props"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.2.1.6</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.6</PackageReleaseNotes>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageIcon>irihi.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<Title>Semi.Avalonia.DataGrid</Title>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.5</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
@@ -12,8 +20,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
|
||||
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Thickness x:Key="DataGridCellTextBlockDefaultMargin">12 0</Thickness>
|
||||
|
||||
<x:Double x:Key="DataGridCellMinHeight">32</x:Double>
|
||||
<Thickness x:Key="DataGridCellVisualBorderThickness">1</Thickness>
|
||||
<x:Double x:Key="DataGridCellVisualStrokeThickness">1</x:Double>
|
||||
<StaticResource x:Key="DataGridCellMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="DataGridCellVisualBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
<StaticResource x:Key="DataGridCellVisualStrokeThickness" ResourceKey="SemiBorderSpacingControl" />
|
||||
|
||||
<Thickness x:Key="DataGridColumnHeaderPadding">12 0 0 0</Thickness>
|
||||
<x:Double x:Key="DataGridColumnHeaderMinHeight">32</x:Double>
|
||||
|
||||
<StreamGeometry x:Key="DataGridColumnHeaderAscendingGlyph">m6.45 8.34 4.8-5.48a1 1 0 0 1 1.5 0l4.8 5.48A1 1 0 0 1 16.8 10H7.2a1 1 0 0 1-.75-1.66Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="DataGridColumnHeaderDescendingGlyph">m17.55 15.66-4.8 5.48a1 1 0 0 1-1.5 0l-4.8-5.48A1 1 0 0 1 7.2 14h9.6a1 1 0 0 1 .75 1.66Z</StreamGeometry>
|
||||
<!-- <StaticResource x:Key="DataGridColumnHeaderAscendingGlyph" ResourceKey="SemiIconCaretUp" /> -->
|
||||
<!-- <StaticResource x:Key="DataGridColumnHeaderDescendingGlyph" ResourceKey="SemiIconCaretDown" /> -->
|
||||
<StaticResource x:Key="DataGridColumnHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderAscendingGlyph" ResourceKey="SemiIconSmallTriangleTop" />
|
||||
<StaticResource x:Key="DataGridColumnHeaderDescendingGlyph" ResourceKey="SemiIconSmallTriangleDown" />
|
||||
|
||||
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
|
||||
<Thickness x:Key="DataGridRowMargin">2</Thickness>
|
||||
<StaticResource x:Key="DataGridRowCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="DataGridRowMargin" ResourceKey="SemiThicknessSuperTight" />
|
||||
|
||||
<StreamGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">M7.44 19.8a1.5 1.5 0 0 1 0-2.13l5.66-5.65-5.66-5.66a1.5 1.5 0 1 1 2.12-2.12l6.72 6.72a1.5 1.5 0 0 1 0 2.12L9.56 19.8a1.5 1.5 0 0 1-2.12 0Z</StreamGeometry>
|
||||
<!-- <StaticResource x:Key="DataGridRowGroupHeaderExpandIconGlyph" ResourceKey="SemiIconChevronRight" /> -->
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderExpandIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderVisualStrokeThickness" ResourceKey="SemiBorderSpacingControl" />
|
||||
|
||||
<x:Double x:Key="DataGridRowGroupHeaderVisualStrokeThickness">1</x:Double>
|
||||
<StaticResource x:Key="DataGridDisabledCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,11 +1,11 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="White" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.20" Color="White" />
|
||||
<StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedForeground" Opacity="1" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TreeDataGridCellSelectedBackground" Opacity="0.2" Color="#FF54A9FF" />
|
||||
<SolidColorBrush x:Key="TreeDataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||
</ResourceDictionary>
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,11 +1,11 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.09" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||
<StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverForeground" Opacity="0.8" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedForeground" Opacity="1" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="TreeDataGridCellSelectedBackground" Color="#EAF5FF" />
|
||||
<SolidColorBrush x:Key="TreeDataGridColumnHeaderForeground" Opacity="0.62" Color="#1C1F23" />
|
||||
</ResourceDictionary>
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
</ResourceDictionary>
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.0.10.1</Version>
|
||||
<PackageReleaseNotes>Update to 11.0.10.1</PackageReleaseNotes>
|
||||
<Version>11.0.10.2</Version>
|
||||
<PackageReleaseNotes>Update to 11.0.10.2</PackageReleaseNotes>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StreamGeometry x:Key="TreeDataGridSortIconAscendingPath">m6.45 8.34 4.8-5.48a1 1 0 0 1 1.5 0l4.8 5.48A1 1 0 0 1 16.8 10H7.2a1 1 0 0 1-.75-1.66Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="TreeDataGridSortIconDescendingPath">m17.55 15.66-4.8 5.48a1 1 0 0 1-1.5 0l-4.8-5.48A1 1 0 0 1 7.2 14h9.6a1 1 0 0 1 .75 1.66Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="TreeDataGridItemCollapsedChevronPathData">m9.66 3.44 8.97 7.8a1 1 0 0 1 0 1.51l-8.97 7.81A1 1 0 0 1 8 19.81V4.19a1 1 0 0 1 1.66-.75Z</StreamGeometry>
|
||||
<!-- <StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconCaretUp"/> -->
|
||||
<!-- <StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconCaretDown"/> -->
|
||||
<!-- <StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight"/> -->
|
||||
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness>
|
||||
<StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconSmallTriangleTop" />
|
||||
<StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconSmallTriangleDown" />
|
||||
<StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight" />
|
||||
<StaticResource x:Key="TreeDataGridItemCollapsedChevronWidth" ResourceKey="SemiWidthIconMedium" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="TreeDataGridRowCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="TreeDataGridRowMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<StaticResource x:Key="TreeDataGridRowMargin" ResourceKey="SemiThicknessSuperTight" />
|
||||
</ResourceDictionary>
|
||||
@@ -49,10 +49,10 @@
|
||||
|
||||
<ControlTheme x:Key="{x:Type TreeDataGridColumnHeader}" TargetType="TreeDataGridColumnHeader">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TreeDataGridColumnHeaderMinHeight}" />
|
||||
<Setter Property="Padding" Value="8 2 0 2" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridColumnHeaderCornerRadius}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
|
||||
<Setter Property="Template">
|
||||
@@ -87,11 +87,8 @@
|
||||
</Panel>
|
||||
<PathIcon
|
||||
Name="SortIcon"
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Margin="0,0,8,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
TabIndex="1" />
|
||||
@@ -140,8 +137,8 @@
|
||||
|
||||
<ControlTheme x:Key="{x:Type TreeDataGridRow}" TargetType="TreeDataGridRow">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridRowCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TreeDataGridRowMinHeight}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
@@ -192,25 +189,17 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="TreeDataGridExpandCollapseChevron" TargetType="ToggleButton">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Width" Value="8" />
|
||||
<Setter Property="Height" Value="8" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
<PathIcon
|
||||
Name="ChevronPath"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent">
|
||||
<PathIcon
|
||||
Name="ChevronPath"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Border>
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="Small"
|
||||
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:checked /template/ PathIcon#ChevronPath">
|
||||
@@ -223,18 +212,16 @@
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Name="CellBorder"
|
||||
Padding="{TemplateBinding Indent,
|
||||
Converter={x:Static conv:IndentConverter.Instance}}"
|
||||
Padding="{TemplateBinding Indent,Converter={x:Static conv:IndentConverter.Instance}}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel>
|
||||
<Border
|
||||
Width="12"
|
||||
Height="12"
|
||||
Margin="4,0"
|
||||
DockPanel.Dock="Left">
|
||||
DockPanel.Dock="Left"
|
||||
Width="{DynamicResource TreeDataGridItemCollapsedChevronWidth}"
|
||||
Margin="4,0">
|
||||
<ToggleButton
|
||||
Focusable="False"
|
||||
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
|
||||
@@ -335,4 +322,4 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:ClassModifier="internal">
|
||||
x:CompileBindings="True">
|
||||
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
|
||||
<Setter Property="DefaultFocusAdorner">
|
||||
<FocusAdornerTemplate>
|
||||
|
||||
@@ -79,12 +79,12 @@
|
||||
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" />
|
||||
<ListBox
|
||||
Name="PART_SelectingItemsControl"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||
</Border>
|
||||
</Popup>
|
||||
</Panel>
|
||||
@@ -98,4 +98,4 @@
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -31,4 +31,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -108,11 +108,9 @@
|
||||
Classes="Solid" />
|
||||
</FocusAdornerTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||
</Style>
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||
@@ -272,8 +270,8 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InnerIconButton" TargetType="Button">
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Width" Value="{DynamicResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Height" Value="{DynamicResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<Setter Property="Margin" Value="0 0 4 0" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#ButtonGroup">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,11 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<Calendar />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
|
||||
@@ -37,7 +42,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
x:DataType="x:String"
|
||||
FontSize="12"
|
||||
FontSize="{DynamicResource CalendarItemWeekDayNameFontSize}"
|
||||
FontWeight="{DynamicResource CalendarItemWeekDayNameFontWeight}"
|
||||
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
|
||||
Text="{Binding}" />
|
||||
</Template>
|
||||
@@ -58,38 +64,41 @@
|
||||
VerticalAlignment="Stretch"
|
||||
RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_PreviousButton"
|
||||
Grid.Column="0"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
|
||||
<Button
|
||||
Name="PART_HeaderButton"
|
||||
Grid.Column="1"
|
||||
HorizontalContentAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}" />
|
||||
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_NextButton"
|
||||
Grid.Column="2"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
<Grid
|
||||
Name="PART_MonthView"
|
||||
@@ -244,4 +253,4 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -13,7 +13,7 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge"/>
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="IsTodayHighlighted" Value="True" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
@@ -34,7 +34,7 @@
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"/>
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
<Grid
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
@@ -227,4 +227,4 @@
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
<ControlTheme x:Key="CarouselIndicatorDotListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CarouselIndicatorForeground}" />
|
||||
<Setter Property="Margin" Value="4 0"/>
|
||||
<Setter Property="Margin" Value="4 0" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
@@ -108,7 +108,7 @@
|
||||
<ControlTheme x:Key="CarouselIndicatorLineListBoxItem"
|
||||
BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="2 0"/>
|
||||
<Setter Property="Margin" Value="2 0" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Rectangle
|
||||
@@ -122,9 +122,9 @@
|
||||
<ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem"
|
||||
BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="Width" Value="{DynamicResource CarouselIndicatorColumnarWidth}"/>
|
||||
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}"/>
|
||||
<Setter Property="Margin" Value="2 0"/>
|
||||
<Setter Property="Width" Value="{DynamicResource CarouselIndicatorColumnarWidth}" />
|
||||
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}" />
|
||||
<Setter Property="Margin" Value="2 0" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Rectangle
|
||||
@@ -250,4 +250,4 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -44,7 +44,7 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxSelectorPlaceHolderForeground}"/>
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxSelectorPlaceHolderForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ComboBox">
|
||||
<DataValidationErrors>
|
||||
@@ -137,7 +137,7 @@
|
||||
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
|
||||
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
@@ -320,4 +320,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -10,9 +10,10 @@
|
||||
<Setter Property="MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" />
|
||||
<Setter Property="Focusable" Value="True"></Setter>
|
||||
<Setter Property="Focusable" Value="True" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource MenuFlyoutFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource MenuFlyoutFontWeight}" />
|
||||
<Setter Property="WindowManagerAddShadowHint" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ContextMenu">
|
||||
@@ -38,4 +39,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -104,4 +104,4 @@
|
||||
</DataTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -2,15 +2,19 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<DatePickerPresenter />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
||||
<Setter Property="Width" Value="296" />
|
||||
<Setter Property="MinWidth" Value="296" />
|
||||
<Setter Property="MaxHeight" Value="300" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerPopupCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DatePickerPresenter">
|
||||
<Border
|
||||
@@ -92,8 +96,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -107,8 +110,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -268,4 +270,4 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -115,8 +115,8 @@
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonUpGlyph}" />
|
||||
@@ -136,12 +136,12 @@
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonDownGlyph}" />
|
||||
</Template>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -3,6 +3,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
@@ -21,4 +22,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -149,4 +149,4 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource ExpanderHeaderDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -90,4 +90,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -26,4 +26,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -16,4 +16,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -170,14 +170,13 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="UseLayoutRounding" Value="False" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource LabelTagSmallPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource LabelTagFontSize}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Label">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
@@ -406,4 +405,4 @@
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -59,7 +59,6 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontWeight="Normal"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooserOverwritePrompt}"
|
||||
TargetType="dialogs:ManagedFileChooserOverwritePrompt">
|
||||
<Setter Property="MaxWidth" Value="400" />
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="Padding" Value="10" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
@@ -233,4 +233,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -24,6 +24,7 @@
|
||||
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
MinHeight="0"
|
||||
Padding="0 4"
|
||||
DockPanel.Dock="Top"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
@@ -37,8 +38,8 @@
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
Data="{DynamicResource MenuScrollViewerUpButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
@@ -49,8 +50,9 @@
|
||||
BorderThickness="0"
|
||||
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CornerRadius="0"
|
||||
DockPanel.Dock="Bottom"
|
||||
MinHeight="0"
|
||||
Padding="0 4"
|
||||
DockPanel.Dock="Bottom"
|
||||
RenderTransform="{x:Null}">
|
||||
<RepeatButton.IsVisible>
|
||||
<MultiBinding
|
||||
@@ -63,8 +65,8 @@
|
||||
</MultiBinding>
|
||||
</RepeatButton.IsVisible>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraSmall"
|
||||
Data="{DynamicResource MenuScrollViewerDownButtonGlyph}"
|
||||
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||
</RepeatButton>
|
||||
@@ -301,7 +303,8 @@
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}" />
|
||||
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
|
||||
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TopLevelMenuItemPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TopLevelMenuItemMinHeight}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
@@ -324,8 +327,7 @@
|
||||
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||
Mode=TwoWay}"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
|
||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||
Placement="BottomEdgeAlignedLeft"
|
||||
VerticalOffset="-4"
|
||||
|
||||
@@ -55,4 +55,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -172,7 +172,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource NotificationCardLightBackground}" />
|
||||
<Style Selector="^:information /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightInformationBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource NotificationCardLightInformationBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource NotificationCardLightInformationBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:success /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightSuccessBorderBrush}" />
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InnerPathIcon" TargetType="PathIcon">
|
||||
<Setter Property="Height" Value="16" />
|
||||
<Setter Property="Width" Value="16" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconMedium}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="PathIcon">
|
||||
@@ -48,20 +48,20 @@
|
||||
<Setter Property="Fill" Value="{TemplateBinding BorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.ExtraSmall">
|
||||
<Setter Property="Height" Value="8" />
|
||||
<Setter Property="Width" Value="8" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconExtraSmall}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconExtraSmall}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="Height" Value="12" />
|
||||
<Setter Property="Width" Value="12" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconSmall}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconSmall}" />
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="Width" Value="20" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconLarge}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconLarge}" />
|
||||
</Style>
|
||||
<Style Selector="^.ExtraLarge">
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Width" Value="{StaticResource SemiWidthIconExtraLarge}" />
|
||||
<Setter Property="Height" Value="{StaticResource SemiWidthIconExtraLarge}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -5,6 +5,9 @@
|
||||
<ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot">
|
||||
<Setter Property="Background" Value="{x:Null}" />
|
||||
<Setter Property="TransparencyLevelHint" Value="Transparent" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="PopupRoot">
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
@@ -44,4 +47,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -210,9 +210,7 @@
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="90" />
|
||||
</Setter.Value>
|
||||
<RotateTransform Angle="90" />
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^:indeterminate /template/ Panel#DeterminateRoot">
|
||||
@@ -445,4 +443,4 @@
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -384,7 +384,7 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False"
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
@@ -421,4 +421,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -265,4 +265,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -189,14 +189,12 @@
|
||||
<Style Selector="^ /template/ Thumb#thumb">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ScrollBarThumbForeground}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border
|
||||
Background="{TemplateBinding Foreground}"
|
||||
CornerRadius="24"
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border
|
||||
Background="{TemplateBinding Foreground}"
|
||||
CornerRadius="{DynamicResource ScrollBarThumbCornerRadius}"
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Thumb#thumb:pointerover">
|
||||
@@ -222,7 +220,7 @@
|
||||
|
||||
<Style Selector="^[IsExpanded=False]">
|
||||
<Style Selector="^ /template/ RepeatButton">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical">
|
||||
<Setter Property="Width" Value="2" />
|
||||
@@ -231,7 +229,6 @@
|
||||
<Setter Property="Height" Value="2" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="{x:Type ScrollViewer}" TargetType="ScrollViewer">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -280,9 +277,14 @@
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.InsetContent /template/ ScrollContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="StaticScrollViewer" TargetType="ScrollViewer">
|
||||
<!-- This ControlTheme equivalent to default ScrollViewer with InsetContent style class. It exists for easier setting via style. -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ScrollViewer">
|
||||
|
||||
@@ -86,4 +86,4 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -272,4 +272,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -3,8 +3,19 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20">
|
||||
<SplitButton>Hello</SplitButton>
|
||||
<StackPanel Width="500" Height="500" Margin="20" Spacing="8">
|
||||
<SplitButton
|
||||
Theme="{DynamicResource SolidSplitButton}"
|
||||
Content="Hello" />
|
||||
<ToggleSplitButton
|
||||
IsChecked="True"
|
||||
HorizontalAlignment="Stretch"
|
||||
Content="Hello" />
|
||||
<SplitButton
|
||||
Theme="{DynamicResource SolidSplitButton}" />
|
||||
<ToggleSplitButton
|
||||
IsChecked="True"
|
||||
HorizontalAlignment="Stretch" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
|
||||
@@ -13,22 +24,18 @@
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
@@ -55,7 +62,7 @@
|
||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
@@ -68,11 +75,28 @@
|
||||
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}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
@@ -84,29 +108,7 @@
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
DockPanel.Dock="Left"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}" />
|
||||
<Rectangle
|
||||
Name="SeparatorBorder"
|
||||
Width="{DynamicResource SplitButtonSeparatorWidth}"
|
||||
VerticalAlignment="Stretch"
|
||||
DockPanel.Dock="Left"
|
||||
Fill="Transparent"
|
||||
StrokeThickness="0" />
|
||||
<Button
|
||||
Name="PART_SecondaryButton"
|
||||
Padding="4,0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -243,4 +243,4 @@
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -64,7 +64,7 @@
|
||||
</Style>
|
||||
-->
|
||||
</ControlTheme>
|
||||
|
||||
|
||||
<ControlTheme x:Key="ScrollTabControl" TargetType="TabControl">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
@@ -86,7 +86,7 @@
|
||||
<DockPanel>
|
||||
<Panel DockPanel.Dock="{TemplateBinding TabStripPlacement}">
|
||||
<ScrollViewer Name="PART_ScrollViewer">
|
||||
<ItemsPresenter Name="PART_ItemsPresenter" ItemsPanel="{TemplateBinding ItemsPanel}" Margin="0 0 12 12"/>
|
||||
<ItemsPresenter Name="PART_ItemsPresenter" ItemsPanel="{TemplateBinding ItemsPanel}" Margin="0 0 12 12" />
|
||||
</ScrollViewer>
|
||||
<Border Name="PART_BorderSeparator" Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Panel>
|
||||
@@ -101,12 +101,12 @@
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||
<Style Selector="^ /template/ ItemsPresenter">
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel Orientation="Vertical"></VirtualizingStackPanel>
|
||||
<VirtualizingStackPanel Orientation="Vertical" />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
@@ -124,7 +124,7 @@
|
||||
<Setter Property="Width" Value="1" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="Margin" Value="0 0 12 0"></Setter>
|
||||
<Setter Property="Margin" Value="0 0 12 0" />
|
||||
</Style>
|
||||
<Style Selector="^[TabStripPlacement=Right] /template/ ScrollViewer#PART_ScrollViewer">
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
@@ -134,7 +134,7 @@
|
||||
<Setter Property="Height" Value="1" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Bottom" />
|
||||
<Setter Property="Margin" Value="0 0 0 12"></Setter>
|
||||
<Setter Property="Margin" Value="0 0 0 12" />
|
||||
</Style>
|
||||
<Style Selector="^[TabStripPlacement=Top] /template/ ScrollViewer#PART_ScrollViewer">
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
|
||||
@@ -150,4 +150,4 @@
|
||||
<Setter Property="VerticalScrollBarVisibility" Value="Disabled" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -130,4 +130,4 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -106,4 +106,4 @@
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundDisabled}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -75,4 +75,4 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -29,7 +29,6 @@
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Cursor" Value="Ibeam" />
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
@@ -75,8 +74,8 @@
|
||||
TextWrapping="{TemplateBinding TextWrapping}">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}"/>
|
||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}"/>
|
||||
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
|
||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
</TextBlock>
|
||||
@@ -172,7 +171,7 @@
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||
<Setter Property="PasswordChar" Value="•"/>
|
||||
<Setter Property="PasswordChar" Value="•" />
|
||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
@@ -219,10 +218,10 @@
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style Selector="^.TextArea">
|
||||
<Setter Property="AcceptsReturn" Value="True"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Top"/>
|
||||
<Setter Property="AcceptsReturn" Value="True" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
||||
</Style>
|
||||
@@ -237,7 +236,6 @@
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Cursor" Value="Ibeam" />
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
@@ -283,8 +281,8 @@
|
||||
TextWrapping="{TemplateBinding TextWrapping}">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}"/>
|
||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}"/>
|
||||
<Binding ElementName="PART_TextPresenter" Path="PreeditText" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
|
||||
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
</TextBlock>
|
||||
@@ -380,7 +378,7 @@
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||
<Setter Property="PasswordChar" Value="•"/>
|
||||
<Setter Property="PasswordChar" Value="•" />
|
||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
@@ -429,8 +427,8 @@
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.TextArea">
|
||||
<Setter Property="AcceptsReturn" Value="True"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Top"/>
|
||||
<Setter Property="AcceptsReturn" Value="True" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
||||
</Style>
|
||||
@@ -440,7 +438,6 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Cursor" Value="Ibeam" />
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
@@ -512,8 +509,8 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Width" Value="16" />
|
||||
<Setter Property="Height" Value="16" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
|
||||
<!-- Background must be transparent or hit test will fail -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -543,4 +540,4 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -5,6 +5,7 @@
|
||||
<ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope">
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" />
|
||||
<Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="TextElement.FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,11 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<TimePickerPresenter />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
|
||||
<Setter Property="Width" Value="242" />
|
||||
<Setter Property="MinWidth" Value="242" />
|
||||
@@ -10,7 +15,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerPopupCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="TimePickerPresenter">
|
||||
<Border
|
||||
@@ -113,8 +118,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -126,11 +130,9 @@
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
FontSize="16"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
@@ -157,8 +159,8 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource DateTimePickerButtonBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerButtonCornerRadius}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
|
||||
@@ -249,9 +251,9 @@
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}"/>
|
||||
Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}" />
|
||||
</Border>
|
||||
|
||||
|
||||
<Rectangle
|
||||
Name="PART_ThirdColumnDivider"
|
||||
Grid.Column="5"
|
||||
@@ -308,7 +310,7 @@
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
<Style Selector="^.clearButton:pointerover, ^.ClearButton:pointerover">
|
||||
<Style Selector="^:not(:hasnotime) /template/ Button#ClearButton">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
@@ -333,4 +335,4 @@
|
||||
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -49,4 +49,4 @@
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -30,8 +30,8 @@
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ToggleButtonDefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource ToggleButtonDefaultFontWeight}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||
@@ -280,4 +280,4 @@
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -39,4 +39,4 @@
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -30,4 +30,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -71,8 +71,8 @@
|
||||
Background="Transparent">
|
||||
<PathIcon
|
||||
Name="PART_ExpandIconPath"
|
||||
Width="{DynamicResource TreeViewItemIconSize}"
|
||||
Height="{DynamicResource TreeViewItemIconSize}"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="Small"
|
||||
Data="{DynamicResource ExpanderIconData}"
|
||||
Foreground="{DynamicResource TreeViewItemIconDefaultForeground}">
|
||||
<PathIcon.Transitions>
|
||||
@@ -96,7 +96,7 @@
|
||||
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
|
||||
<Setter Property="Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource TreeViewItemDefaultCornerRadius}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="TreeViewItem">
|
||||
@@ -179,4 +179,4 @@
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -7,6 +7,7 @@
|
||||
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Window">
|
||||
@@ -30,4 +31,4 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -44,4 +44,4 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
27
src/Semi.Avalonia/Locale/es-es.axaml
Normal file
27
src/Semi.Avalonia/Locale/es-es.axaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.es_es"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">dia</x:String>
|
||||
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">mes</x:String>
|
||||
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">año</x:String>
|
||||
<!-- TimePicker -->
|
||||
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hora</x:String>
|
||||
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minuto</x:String>
|
||||
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">segundo</x:String>
|
||||
<!-- TextBox/SelectableTextBox flyout -->
|
||||
<x:String x:Key="STRING_MENU_CUT">Cortar</x:String>
|
||||
<x:String x:Key="STRING_MENU_COPY">Copiar</x:String>
|
||||
<x:String x:Key="STRING_MENU_PASTE">Pegar</x:String>
|
||||
<!-- ManagedFileChooser -->
|
||||
<x:String x:Key="STRING_CHOOSER_FILE_NAME">Nombre de fichero</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Mostrar ficheros ocultos</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">Cancelar</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_NAME_COLUMN">Nombre</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DATEMODIFIED_COLUMN">Fecha modificada</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_TYPE_COLUMN">Tipo</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_SIZE_COLUMN">Tamaño</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_PROMPT_FILE_ALREADY_EXISTS">{0} ya existe. Quieres reemplazarlo?</x:String>
|
||||
</ResourceDictionary>
|
||||
8
src/Semi.Avalonia/Locale/es-es.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/es-es.axaml.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Locale;
|
||||
|
||||
public class es_es: ResourceDictionary
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<Title>Semi.Avalonia</Title>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 11.2.1.5</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 11.2.1.6</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
|
||||
@@ -20,6 +20,7 @@ public class SemiTheme : Styles
|
||||
{ new CultureInfo("ru-ru"), new ru_ru() },
|
||||
{ new CultureInfo("zh-tw"), new zh_tw() },
|
||||
{ new CultureInfo("de-de"), new de_de() },
|
||||
{ new CultureInfo("es-es"), new es_es() },
|
||||
};
|
||||
|
||||
private static readonly ResourceDictionary _defaultResource = new zh_cn();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<StaticResource x:Key="CalendarBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
<StaticResource x:Key="CalendarCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<GridLength x:Key="CalendarItemWeekDayNameHeight">40</GridLength>
|
||||
<StaticResource x:Key="CalendarItemWeekDayNameFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
<StaticResource x:Key="CalendarItemPreviousIconGlyph" ResourceKey="SemiIconChevronLeft" />
|
||||
<StaticResource x:Key="CalendarItemNextIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="CalendarItemCalendarButtonSelectedFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
@@ -9,4 +10,5 @@
|
||||
<StaticResource x:Key="CalendarItemCalendarDayButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<x:Double x:Key="CalendarMinWidth">240</x:Double>
|
||||
<x:Double x:Key="CalendarMinHeight">250</x:Double>
|
||||
<StaticResource x:Key="CalendarItemWeekDayNameFontSize" ResourceKey="SemiFontSizeSmall" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,8 +1,9 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconCaretUp" />
|
||||
<StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconCaretDown" />
|
||||
<StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconTriangleUp" />
|
||||
<StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconTriangleDown" />
|
||||
<StaticResource x:Key="DateTimePickerAcceptGlyph" ResourceKey="SemiIconTick" />
|
||||
<StaticResource x:Key="DateTimePickerDismissGlyph" ResourceKey="SemiIconClose" />
|
||||
<StaticResource x:Key="DateTimePickerPopupCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<x:Double x:Key="DateTimePickerListBoxItemHeight">36</x:Double>
|
||||
<StaticResource x:Key="DateTimePickerFlyoutPadding" ResourceKey="SemiThicknessNone" />
|
||||
<StaticResource x:Key="DateTimePickerFlyoutBorderMargin" ResourceKey="SemiThicknessTight" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconCaretUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconCaretDown" />
|
||||
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconTriangleUp" />
|
||||
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconTriangleDown" />
|
||||
<StaticResource x:Key="MenuItemExpandIconGlyph" ResourceKey="SemiIconChevronRight" />
|
||||
<StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconTick" />
|
||||
<!-- MenuFlyout -->
|
||||
@@ -11,7 +11,11 @@
|
||||
<x:Double x:Key="MenuFlyoutMinWidth">100</x:Double>
|
||||
<x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double>
|
||||
<x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double>
|
||||
<StaticResource x:Key="MenuFlyoutFontSize" ResourceKey="SemiFontSizeRegular" />
|
||||
<StaticResource x:Key="MenuFlyoutFontWeight" ResourceKey="SemiFontWeightRegular" />
|
||||
<!-- MenuItem -->
|
||||
<Thickness x:Key="TopLevelMenuItemPadding">16 0</Thickness>
|
||||
<StaticResource x:Key="TopLevelMenuItemMinHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
<Thickness x:Key="MenuItemPadding">16 8</Thickness>
|
||||
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="ScrollBarThickness" ResourceKey="SemiSpacingTight" />
|
||||
<StaticResource x:Key="ScrollBarThumbThickness" ResourceKey="SemiSpacingTight" />
|
||||
<StaticResource x:Key="ScrollBarThumbCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<StaticResource x:Key="ScrollBarUpGlyph" ResourceKey="SemiIconSmallTriangleTop" />
|
||||
<StaticResource x:Key="ScrollBarDownGlyph" ResourceKey="SemiIconSmallTriangleDown" />
|
||||
<StaticResource x:Key="ScrollBarLeftGlyph" ResourceKey="SemiIconSmallTriangleLeft" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="TreeViewItemDefaultCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<x:Double x:Key="TreeViewItemIndent">20</x:Double>
|
||||
<x:Double x:Key="TreeViewItemIconSize">8</x:Double>
|
||||
<StaticResource x:Key="ExpanderIconData" ResourceKey="SemiIconTreeTriangleRight" />
|
||||
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
|
||||
<Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="DefaultFontSize" ResourceKey="SemiFontSizeRegular" />
|
||||
<StaticResource x:Key="DefaultFontWeight" ResourceKey="SemiFontWeightRegular" />
|
||||
<StaticResource x:Key="DefaultFontFamily" ResourceKey="SemiFontFamilyRegular" />
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user