Compare commits

...

67 Commits

Author SHA1 Message Date
Zhang Dian
45b1c9ab73 misc: bump version. 2025-03-28 14:53:53 +08:00
Zhang Dian
b780b793c8 Merge pull request #580 from irihitech/various
Config & Separate Semi.Avalonia.DataGrid package
2025-03-28 14:51:34 +08:00
Zhang Dian
de6dc99efb misc: update Overview avalonia icon color. 2025-03-19 13:33:30 +08:00
Zhang Dian
71b1c38ec4 misc: split DataGrid package. 2025-03-19 13:33:30 +08:00
Dong Bin
992017951b Merge pull request #572 from irihitech/tree
enhance TreeDataGrid
2025-03-18 22:43:08 +08:00
Zhang Dian
a796cb828b fix: fix CollapsedChevron icon issue. 2025-03-18 22:36:12 +08:00
Dong Bin
3b41331c67 Merge pull request #573 from snail1519/SolidButton_Custom
fix: Cannot set Background for default SolidButton theme
2025-03-18 21:49:10 +08:00
snail1519
a6711ab453 Update demo/Semi.Avalonia.Demo/Pages/ButtonDemo.axaml
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
2025-03-18 17:22:46 +08:00
snail1519
9eab777faa fix: Cannot set Background for default SolidButton theme 2025-03-18 11:34:40 +08:00
snail1519
ccdbf25004 Revert "fix: Cannot set Background for default SolidButton theme"
This reverts commit 054b6f59d5.
2025-03-18 11:30:03 +08:00
Zhang Dian
626dff4e69 feat: replace shared resources. 2025-03-18 10:24:40 +08:00
snail1519
054b6f59d5 fix: Cannot set Background for default SolidButton theme 2025-03-18 10:13:34 +08:00
Dong Bin
32687b1820 Create FUNDING.yml 2025-03-17 22:27:15 +08:00
Zhang Dian
d0b9f2d7c9 feat: enhance demo. 2025-03-17 14:10:05 +08:00
Zhang Dian
a671ee3fcb feat: replace color resources. 2025-03-17 14:10:05 +08:00
Zhang Dian
67c0db10ac feat: replace TreeDataGrid icon. 2025-03-17 14:10:05 +08:00
Zhang Dian
6cda56a830 feat: replace TreeView icon. 2025-03-17 14:08:22 +08:00
Dong Bin
d7690e464b Merge pull request #569 from irihitech/DataGrid
enhance DataGrid
2025-03-17 11:44:04 +08:00
Dong Bin
41811a84a9 Merge pull request #570 from irihitech/popup
Add some default font properties to PopupRoot
2025-03-15 19:18:16 +08:00
Zhang Dian
51abb760c9 feat: add some default font properties to PopupRoot. 2025-03-15 17:53:25 +08:00
Zhang Dian
f4c0e0d79a feat: replace shared resources. 2025-03-15 17:45:49 +08:00
Zhang Dian
c3c6ef629f misc: format codes. 2025-03-15 17:31:56 +08:00
Zhang Dian
de08d4a20f feat: replace icon. 2025-03-15 17:31:56 +08:00
Zhang Dian
9f432ddee6 feat: replace color resources. 2025-03-15 17:31:56 +08:00
Zhang Dian
21635cfb56 Merge pull request #565 from irihitech/scroll
ScrollBar Update
2025-03-14 16:39:01 +08:00
Zhang Dian
1d54b8ca4b feat: simplify ScrollViewerDemo. 2025-03-13 13:27:14 +08:00
Dong Bin
cf90be7cea feat: implementation for DataGrid. 2025-03-13 11:24:17 +08:00
Dong Bin
9aa24c066b feat: add new StyleClass to ScrollViewer: InsetContent 2025-03-13 11:15:50 +08:00
Dong Bin
d03e80d0ef Merge pull request #559 from irihitech/colorpicker
enhance Colorpicker
2025-03-13 11:04:43 +08:00
Dong Bin
5a1d87e163 Merge pull request #564 from irihitech/splitbutton
Fix the issue of HorizontalAlignment in SplitButton
2025-03-13 10:42:58 +08:00
Zhang Dian
86b2ad53fa fix: fix the issue of HorizontalAlignment in SplitButton. 2025-03-12 15:34:45 +08:00
Zhang Dian
7e33078f00 feat: support HorizontalAlignment="Stretch". 2025-03-12 13:59:32 +08:00
Vicente Penades
8022a80f0e Added spanish locale (#560)
* Added spanish locale

* fixed resource directory name

* Added spanish locale to demo

* using spanish local name
2025-03-11 23:11:14 +08:00
Zhang Dian
08552cf57e feat: some enhancements. 2025-03-11 17:01:28 +08:00
Dong Bin
ffbd8efef7 Merge pull request #552 from irihitech/typesetting
Replace kinds of Discrete Resources
2025-03-10 12:05:15 +08:00
Zhang Dian
ea182c07f0 feat: enhance ColorPicker & redesign demo. 2025-03-10 11:19:56 +08:00
Zhang Dian
776ac47a98 feat: ColorPicker icon. 2025-03-10 11:11:24 +08:00
Zhang Dian
af013bf938 feat: add AssemblyInfo. 2025-03-10 11:04:36 +08:00
Zhang Dian
2192aabf14 feat: enhance Thumb. 2025-03-10 10:54:19 +08:00
Zhang Dian
589221bf88 feat: index resources. 2025-03-09 22:19:32 +08:00
Zhang Dian
27b08caae7 misc: format ColorPicker xaml. 2025-03-07 18:53:49 +08:00
Zhang Dian
a6855ab7db feat: specify ContextMenu FontSize & FontWeight. 2025-03-07 18:14:06 +08:00
Zhang Dian
7a11884d97 Merge branch 'refs/heads/main' into typesetting
# Conflicts:
#	src/Semi.Avalonia/Controls/Calendar.axaml
#	src/Semi.Avalonia/Controls/TimePicker.axaml
2025-03-07 14:49:37 +08:00
Dong Bin
6488c42ea9 Merge pull request #553 from irihitech/various
fix various issues
2025-03-07 13:13:15 +08:00
Dong Bin
645876fe32 feat: stretch calendar header button. 2025-03-07 13:05:40 +08:00
Zhang Dian
74bd41a5c4 feat: enhance Previous & Next Button in Calendar. 2025-03-07 01:07:40 +08:00
Zhang Dian
4e48cde1e7 fix: specify Bold FontWeight to CalendarItemWeekDay. 2025-03-07 01:07:39 +08:00
Zhang Dian
90023554e8 misc: replace BorderThickness resource in TimePicker.axaml. 2025-03-07 01:07:38 +08:00
Zhang Dian
f30b2dc263 feat: adjust TopLevel MenuItem. 2025-03-07 01:07:34 +08:00
Zhang Dian
8094582911 fix: fix the Button in MenuScrollViewer Padding. 2025-03-07 01:07:33 +08:00
Zhang Dian
6dcc27acbc misc: add x:CompileBinding to AdornerLayer.axaml. 2025-03-07 01:06:33 +08:00
Zhang Dian
30f39d1383 feat: replace discrete Icon Size. 2025-03-06 23:35:31 +08:00
Zhang Dian
42233d272c feat: replace discrete CornerRadius. 2025-03-06 22:44:32 +08:00
Zhang Dian
38e4866531 feat: replace discrete FontWeight & specify DefaultFontWeight. 2025-03-06 22:16:23 +08:00
Zhang Dian
623ce798df feat: replace discrete FontSize. 2025-03-06 22:05:58 +08:00
Zhang Dian
19dcb020f1 misc: format Controls axaml. 2025-03-06 14:38:50 +08:00
Dong Bin
9081855ab1 Merge pull request #548 from snail1519/Large-label-vertical-alignment
fix: Large label vertical alignment is wrong
2025-03-06 13:13:24 +08:00
snail1519
3210269589 Rollback LabelTagLargePadding 2025-03-06 10:43:19 +08:00
snail1519
857e14368b fix last commit 2025-03-03 22:48:29 +08:00
snail1519
9ba6a22b6d fix: TagLabel Template issue 2025-03-03 22:16:34 +08:00
snail1519
251f884248 fix: Large label vertical alignment is wrong 2025-03-03 16:02:20 +08:00
Zhang Dian
37211a07e7 misc: bump version. 2025-02-28 17:22:31 +08:00
snail1519
3761a0a3fb fix: 修复ComboBox控件的PlaceholderForeground属性失效 (#543)
* fix: 修复ComboBox控件的PlaceholderForeground属性失效

* Update src/Semi.Avalonia/Themes/Dark/ComboBox.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* Update src/Semi.Avalonia/Controls/ComboBox.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* Update src/Semi.Avalonia/Themes/Light/ComboBox.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源

* Revert "add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源"

This reverts commit ba526e2cf9.

* add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源

* Update src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

---------

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
2025-02-26 10:45:24 +08:00
Zhang Dian
d906a7754c Merge pull request #542 from irihitech/scrollbar
Enhance ScrollViewer
2025-02-24 16:33:27 +08:00
Zhang Dian
d712f16642 feat: redesign ScrollViewer. 2025-02-14 23:12:27 +08:00
Dong Bin
947081302a feat: respect AllowAutoHide property. 2025-02-14 02:48:25 +08:00
Zhang Dian
28ce72dda9 feat: add Toggle SelectionMode to ListDemo. 2025-01-25 13:11:56 +08:00
99 changed files with 886 additions and 936 deletions

15
.github/FUNDING.yml vendored Normal file
View 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']

View File

@@ -21,7 +21,7 @@ on:
Semi_Avalonia_DataGrid: Semi_Avalonia_DataGrid:
description: 'Pack Semi.Avalonia.DataGrid' description: 'Pack Semi.Avalonia.DataGrid'
required: true required: true
default: 'true' default: 'false'
type: boolean type: boolean
Semi_Avalonia_TreeDataGrid: Semi_Avalonia_TreeDataGrid:
description: 'Pack Semi.Avalonia.TreeDataGrid' description: 'Pack Semi.Avalonia.TreeDataGrid'

View File

@@ -16,7 +16,7 @@ on:
Semi_Avalonia_DataGrid: Semi_Avalonia_DataGrid:
description: 'Pack Semi.Avalonia.DataGrid' description: 'Pack Semi.Avalonia.DataGrid'
required: true required: true
default: 'true' default: 'false'
type: boolean type: boolean
Semi_Avalonia_TreeDataGrid: Semi_Avalonia_TreeDataGrid:
description: 'Pack Semi.Avalonia.TreeDataGrid' description: 'Pack Semi.Avalonia.TreeDataGrid'

View File

@@ -20,9 +20,6 @@ jobs:
- name: Pack Semi.Avalonia.ColorPicker - name: Pack Semi.Avalonia.ColorPicker
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets 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 - name: Upload a Build Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:

View File

@@ -1,6 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<AvaloniaVersion>11.2.3</AvaloniaVersion> <AvaloniaVersion>11.2.5</AvaloniaVersion>
<DataGridVersion>11.2.5</DataGridVersion>
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion> <CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -2,8 +2,7 @@
x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo" x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker;assembly=Semi.Avalonia.ColorPicker" xmlns:semi="https://irihi.tech/semi"
xmlns:controls="using:Avalonia.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="1450" d:DesignHeight="1450"
@@ -11,18 +10,15 @@
mc:Ignorable="d"> mc:Ignorable="d">
<ScrollViewer> <ScrollViewer>
<StackPanel Spacing="20"> <StackPanel Spacing="20">
<StackPanel <StackPanel Orientation="Horizontal" Spacing="20">
VerticalAlignment="Top"
Orientation="Horizontal"
Spacing="20">
<ColorView Name="Test" ColorSpectrumShape="Ring" /> <ColorView Name="Test" ColorSpectrumShape="Ring" />
<ColorView ColorSpectrumShape="Box" /> <ColorView ColorSpectrumShape="Box" />
<ColorView Palette="{DynamicResource SemiColorPalette}" /> <ColorView Palette="{DynamicResource SemiColorPalette}" />
</StackPanel> </StackPanel>
<StackPanel VerticalAlignment="Top" Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ColorView <ColorView
Name="SimpleColorViewTest" Name="SimpleColorViewTest"
HsvColor="hsv(120,11%,10%)" HsvColor="hsv(180,80%,70%)"
IsAlphaVisible="True" IsAlphaVisible="True"
Theme="{StaticResource SimpleColorView}" /> Theme="{StaticResource SimpleColorView}" />
<StackPanel> <StackPanel>
@@ -30,63 +26,55 @@
<TextBlock Text="{Binding #SimpleColorViewTest.Color}" /> <TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> <StackPanel Orientation="Horizontal" Spacing="8">
<ColorPicker Margin="8" ColorSpectrumShape="Ring"> <ColorPicker ColorSpectrumShape="Ring">
<ColorPicker.Palette> <ColorPicker.Palette>
<controls:FlatHalfColorPalette /> <FlatHalfColorPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
<ColorPicker Margin="8" ColorSpectrumShape="Box"> <ColorPicker ColorSpectrumShape="Box">
<ColorPicker.Palette> <ColorPicker.Palette>
<colorPicker:SemiColorLightPalette /> <semi:SemiColorLightPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
<ColorPicker <ColorPicker
Margin="8" Theme="{DynamicResource HexColorPicker}"
ColorSpectrumShape="Box" ColorSpectrumShape="Box">
Theme="{DynamicResource HexColorPicker}">
<ColorPicker.Palette> <ColorPicker.Palette>
<colorPicker:SemiColorLightPalette /> <semi:SemiColorLightPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" > <StackPanel HorizontalAlignment="Left">
<TextBlock Text="Use Style to customize button"></TextBlock> <TextBlock Text="Use Style to customize button" />
<ColorPicker <ColorPicker
Margin="8" Margin="8"
Width="32" MinWidth="32"
HsvColor="hsv(120,11%,10%)" HsvColor="hsv(180,80%,70%)">
>
<ColorPicker.Content> <ColorPicker.Content>
<Border <Border
Margin="1" Margin="1"
HorizontalAlignment="Stretch" Background="{Binding $parent[ColorPicker].HsvColor, Converter={StaticResource ToBrushConverter}}"
VerticalAlignment="Stretch"
Background="{Binding $parent[ColorPicker].HsvColor,
Converter={StaticResource ToBrushConverter}}"
CornerRadius="1" /> CornerRadius="1" />
</ColorPicker.Content> </ColorPicker.Content>
<ColorPicker.Styles> <ColorPicker.Styles>
<Style Selector="DropDownButton"> <Style Selector="DropDownButton">
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0" />
<Style Selector="^ /template/ PathIcon"> <Style Selector="^ /template/ PathIcon">
<Setter Property="IsVisible" Value="False"/> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
</Style> </Style>
</ColorPicker.Styles> </ColorPicker.Styles>
</ColorPicker> </ColorPicker>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Spacing="8">
<ColorPicker <ColorPicker
Margin="8" Theme="{StaticResource SimpleColorPicker}"
HsvColor="hsv(120,11%,10%)" HsvColor="hsv(180,80%,70%)" />
Theme="{StaticResource SimpleColorPicker}" />
<ColorPicker <ColorPicker
Margin="8" Theme="{StaticResource HexSimpleColorPicker}"
HsvColor="hsv(120,11%,10%)" HsvColor="hsv(180,80%,70%)" />
Theme="{StaticResource HexSimpleColorPicker}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>

View File

@@ -3,7 +3,6 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo" xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
d:DesignHeight="450" d:DesignHeight="450"
@@ -15,8 +14,9 @@
<TabItem Header="DataGrid"> <TabItem Header="DataGrid">
<Grid RowDefinitions="Auto, *"> <Grid RowDefinitions="Auto, *">
<StackPanel Grid.Row="0" Orientation="Horizontal"> <StackPanel Grid.Row="0" Orientation="Horizontal">
<ToggleSwitch Content="Disable" Name="DisableToggle" /> <ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
<ToggleSwitch Content="ScrollViewerHide" Name="ScrollViewerHide" /> <ToggleSwitch Content="Inset Content" Name="inset" />
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
</StackPanel> </StackPanel>
<DataGrid Grid.Row="1" <DataGrid Grid.Row="1"
Margin="8" Margin="8"
@@ -25,8 +25,9 @@
CanUserSortColumns="True" CanUserSortColumns="True"
HeadersVisibility="All" HeadersVisibility="All"
IsReadOnly="True" IsReadOnly="True"
ScrollViewer.AllowAutoHide="{Binding #ScrollViewerHide.IsChecked}" Classes.InsetContent="{Binding #inset.IsChecked}"
IsEnabled="{Binding #DisableToggle.IsChecked}" ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
IsEnabled="{Binding #enable.IsChecked}"
ItemsSource="{Binding GridData1}"> ItemsSource="{Binding GridData1}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn <DataGridTextColumn

View File

@@ -119,11 +119,11 @@
<StackPanel Spacing="20"> <StackPanel Spacing="20">
<TextBlock Text="Theme: CheckGroupListBox"/> <TextBlock Text="Theme: CheckGroupListBox"/>
<ListBox <ListBox
SelectionMode="Multiple" SelectionMode="Multiple,Toggle"
Theme="{DynamicResource CheckGroupListBox}" Theme="{DynamicResource CheckGroupListBox}"
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" /> ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
<ListBox Theme="{DynamicResource CheckGroupListBox}" <ListBox Theme="{DynamicResource CheckGroupListBox}"
SelectionMode="Multiple" SelectionMode="Multiple,Toggle"
IsEnabled="False"> IsEnabled="False">
<ListBoxItem IsSelected="True">Avalonia</ListBoxItem> <ListBoxItem IsSelected="True">Avalonia</ListBoxItem>
<ListBoxItem>WPF</ListBoxItem> <ListBoxItem>WPF</ListBoxItem>
@@ -131,11 +131,11 @@
<TextBlock Text="Theme: CardCheckGroupListBox"/> <TextBlock Text="Theme: CardCheckGroupListBox"/>
<ListBox <ListBox
SelectionMode="Multiple" SelectionMode="Multiple,Toggle"
Theme="{DynamicResource CardCheckGroupListBox}" Theme="{DynamicResource CardCheckGroupListBox}"
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" /> ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
<ListBox Theme="{DynamicResource CardCheckGroupListBox}" <ListBox Theme="{DynamicResource CardCheckGroupListBox}"
SelectionMode="Multiple" SelectionMode="Multiple,Toggle"
IsEnabled="False"> IsEnabled="False">
<ListBoxItem>Avalonia</ListBoxItem> <ListBoxItem>Avalonia</ListBoxItem>
<ListBoxItem IsSelected="True">WPF</ListBoxItem> <ListBoxItem IsSelected="True">WPF</ListBoxItem>

View File

@@ -41,9 +41,9 @@
<Image.Source> <Image.Source>
<DrawingImage> <DrawingImage>
<DrawingGroup> <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="#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="#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="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="#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="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> </DrawingGroup>
</DrawingImage> </DrawingImage>
</Image.Source> </Image.Source>
@@ -234,7 +234,7 @@
VerticalAlignment="Top" VerticalAlignment="Top"
Palette="{DynamicResource SemiColorPalette}" Palette="{DynamicResource SemiColorPalette}"
SelectedIndex="2" SelectedIndex="2"
Color="#8B44AC" /> Color="#0D6EFD" />
<StackPanel Width="300" Margin="8"> <StackPanel Width="300" Margin="8">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Slider <Slider

View File

@@ -9,7 +9,7 @@ public partial class Overview : UserControl
InitializeComponent(); InitializeComponent();
} }
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.4"; public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.6";
public string MainStyle { get; set; } = public string MainStyle { get; set; } =
""" """
@@ -20,7 +20,7 @@ public partial class Overview : UserControl
</Application.Styles> </Application.Styles>
"""; """;
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.4"; public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.6";
public string ColorPickerStyle { get; set; } = public string ColorPickerStyle { get; set; } =
""" """
@@ -29,7 +29,7 @@ public partial class Overview : UserControl
</Application.Styles> </Application.Styles>
"""; """;
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.4"; public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.6";
public string DataGridStyle { get; set; } = public string DataGridStyle { get; set; } =
""" """
@@ -38,7 +38,7 @@ public partial class Overview : UserControl
</Application.Styles> </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; } = public string TreeDataGridStyle { get; set; } =
""" """

View File

@@ -9,66 +9,22 @@
mc:Ignorable="d"> mc:Ignorable="d">
<ScrollViewer> <ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20"> <StackPanel HorizontalAlignment="Left" Spacing="20">
<ToggleSwitch Name="inset" Content="Inset Content" />
<ToggleSwitch Name="autohide" Content="Allow AutoHide" />
<ScrollViewer <ScrollViewer
Width="200"
Height="200"
Margin="10" Margin="10"
Width="200" Height="200"
AllowAutoHide="{Binding #autohide.IsChecked}"
Classes.InsetContent="{Binding #inset.IsChecked}"
HorizontalScrollBarVisibility="Auto"> HorizontalScrollBarVisibility="Auto">
<Grid RowDefinitions="Auto,Auto" <UniformGrid
ColumnDefinitions="Auto,Auto" Rows="2" Columns="2"
Width="300" Height="300"> Width="300" Height="300">
<Rectangle <Rectangle Fill="{DynamicResource SemiYellow2}" />
Grid.Row="0" Grid.Column="0" <Rectangle Fill="{DynamicResource SemiBlue2}" />
Width="150" <Rectangle Fill="{DynamicResource SemiPink2}" />
Height="150" <Rectangle Fill="{DynamicResource SemiGreen2}" />
Fill="{DynamicResource SemiYellow2}" /> </UniformGrid>
<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>
</ScrollViewer> </ScrollViewer>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>

View File

@@ -12,7 +12,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/> <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.ColorPicker" 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.--> <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)"> <PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets> <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
@@ -22,8 +22,8 @@
</ItemGroup> </ItemGroup>
<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.ColorPicker\Semi.Avalonia.ColorPicker.csproj"/>
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/> <ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/>
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -114,6 +114,12 @@ public partial class MainViewModel : ObservableObject
Command = SelectLocaleCommand, Command = SelectLocaleCommand,
CommandParameter = new CultureInfo("de-de") CommandParameter = new CultureInfo("de-de")
}, },
new MenuItemViewModel
{
Header = "Español",
Command = SelectLocaleCommand,
CommandParameter = new CultureInfo("es-es")
},
] ]
} }
]; ];

View File

@@ -3,15 +3,13 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using Avalonia; using Avalonia;
using Avalonia.Data.Converters; using Avalonia.Data.Converters;
using Avalonia.Media;
using Avalonia.Metadata; using Avalonia.Metadata;
namespace Semi.Avalonia.TreeDataGrid.Demo.Converters; namespace Semi.Avalonia.TreeDataGrid.Demo.Converters;
public class FileIconConverter: IMultiValueConverter public class FileIconConverter : IMultiValueConverter
{ {
[Content] [Content] public IDictionary<string, object?> Items { get; } = new Dictionary<string, object?>();
public Dictionary<string, PathGeometry> Items { get; set; } = new Dictionary<string, PathGeometry>();
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture) public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
{ {
@@ -21,8 +19,10 @@ public class FileIconConverter: IMultiValueConverter
{ {
return Items["file"]; return Items["file"];
} }
return isOpen ? Items["folderOpen"] : Items["folderClosed"]; return isOpen ? Items["folderOpen"] : Items["folderClosed"];
} }
return AvaloniaProperty.UnsetValue; return AvaloniaProperty.UnsetValue;
} }
} }

View File

@@ -13,9 +13,9 @@
mc:Ignorable="d"> mc:Ignorable="d">
<Window.Resources> <Window.Resources>
<converters:FileIconConverter x:Key="FileIconConverter"> <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> <StaticResource x:Key="file" ResourceKey="SemiIconFile" />
<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> <StaticResource x:Key="folderOpen" ResourceKey="SemiIconFolderOpen" />
<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="folderClosed" ResourceKey="SemiIconFolder" />
</converters:FileIconConverter> </converters:FileIconConverter>
</Window.Resources> </Window.Resources>
<Grid RowDefinitions="Auto, *"> <Grid RowDefinitions="Auto, *">
@@ -58,7 +58,7 @@
</TreeDataGrid.Resources> </TreeDataGrid.Resources>
<TreeDataGrid.Styles> <TreeDataGrid.Styles>
<Style Selector="TreeDataGrid TreeDataGridRow:nth-last-child(2n)"> <Style Selector="TreeDataGrid TreeDataGridRow:nth-last-child(2n)">
<Setter Property="Background" Value="#20808080" /> <Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
</Style> </Style>
</TreeDataGrid.Styles> </TreeDataGrid.Styles>
</TreeDataGrid> </TreeDataGrid>
@@ -86,10 +86,8 @@
<DataTemplate x:Key="FileNameCell" DataType="vm:FileNodeViewModel"> <DataTemplate x:Key="FileNameCell" DataType="vm:FileNodeViewModel">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<PathIcon <PathIcon
Width="16" Theme="{StaticResource InnerPathIcon}"
Height="16" Margin="8,0">
Margin="8,0"
VerticalAlignment="Center">
<PathIcon.Data> <PathIcon.Data>
<MultiBinding Converter="{StaticResource FileIconConverter}"> <MultiBinding Converter="{StaticResource FileIconConverter}">
<Binding Path="IsDirectory" /> <Binding Path="IsDirectory" />
@@ -127,7 +125,7 @@
</TreeDataGrid.Resources> </TreeDataGrid.Resources>
<TreeDataGrid.Styles> <TreeDataGrid.Styles>
<Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)"> <Style Selector="TreeDataGrid TreeDataGridRow:nth-child(2n)">
<Setter Property="Background" Value="#20808080" /> <Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
</Style> </Style>
</TreeDataGrid.Styles> </TreeDataGrid.Styles>
</TreeDataGrid> </TreeDataGrid>
@@ -135,4 +133,4 @@
</TabItem> </TabItem>
</TabControl> </TabControl>
</Grid> </Grid>
</Window> </Window>

View File

@@ -1,9 +1,9 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>11.2.1.4</Version> <Version>11.2.1.6</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors> <Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description> <Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl> <RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>

View File

@@ -0,0 +1,3 @@
using Avalonia.Metadata;
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.ColorPicker")]

View File

@@ -1,62 +1,48 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Avalonia.Controls"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:primitives="using:Avalonia.Controls.Primitives"
x:CompileBindings="True"> 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:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
<converters:ToBrushConverter x:Key="ToBrushConverter" /> <converters:ToBrushConverter x:Key="ToBrushConverter" />
<ControlTheme x:Key="{x:Type ColorPicker}" TargetType="ColorPicker"> <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="MinWidth" Value="64" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="MinHeight" Value="{DynamicResource ColorPickerMinHeight}" />
<Setter Property="CornerRadius" Value="{DynamicResource ColorPickerCornerRadius}" />
<Setter Property="Content"> <Setter Property="Content">
<Template> <Template>
<Panel> <Panel>
<Border <Border
Margin="1,1,0,1" Margin="1,1,0,1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
CornerRadius="{TemplateBinding CornerRadius, CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
<Border <Border
Margin="1,1,0,1" Margin="1,1,0,1"
HorizontalAlignment="Stretch" Background="{TemplateBinding HsvColor, Converter={StaticResource ToBrushConverter}}"
VerticalAlignment="Stretch" CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
Background="{TemplateBinding HsvColor,
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius,
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
</Panel> </Panel>
</Template> </Template>
</Setter> </Setter>
<Setter Property="Palette"> <Setter Property="Palette">
<controls:FluentColorPalette /> <FluentColorPalette />
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="{x:Type ColorPicker}"> <ControlTemplate TargetType="{x:Type ColorPicker}">
<DropDownButton <DropDownButton
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
HorizontalContentAlignment="Stretch" MinWidth="{TemplateBinding MinWidth}"
VerticalContentAlignment="Stretch" MinHeight="{TemplateBinding MinHeight}"
ClipToBounds="True" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
ClipToBounds="True"
UseLayoutRounding="False"> UseLayoutRounding="False">
<DropDownButton.Styles> <DropDownButton.Styles>
<Style Selector="FlyoutPresenter.nopadding"> <Style Selector="FlyoutPresenter.nopadding">
@@ -113,13 +99,10 @@
<!-- Spectrum Tab --> <!-- Spectrum Tab -->
<TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}"> <TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewSpectrumIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<Grid Margin="12" RowDefinitions="*"> <Grid Margin="12" RowDefinitions="*">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -127,7 +110,7 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" MinWidth="32" /> <ColumnDefinition Width="Auto" MinWidth="32" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<primitives:ColorSlider <ColorSlider
Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Column="0" Grid.Column="0"
Margin="0,0,12,0" Margin="0,0,12,0"
@@ -141,8 +124,8 @@
IsPerceptive="False" IsPerceptive="False"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -155,7 +138,7 @@
MinSaturation="{TemplateBinding MinSaturation}" MinSaturation="{TemplateBinding MinSaturation}"
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
<primitives:ColorSlider <ColorSlider
Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Column="2" Grid.Column="2"
Margin="12,0,0,0" Margin="12,0,0,0"
@@ -167,24 +150,21 @@
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}" HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
Orientation="Vertical"> Orientation="Vertical">
<primitives:ColorSlider.IsVisible> <ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </ColorSlider.IsVisible>
</primitives:ColorSlider> </ColorSlider>
</Grid> </Grid>
</TabItem> </TabItem>
<!-- Palette Tab --> <!-- Palette Tab -->
<TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}"> <TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewPaletteIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewPaletteIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<ListBox <ListBox
Margin="12" Margin="12"
@@ -217,18 +197,15 @@
<!-- Components Tab --> <!-- Components Tab -->
<TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}"> <TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewComponentsIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewComponentsIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<Grid <Grid
Margin="12" Margin="12"
ColumnDefinitions="Auto,*" ColumnDefinitions="Auto,*"
RowDefinitions="Auto,24,1*,1*,1*,1*,12" RowDefinitions="Auto,24,*,*,*,*,12"
Tag="{TemplateBinding ColorModel}"> Tag="{TemplateBinding ColorModel}">
<Grid.Styles> <Grid.Styles>
<Style Selector="NumericUpDown"> <Style Selector="NumericUpDown">
@@ -272,13 +249,13 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
ColumnDefinitions="1*,12,1*"> ColumnDefinitions="*,12,*">
<!-- RadioButtonGroup --> <!-- RadioButtonGroup -->
<Border <Border
Padding="2" Padding="2"
Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}" Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}"
CornerRadius="3"> CornerRadius="3">
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}"> <Grid ColumnDefinitions="*,*" IsVisible="{TemplateBinding IsColorModelVisible}">
<RadioButton <RadioButton
Name="RgbRadioButton" Name="RgbRadioButton"
Grid.Column="0" Grid.Column="0"
@@ -287,9 +264,9 @@
Content="RGB" Content="RGB"
CornerRadius="3,0,0,3" CornerRadius="3,0,0,3"
IsChecked="{TemplateBinding ColorModel, IsChecked="{TemplateBinding ColorModel,
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorModel.Rgba}, ConverterParameter={x:Static ColorModel.Rgba},
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
<RadioButton <RadioButton
Name="HsvRadioButton" Name="HsvRadioButton"
@@ -299,21 +276,20 @@
Content="HSV" Content="HSV"
CornerRadius="0,3,3,0" CornerRadius="0,3,3,0"
IsChecked="{TemplateBinding ColorModel, IsChecked="{TemplateBinding ColorModel,
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorModel.Hsva}, ConverterParameter={x:Static ColorModel.Hsva},
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
</Grid> </Grid>
</Border> </Border>
<TextBox <TextBox
Name="PART_HexTextBox" Name="PART_HexTextBox"
Grid.Column="2" Grid.Column="2"
Height="32"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
AutomationProperties.Name="Hexadecimal Color" AutomationProperties.Name="Hexadecimal Color"
InnerLeftContent="#" InnerLeftContent="#"
IsVisible="{TemplateBinding IsHexInputVisible}" IsVisible="{TemplateBinding IsHexInputVisible}"
MaxLength="9" /> MaxLength="8" />
</Grid> </Grid>
<!-- Color component editing controls --> <!-- Color component editing controls -->
<!-- Component 1 RGB:Red HSV:Hue --> <!-- Component 1 RGB:Red HSV:Hue -->
@@ -332,15 +308,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component1Slider}" /> Value="{Binding Value, ElementName=Component1Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component1Slider" Name="Component1Slider"
Grid.Row="2" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component1" ColorComponent="Component1"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -363,15 +338,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component2Slider}" /> Value="{Binding Value, ElementName=Component2Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component2Slider" Name="Component2Slider"
Grid.Row="3" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component2" ColorComponent="Component2"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -394,15 +368,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component3Slider}" /> Value="{Binding Value, ElementName=Component3Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component3Slider" Name="Component3Slider"
Grid.Row="4" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component3" ColorComponent="Component3"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -432,34 +405,33 @@
</MultiBinding> </MultiBinding>
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
<primitives:ColorSlider <ColorSlider
x:Name="AlphaComponentSlider" Name="AlphaComponentSlider"
Grid.Row="5" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Alpha" ColorComponent="Alpha"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
Orientation="Horizontal" Orientation="Horizontal"
TickFrequency="1"> TickFrequency="1">
<primitives:ColorSlider.IsVisible> <ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </ColorSlider.IsVisible>
</primitives:ColorSlider> </ColorSlider>
</Grid> </Grid>
</TabItem> </TabItem>
</TabControl> </TabControl>
<!-- Previewer --> <!-- Previewer -->
<!-- Note that top/bottom margins have -5 to remove for drop shadow padding --> <!-- Note that top/bottom margins have -5 to remove for drop shadow padding -->
<primitives:ColorPreviewer <ColorPreviewer
Grid.Row="1" Grid.Row="1"
Margin="12,-5,12,7" Margin="12,-5,12,7"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
@@ -471,9 +443,9 @@
</DropDownButton> </DropDownButton>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ DropDownButton"> <Style Selector="^ /template/ DropDownButton">
<Setter Property="Padding" Value="0 0 10 0"></Setter> <Setter Property="Padding" Value="0 0 10 0" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -481,7 +453,7 @@
x:Key="HexColorPicker" x:Key="HexColorPicker"
BasedOn="{StaticResource {x:Type ColorPicker}}" BasedOn="{StaticResource {x:Type ColorPicker}}"
TargetType="ColorPicker"> TargetType="ColorPicker">
<Setter Property="Width" Value="200" /> <Setter Property="MinWidth" Value="200" />
<Setter Property="Content"> <Setter Property="Content">
<Template> <Template>
<Grid ColumnDefinitions="Auto, *"> <Grid ColumnDefinitions="Auto, *">
@@ -499,8 +471,7 @@
Margin="1,1,0,1" Margin="1,1,0,1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
@@ -525,9 +496,12 @@
<DropDownButton <DropDownButton
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
HorizontalContentAlignment="Stretch" MinWidth="{TemplateBinding MinWidth}"
VerticalContentAlignment="Stretch" MinHeight="{TemplateBinding MinHeight}"
ClipToBounds="True" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
@@ -557,8 +531,8 @@
Grid.Row="0" Grid.Row="0"
CornerRadius="8 8 0 0" CornerRadius="8 8 0 0"
ClipToBounds="True"> ClipToBounds="True">
<primitives:ColorSpectrum <ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}" Components="{TemplateBinding ColorSpectrumComponents}"
@@ -571,7 +545,7 @@
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
</Border> </Border>
<primitives:ColorSlider <ColorSlider
Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1" Grid.Row="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -583,8 +557,8 @@
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Horizontal" /> Orientation="Horizontal" />
<primitives:ColorSlider <ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Row="2" Grid.Row="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -597,8 +571,7 @@
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
TickFrequency="1" TickFrequency="1"
Orientation="Horizontal"> Orientation="Horizontal" />
</primitives:ColorSlider>
<StackPanel <StackPanel
Grid.Row="3" Grid.Row="3"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -675,7 +648,7 @@
x:Key="HexSimpleColorPicker" x:Key="HexSimpleColorPicker"
BasedOn="{StaticResource SimpleColorPicker}" BasedOn="{StaticResource SimpleColorPicker}"
TargetType="ColorPicker"> TargetType="ColorPicker">
<Setter Property="Width" Value="200" /> <Setter Property="MinWidth" Value="200" />
<Setter Property="Content"> <Setter Property="Content">
<Template> <Template>
<Grid ColumnDefinitions="Auto, *"> <Grid ColumnDefinitions="Auto, *">
@@ -693,8 +666,7 @@
Margin="1,1,0,1" Margin="1,1,0,1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<TextBlock <TextBlock
Grid.Column="1" Grid.Column="1"
@@ -709,4 +681,4 @@
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -33,17 +33,16 @@
Name="PART_AccentDecrement2Border" Name="PART_AccentDecrement2Border"
Grid.Column="0" Grid.Column="0"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
ConverterParameter='-2'}" ConverterParameter='-2'}"
CornerRadius="{TemplateBinding CornerRadius, CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource LeftCornerRadiusFilterConverter}}"
Converter={StaticResource LeftCornerRadiusFilterConverter}}"
Tag="-2" /> Tag="-2" />
<Border <Border
Name="PART_AccentDecrement1Border" Name="PART_AccentDecrement1Border"
Grid.Column="1" Grid.Column="1"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
ConverterParameter='-1'}" ConverterParameter='-1'}"
Tag="-1" /> Tag="-1" />
</Grid> </Grid>
<!-- Right accent colors --> <!-- Right accent colors -->
@@ -63,17 +62,16 @@
Name="PART_AccentIncrement1Border" Name="PART_AccentIncrement1Border"
Grid.Column="0" Grid.Column="0"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
ConverterParameter='1'}" ConverterParameter='1'}"
Tag="1" /> Tag="1" />
<Border <Border
Name="PART_AccentIncrement2Border" Name="PART_AccentIncrement2Border"
Grid.Column="1" Grid.Column="1"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
ConverterParameter='2'}" ConverterParameter='2'}"
CornerRadius="{TemplateBinding CornerRadius, CornerRadius="{TemplateBinding CornerRadius,Converter={StaticResource RightCornerRadiusFilterConverter}}"
Converter={StaticResource RightCornerRadiusFilterConverter}}"
Tag="2" /> Tag="2" />
</Grid> </Grid>
<!-- Preview color: Must be last for drop shadow Z-index --> <!-- Preview color: Must be last for drop shadow Z-index -->
@@ -85,12 +83,13 @@
BoxShadow="{DynamicResource ColorPreviewerMainBoxShadow}" BoxShadow="{DynamicResource ColorPreviewerMainBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Panel> <Panel>
<Border Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" CornerRadius="{TemplateBinding CornerRadius}" /> <Border
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
CornerRadius="{TemplateBinding CornerRadius}" />
<Border <Border
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
</Panel> </Panel>
</Border> </Border>
@@ -100,15 +99,15 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
IsVisible="{TemplateBinding IsAccentColorsVisible, IsVisible="{TemplateBinding IsAccentColorsVisible,Converter={x:Static BoolConverters.Not}}">
Converter={x:Static BoolConverters.Not}}">
<Panel> <Panel>
<Border Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" CornerRadius="{TemplateBinding CornerRadius}" /> <Border
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
CornerRadius="{TemplateBinding CornerRadius}" />
<Border <Border
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,Converter={StaticResource ToBrushConverter}}"
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
</Panel> </Panel>
</Border> </Border>

View File

@@ -11,19 +11,17 @@
<Setter Property="UseLayoutRounding" Value="False" /> <Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" /> <Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" />
<Setter Property="CornerRadius" Value="999" /> <Setter Property="CornerRadius" Value="{DynamicResource ColorSliderThumbCornerRadius}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <ControlTemplate>
<ControlTemplate> <Border
<Border Margin="1"
Margin="1" Background="{TemplateBinding Background}"
Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
BorderThickness="{TemplateBinding BorderThickness}" BoxShadow="{DynamicResource ColorSliderBoxShadow}"
BoxShadow="{DynamicResource ColorSliderBoxShadow}" CornerRadius="{TemplateBinding CornerRadius}" />
CornerRadius="{TemplateBinding CornerRadius}" /> </ControlTemplate>
</ControlTemplate>
</Setter.Value>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
@@ -45,20 +43,16 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}" Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
RadiusX="{TemplateBinding CornerRadius, RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
Converter={StaticResource TopLeftCornerRadiusConverter}}" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}" Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}" Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{TemplateBinding Background}" Fill="{TemplateBinding Background}"
RadiusX="{TemplateBinding CornerRadius, RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
Converter={StaticResource TopLeftCornerRadiusConverter}}" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Track <Track
Name="PART_Track" Name="PART_Track"
Height="12" Height="12"
@@ -68,8 +62,7 @@
Maximum="{TemplateBinding Maximum}" Maximum="{TemplateBinding Maximum}"
Minimum="{TemplateBinding Minimum}" Minimum="{TemplateBinding Minimum}"
Orientation="Horizontal" Orientation="Horizontal"
Value="{TemplateBinding Value, Value="{TemplateBinding Value,Mode=TwoWay}">
Mode=TwoWay}">
<Track.DecreaseButton> <Track.DecreaseButton>
<RepeatButton <RepeatButton
Name="PART_DecreaseButton" Name="PART_DecreaseButton"
@@ -106,10 +99,8 @@
</Track.IncreaseButton> </Track.IncreaseButton>
<Thumb <Thumb
Name="ColorSliderThumb" Name="ColorSliderThumb"
Width="16" Width="{TemplateBinding Height}"
Height="16" Height="{TemplateBinding Height}"
Margin="0"
Padding="0"
DataContext="{TemplateBinding Value}" DataContext="{TemplateBinding Value}"
Theme="{StaticResource ColorSliderThumbTheme}" /> Theme="{StaticResource ColorSliderThumbTheme}" />
</Track> </Track>
@@ -136,20 +127,16 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}" Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
RadiusX="{TemplateBinding CornerRadius, RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
Converter={StaticResource TopLeftCornerRadiusConverter}}" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}" Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}" Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{TemplateBinding Background}" Fill="{TemplateBinding Background}"
RadiusX="{TemplateBinding CornerRadius, RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
Converter={StaticResource TopLeftCornerRadiusConverter}}" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Track <Track
Name="PART_Track" Name="PART_Track"
Width="12" Width="12"
@@ -159,8 +146,7 @@
Maximum="{TemplateBinding Maximum}" Maximum="{TemplateBinding Maximum}"
Minimum="{TemplateBinding Minimum}" Minimum="{TemplateBinding Minimum}"
Orientation="Vertical" Orientation="Vertical"
Value="{TemplateBinding Value, Value="{TemplateBinding Value,Mode=TwoWay}">
Mode=TwoWay}">
<Track.DecreaseButton> <Track.DecreaseButton>
<RepeatButton <RepeatButton
Name="PART_DecreaseButton" Name="PART_DecreaseButton"
@@ -199,8 +185,6 @@
Name="ColorSliderThumb" Name="ColorSliderThumb"
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Width}" Height="{TemplateBinding Width}"
Margin="0"
Padding="0"
DataContext="{TemplateBinding Value}" DataContext="{TemplateBinding Value}"
Theme="{StaticResource ColorSliderThumbTheme}" /> Theme="{StaticResource ColorSliderThumbTheme}" />
</Track> </Track>
@@ -231,4 +215,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,125 +1,115 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Avalonia.Controls"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" /> <converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" /> <converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" /> <converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" />
<ControlTheme x:Key="{x:Type ColorSpectrum}" TargetType="ColorSpectrum"> <ControlTheme x:Key="{x:Type ColorSpectrum}" TargetType="ColorSpectrum">
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="{DynamicResource ColorSpectrumCornerRadius}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <ControlTemplate TargetType="{x:Type ColorSpectrum}">
<ControlTemplate TargetType="{x:Type ColorSpectrum}"> <Panel
Name="PART_LayoutRoot"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Panel <Panel
Name="PART_LayoutRoot" Name="PART_SizingPanel"
HorizontalAlignment="Stretch" HorizontalAlignment="Center"
VerticalAlignment="Stretch"> VerticalAlignment="Center"
<Panel ClipToBounds="True">
Name="PART_SizingPanel" <Rectangle
HorizontalAlignment="Center" Name="PART_SpectrumRectangle"
VerticalAlignment="Center" HorizontalAlignment="Stretch"
ClipToBounds="True"> VerticalAlignment="Stretch"
<Rectangle IsHitTestVisible="False"
Name="PART_SpectrumRectangle" IsVisible="{TemplateBinding Shape,
HorizontalAlignment="Stretch" Converter={StaticResource EnumToBoolConverter},
VerticalAlignment="Stretch" ConverterParameter={x:Static ColorSpectrumShape.Box}}"
IsHitTestVisible="False" RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
IsVisible="{TemplateBinding Shape, RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
Converter={StaticResource EnumToBoolConverter}, <Rectangle
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}" Name="PART_SpectrumOverlayRectangle"
RadiusX="{TemplateBinding CornerRadius, HorizontalAlignment="Stretch"
Converter={StaticResource TopLeftCornerRadiusConverter}}" VerticalAlignment="Stretch"
RadiusY="{TemplateBinding CornerRadius, IsHitTestVisible="False"
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> IsVisible="{TemplateBinding Shape,
<Rectangle Converter={StaticResource EnumToBoolConverter},
Name="PART_SpectrumOverlayRectangle" ConverterParameter={x:Static ColorSpectrumShape.Box}}"
HorizontalAlignment="Stretch" RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
VerticalAlignment="Stretch" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
IsHitTestVisible="False" <Ellipse
IsVisible="{TemplateBinding Shape, Name="PART_SpectrumEllipse"
Converter={StaticResource EnumToBoolConverter}, HorizontalAlignment="Stretch"
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}" VerticalAlignment="Stretch"
RadiusX="{TemplateBinding CornerRadius, IsHitTestVisible="False"
Converter={StaticResource TopLeftCornerRadiusConverter}}" IsVisible="{TemplateBinding Shape,
RadiusY="{TemplateBinding CornerRadius, Converter={StaticResource EnumToBoolConverter},
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
<Ellipse <Ellipse
Name="PART_SpectrumEllipse" Name="PART_SpectrumOverlayEllipse"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
IsVisible="{TemplateBinding Shape, IsVisible="{TemplateBinding Shape,
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" /> ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
<Ellipse <Canvas
Name="PART_SpectrumOverlayEllipse" Name="PART_InputTarget"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" Background="Transparent">
IsVisible="{TemplateBinding Shape, <!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers -->
Converter={StaticResource EnumToBoolConverter}, <Panel
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" /> Name="PART_SelectionEllipsePanel"
<Canvas ToolTip.Placement="Top"
Name="PART_InputTarget" ToolTip.VerticalOffset="-10">
HorizontalAlignment="Stretch" <Ellipse
VerticalAlignment="Stretch" Name="FocusEllipse"
Background="Transparent"> Margin="-2"
<!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers --> HorizontalAlignment="Stretch"
<Panel VerticalAlignment="Stretch"
Name="PART_SelectionEllipsePanel" IsHitTestVisible="False"
ToolTip.Placement="Top" StrokeThickness="2" />
ToolTip.VerticalOffset="-10"> <Ellipse
<Ellipse Name="SelectionEllipse"
Name="FocusEllipse" HorizontalAlignment="Stretch"
Margin="-2" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" IsHitTestVisible="False"
VerticalAlignment="Stretch" StrokeThickness="2" />
IsHitTestVisible="False" <ToolTip.Tip>
StrokeThickness="2" /> <!-- Set in code-behind -->
<Ellipse </ToolTip.Tip>
Name="SelectionEllipse" </Panel>
HorizontalAlignment="Stretch" </Canvas>
VerticalAlignment="Stretch" <Rectangle
IsHitTestVisible="False" Name="BorderRectangle"
StrokeThickness="2" /> HorizontalAlignment="Stretch"
<ToolTip.Tip> VerticalAlignment="Stretch"
<!-- Set in code-behind --> IsHitTestVisible="False"
</ToolTip.Tip> IsVisible="{TemplateBinding Shape,
</Panel> Converter={StaticResource EnumToBoolConverter},
</Canvas> ConverterParameter={x:Static ColorSpectrumShape.Box}}"
<Rectangle RadiusX="{TemplateBinding CornerRadius,Converter={StaticResource TopLeftCornerRadiusConverter}}"
Name="BorderRectangle" RadiusY="{TemplateBinding CornerRadius,Converter={StaticResource BottomRightCornerRadiusConverter}}" />
HorizontalAlignment="Stretch" <Ellipse
VerticalAlignment="Stretch" Name="BorderEllipse"
IsHitTestVisible="False" HorizontalAlignment="Stretch"
IsVisible="{TemplateBinding Shape, VerticalAlignment="Stretch"
Converter={StaticResource EnumToBoolConverter}, IsHitTestVisible="False"
ConverterParameter={x:Static controls:ColorSpectrumShape.Box}}" IsVisible="{TemplateBinding Shape,
RadiusX="{TemplateBinding CornerRadius, Converter={StaticResource EnumToBoolConverter},
Converter={StaticResource TopLeftCornerRadiusConverter}}" ConverterParameter={x:Static ColorSpectrumShape.Ring}}" />
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>
</Panel> </Panel>
</ControlTemplate> </Panel>
</Setter.Value> </ControlTemplate>
</Setter> </Setter>
<!-- Normal --> <!-- Normal -->
<!-- Separating this allows easier customization in applications --> <!-- 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="Stroke" Value="{DynamicResource ColorSpectrumBorderBrush}" />
<Setter Property="StrokeThickness" Value="1" /> <Setter Property="StrokeThickness" Value="1" />
</Style> </Style>

View File

@@ -1,11 +1,9 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Avalonia.Controls"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:globalization="using:System.Globalization" xmlns:globalization="using:System.Globalization"
xmlns:pc="using:Avalonia.Controls.Primitives.Converters" xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
xmlns:primitives="using:Avalonia.Controls.Primitives"
xmlns:cvts="clr-namespace:Semi.Avalonia.ColorPicker.Converters" xmlns:cvts="clr-namespace:Semi.Avalonia.ColorPicker.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" /> <pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
@@ -19,6 +17,15 @@
<cvts:ToColorModel x:Key="ToColorModel" /> <cvts:ToColorModel x:Key="ToColorModel" />
<globalization:NumberFormatInfo x:Key="ColorViewComponentNumberFormat" NumberDecimalDigits="0" /> <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 <VisualBrush
x:Key="ColorControlCheckeredBackgroundBrush" x:Key="ColorControlCheckeredBackgroundBrush"
DestinationRect="0,0,8,8" DestinationRect="0,0,8,8"
@@ -116,12 +123,12 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="ColorViewRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="ColorViewRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="RadioButton.FontWeight" Value="{DynamicResource ColorViewRadioButtonFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource ColorViewRadioButtonFontWeight}" />
<Setter Property="RadioButton.Padding" Value="{DynamicResource ColorViewRadioButtonPadding}" /> <Setter Property="Padding" Value="{DynamicResource ColorViewRadioButtonPadding}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource ColorViewRadioButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ColorViewRadioButtonForeground}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonBackground}" />
<Setter Property="RadioButton.Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
@@ -163,10 +170,10 @@
<ControlTheme x:Key="{x:Type ColorView}" TargetType="ColorView"> <ControlTheme x:Key="{x:Type ColorView}" TargetType="ColorView">
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="ColorView.Width" Value="300" /> <Setter Property="Width" Value="300" />
<Setter Property="ColorView.Height" Value="300" /> <Setter Property="Height" Value="300" />
<Setter Property="ColorView.Palette"> <Setter Property="Palette">
<controls:FluentColorPalette /> <FluentColorPalette />
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="{x:Type ColorView}"> <ControlTemplate TargetType="{x:Type ColorView}">
@@ -208,13 +215,10 @@
<!-- Spectrum Tab --> <!-- Spectrum Tab -->
<TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}"> <TabItem IsVisible="{TemplateBinding IsColorSpectrumVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewSpectrumIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewSpectrumIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<Grid Margin="12" RowDefinitions="*"> <Grid Margin="12" RowDefinitions="*">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -222,7 +226,7 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" MinWidth="32" /> <ColumnDefinition Width="Auto" MinWidth="32" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<primitives:ColorSlider <ColorSlider
Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Column="0" Grid.Column="0"
Margin="0,0,12,0" Margin="0,0,12,0"
@@ -236,8 +240,8 @@
IsPerceptive="False" IsPerceptive="False"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -250,8 +254,8 @@
MinSaturation="{TemplateBinding MinSaturation}" MinSaturation="{TemplateBinding MinSaturation}"
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
<primitives:ColorSlider <ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Column="2" Grid.Column="2"
Margin="12,0,0,0" Margin="12,0,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -262,24 +266,21 @@
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}" HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
Orientation="Vertical"> Orientation="Vertical">
<primitives:ColorSlider.IsVisible> <ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </ColorSlider.IsVisible>
</primitives:ColorSlider> </ColorSlider>
</Grid> </Grid>
</TabItem> </TabItem>
<!-- Palette Tab --> <!-- Palette Tab -->
<TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}"> <TabItem IsVisible="{TemplateBinding IsColorPaletteVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewPaletteIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewPaletteIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<ListBox <ListBox
Margin="12" Margin="12"
@@ -312,18 +313,15 @@
<!-- Components Tab --> <!-- Components Tab -->
<TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}"> <TabItem IsVisible="{TemplateBinding IsColorComponentsVisible}">
<TabItem.Header> <TabItem.Header>
<Border Height="{DynamicResource ColorViewTabStripHeight}"> <PathIcon
<PathIcon Theme="{StaticResource InnerPathIcon}"
Width="16" Data="{DynamicResource ColorViewComponentsIconGlyph}"
Height="16" Foreground="{Binding $parent[TabItem].Foreground}" />
Data="{DynamicResource ColorViewComponentsIconGlyph}"
Foreground="{Binding $parent[TabItem].Foreground}" />
</Border>
</TabItem.Header> </TabItem.Header>
<Grid <Grid
Margin="12" Margin="12"
ColumnDefinitions="Auto,*" ColumnDefinitions="Auto,*"
RowDefinitions="Auto,24,1*,1*,1*,1*,12" RowDefinitions="Auto,24,*,*,*,*,12"
UseLayoutRounding="False"> UseLayoutRounding="False">
<Grid.Styles> <Grid.Styles>
<Style Selector="NumericUpDown"> <Style Selector="NumericUpDown">
@@ -339,43 +337,42 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
ColumnDefinitions="1*,12,1*"> ColumnDefinitions="*,12,*">
<!-- RadioButtonGroup --> <!-- RadioButtonGroup -->
<Border <Border
Padding="2" Padding="2"
Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}" Background="{DynamicResource ColorViewRadioButtonPointeroverBackground}"
CornerRadius="3"> CornerRadius="3">
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}"> <Grid ColumnDefinitions="*,*" IsVisible="{TemplateBinding IsColorModelVisible}">
<RadioButton <RadioButton
x:Name="RgbRadioButton" Name="RgbRadioButton"
Grid.Column="0" Grid.Column="0"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Content="RGB" Content="RGB"
CornerRadius="3,0,0,3" CornerRadius="3,0,0,3"
IsChecked="{TemplateBinding ColorModel, IsChecked="{TemplateBinding ColorModel,
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorModel.Rgba}, ConverterParameter={x:Static ColorModel.Rgba},
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
<RadioButton <RadioButton
x:Name="HsvRadioButton" Name="HsvRadioButton"
Grid.Column="1" Grid.Column="1"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Content="HSV" Content="HSV"
CornerRadius="0,3,3,0" CornerRadius="0,3,3,0"
IsChecked="{TemplateBinding ColorModel, IsChecked="{TemplateBinding ColorModel,
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorModel.Hsva}, ConverterParameter={x:Static ColorModel.Hsva},
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
</Grid> </Grid>
</Border> </Border>
<TextBox <TextBox
x:Name="PART_HexTextBox" Name="PART_HexTextBox"
Grid.Column="2" Grid.Column="2"
Height="32"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
AutomationProperties.Name="Hexadecimal Color" AutomationProperties.Name="Hexadecimal Color"
InnerLeftContent="#" InnerLeftContent="#"
@@ -399,15 +396,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component1Slider}" /> Value="{Binding Value, ElementName=Component1Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component1Slider" Name="Component1Slider"
Grid.Row="2" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component1" ColorComponent="Component1"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -430,15 +426,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component2Slider}" /> Value="{Binding Value, ElementName=Component2Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component2Slider" Name="Component2Slider"
Grid.Row="3" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component2" ColorComponent="Component2"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -461,15 +456,14 @@
NumberFormat="{StaticResource ColorViewComponentNumberFormat}" NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component3Slider}" /> Value="{Binding Value, ElementName=Component3Slider}" />
<primitives:ColorSlider <ColorSlider
x:Name="Component3Slider" Name="Component3Slider"
Grid.Row="4" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Component3" ColorComponent="Component3"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
@@ -499,34 +493,33 @@
</MultiBinding> </MultiBinding>
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
<primitives:ColorSlider <ColorSlider
x:Name="AlphaComponentSlider" Name="AlphaComponentSlider"
Grid.Row="5" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
ColorComponent="Alpha" ColorComponent="Alpha"
ColorModel="{TemplateBinding ColorModel, ColorModel="{TemplateBinding ColorModel,Mode=OneWay}"
Mode=OneWay}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
Orientation="Horizontal" Orientation="Horizontal"
TickFrequency="1"> TickFrequency="1">
<primitives:ColorSlider.IsVisible> <ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </ColorSlider.IsVisible>
</primitives:ColorSlider> </ColorSlider>
</Grid> </Grid>
</TabItem> </TabItem>
</TabControl> </TabControl>
<!-- Previewer --> <!-- Previewer -->
<!-- Note that top/bottom margins have -5 to remove for drop shadow padding --> <!-- Note that top/bottom margins have -5 to remove for drop shadow padding -->
<primitives:ColorPreviewer <ColorPreviewer
Grid.Row="1" Grid.Row="1"
Margin="12,-5,12,7" Margin="12,-5,12,7"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
@@ -583,8 +576,8 @@
Grid.Row="0" Grid.Row="0"
CornerRadius="8 8 0 0" CornerRadius="8 8 0 0"
ClipToBounds="True"> ClipToBounds="True">
<primitives:ColorSpectrum <ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}" Components="{TemplateBinding ColorSpectrumComponents}"
@@ -597,7 +590,7 @@
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
</Border> </Border>
<primitives:ColorSlider <ColorSlider
Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1" Grid.Row="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -609,7 +602,7 @@
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Horizontal" /> Orientation="Horizontal" />
<primitives:ColorSlider <ColorSlider
x:Name="ColorSpectrumAlphaSlider" x:Name="ColorSpectrumAlphaSlider"
Grid.Row="2" Grid.Row="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -623,8 +616,7 @@
IsRoundingEnabled="True" IsRoundingEnabled="True"
IsSnapToTickEnabled="True" IsSnapToTickEnabled="True"
TickFrequency="1" TickFrequency="1"
Orientation="Horizontal"> Orientation="Horizontal" />
</primitives:ColorSlider>
<StackPanel <StackPanel
Grid.Row="3" Grid.Row="3"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -693,13 +685,4 @@
<Setter Property="Width" Value="176" /> <Setter Property="Width" Value="176" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary>
<Design.PreviewWith>
<ColorView
Theme="{StaticResource SimpleColorView}"
IsAlphaVisible="True"
IsAlphaEnabled="True"
ColorModel="Hsva"
HsvColor="hsv(120,7%,90%)" />
</Design.PreviewWith>
</ResourceDictionary>

View 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>

View File

@@ -1,21 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" /> <StaticResource x:Key="ColorViewRadioButtonForeground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" /> <StaticResource x:Key="ColorViewRadioButtonBackground" ResourceKey="SemiColorBackground0" />
<SolidColorBrush x:Key="ColorViewRadioButtonPointeroverBackground" Opacity="0.16" Color="White" /> <StaticResource x:Key="ColorViewRadioButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="ColorViewRadioButtonPressedBackground" Opacity="0.20" Color="White" /> <StaticResource x:Key="ColorViewRadioButtonPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedForeground" Color="White" /> <StaticResource x:Key="ColorViewRadioButtonCheckedForeground" ResourceKey="SemiColorWhite" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedBackground" Color="#54A9FF" /> <StaticResource x:Key="ColorViewRadioButtonCheckedBackground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPointeroverBackground" Color="#7FC1FF" /> <StaticResource x:Key="ColorViewRadioButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryPointerover" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPressedBackground" Color="#A9D7FF" /> <StaticResource x:Key="ColorViewRadioButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryActive" />
<StaticResource x:Key="ColorViewTabItemSelectedForeground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewTabItemSelectedForeground" Color="#54A9FF" /> <StaticResource x:Key="ColorSliderDefaultBorderBrush" ResourceKey="SemiColorBlack" />
<StaticResource x:Key="ColorSliderLightBorderBrush" ResourceKey="SemiColorWhite" />
<StaticResource x:Key="ColorSliderDarkBorderBrush" ResourceKey="SemiColorBlack" />
<SolidColorBrush x:Key="ColorSliderDefaultBorderBrush" Color="Black" /> <StaticResource x:Key="ColorSpectrumBorderBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="ColorSliderLightBorderBrush" Color="White" /> <StaticResource x:Key="ColorPreviewerMainBoxShadow" ResourceKey="SemiShadowElevated" />
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" /> <BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -6,7 +6,7 @@
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" /> <ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>
<ResourceDictionary.MergedDictionaries> <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" /> <ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Shared.axaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,21 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" /> <StaticResource x:Key="ColorViewRadioButtonForeground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" /> <StaticResource x:Key="ColorViewRadioButtonBackground" ResourceKey="SemiColorBackground0" />
<SolidColorBrush x:Key="ColorViewRadioButtonPointeroverBackground" Opacity="0.09" Color="#2E3238" /> <StaticResource x:Key="ColorViewRadioButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="ColorViewRadioButtonPressedBackground" Opacity="0.13" Color="#2E3238" /> <StaticResource x:Key="ColorViewRadioButtonPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedForeground" Color="White" /> <StaticResource x:Key="ColorViewRadioButtonCheckedForeground" ResourceKey="SemiColorWhite" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedBackground" Color="#0077FA" /> <StaticResource x:Key="ColorViewRadioButtonCheckedBackground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPointeroverBackground" Color="#0062D6" /> <StaticResource x:Key="ColorViewRadioButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryPointerover" />
<SolidColorBrush x:Key="ColorViewRadioButtonCheckedPressedBackground" Color="#004FB3" /> <StaticResource x:Key="ColorViewRadioButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryActive" />
<StaticResource x:Key="ColorViewTabItemSelectedForeground" ResourceKey="SemiColorPrimary" />
<SolidColorBrush x:Key="ColorViewTabItemSelectedForeground" Color="#0077FA" /> <StaticResource x:Key="ColorSliderDefaultBorderBrush" ResourceKey="SemiColorBlack" />
<StaticResource x:Key="ColorSliderLightBorderBrush" ResourceKey="SemiColorWhite" />
<StaticResource x:Key="ColorSliderDarkBorderBrush" ResourceKey="SemiColorBlack" />
<SolidColorBrush x:Key="ColorSliderDefaultBorderBrush" Color="Black" /> <StaticResource x:Key="ColorSpectrumBorderBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="ColorSliderLightBorderBrush" Color="White" /> <StaticResource x:Key="ColorPreviewerMainBoxShadow" ResourceKey="SemiShadowElevated" />
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" /> <BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.ColorPicker</Title> <Title>Semi.Avalonia.ColorPicker</Title>
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.4</PackageReleaseNotes> <PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.6</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
@@ -12,7 +12,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/> <PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
</ItemGroup> </ItemGroup>

View File

@@ -1,30 +1,31 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker"> xmlns:semi="https://irihi.tech/semi">
<FontWeight x:Key="ColorViewRadioButtonFontWeight">600</FontWeight> <StaticResource x:Key="ColorViewRadioButtonFontWeight" ResourceKey="SemiFontWeightBold" />
<Thickness x:Key="ColorViewRadioButtonPadding">16 4</Thickness> <Thickness x:Key="ColorViewRadioButtonPadding">16 4</Thickness>
<x:Double x:Key="ColorViewNumericUpDownWidth">70</x:Double> <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> <StaticResource x:Key="ColorViewSpectrumIconGlyph" ResourceKey="SemiIconEyedropper" />
<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> <StaticResource x:Key="ColorViewPaletteIconGlyph" ResourceKey="SemiIconColorPalette" />
<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="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> <StaticResource x:Key="ColorSliderWidth" ResourceKey="SemiSpacingBase" />
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius> <StaticResource x:Key="ColorSliderCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness> <StaticResource x:Key="ColorSliderThumbBorderBrush" ResourceKey="SemiThicknessSuperTight" />
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows> <StaticResource x:Key="ColorSliderThumbCornerRadius" ResourceKey="SemiBorderRadiusFull" />
<x:Double x:Key="ColorPreviewerAccentSectionWidth">80</x:Double> <x:Double x:Key="ColorPreviewerAccentSectionWidth">80</x:Double>
<x:Double x:Key="ColorPreviewerAccentSectionHeight">20</x:Double> <x:Double x:Key="ColorPreviewerAccentSectionHeight">20</x:Double>
<x:Double x:Key="ColorPreviewerHeight">48</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="ColorPickerFlyoutPlacement">AnchorAndGravity</PlacementMode>
<PlacementMode x:Key="SimpleColorPickerFlyoutPlacement">BottomEdgeAlignedLeft</PlacementMode> <PlacementMode x:Key="SimpleColorPickerFlyoutPlacement">BottomEdgeAlignedLeft</PlacementMode>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,29 +1,21 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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="DataGridCellBackground" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusBorderBrush" Color="#41464C" /> <StaticResource x:Key="DataGridCellFocusBorderBrush" ResourceKey="SemiColorTertiaryLightActive" />
<SolidColorBrush x:Key="DataGridCellCurrentBorderBrush" Opacity="0.08" Color="White" /> <StaticResource x:Key="DataGridCellCurrentBorderBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="DataGridCellErrorBrush" Color="#6C090B" /> <StaticResource x:Key="DataGridCellErrorBrush" ResourceKey="SemiColorDangerLight" />
<StaticResource x:Key="DataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.16" Color="White" /> <StaticResource x:Key="DataGridColumnHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.20" Color="White" /> <StaticResource x:Key="DataGridColumnHeaderPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" />
<StaticResource x:Key="DataGridRowErrorBackground" ResourceKey="SemiColorDangerLight" />
<SolidColorBrush x:Key="DataGridRowErrorBackground" Color="#6C090B" />
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
<StaticResource x:Key="DataGridRowPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.16" Color="White" /> <StaticResource x:Key="DataGridRowSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Opacity="0.2" Color="#FF54A9FF" /> <StaticResource x:Key="DataGridRowSelectedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Opacity="0.3" Color="#FF54A9FF" /> <StaticResource x:Key="DataGridRowGroupHeaderExpandIconForeground" ResourceKey="SemiColorText2" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.6" Color="#F9F9F9" /> <StaticResource x:Key="DataGridRowGroupHeaderBackground" ResourceKey="SemiColorFill0" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.12" Color="White" /> <StaticResource x:Key="DataGridRowGroupHeaderCurrentBorderBrush" ResourceKey="SemiColorBorder" />
<StaticResource x:Key="DataGridDisabledBackground" ResourceKey="SemiColorDisabledFill" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#E6E8EA" Opacity="0.04" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -126,21 +126,19 @@
Name="HeaderBackground" Name="HeaderBackground"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="4" Margin="4"
CornerRadius="3" /> CornerRadius="{DynamicResource DataGridColumnHeaderCornerRadius}" />
<Grid <Grid
ColumnDefinitions="*,Auto"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid.ColumnDefinitions> <ContentPresenter
<ColumnDefinition Width="*" /> Content="{TemplateBinding Content}"
<ColumnDefinition Width="Auto" /> ContentTemplate="{TemplateBinding ContentTemplate}" />
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
<PathIcon <PathIcon
Name="SortIcon" Name="SortIcon"
Grid.Column="1" Grid.Column="1"
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8"
Margin="0,0,8,0" Margin="0,0,8,0"
Foreground="{TemplateBinding Foreground}" /> Foreground="{TemplateBinding Foreground}" />
</Grid> </Grid>
@@ -293,7 +291,7 @@
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="{DynamicResource DataGridRowMargin}" Margin="{DynamicResource DataGridRowMargin}"
Background="{DynamicResource DataGridRowBackground}" Background="{DynamicResource DataGridRowBackground}"
CornerRadius="3" /> CornerRadius="{DynamicResource DataGridRowCornerRadius}" />
<Rectangle <Rectangle
Name="InvalidVisualElement" Name="InvalidVisualElement"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
@@ -358,8 +356,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<PathIcon <PathIcon
Width="12" Theme="{StaticResource InnerPathIcon}"
Height="12"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Background="Transparent" Background="Transparent"
@@ -375,7 +372,7 @@
<ControlTheme x:Key="{x:Type DataGridRowGroupHeader}" TargetType="DataGridRowGroupHeader"> <ControlTheme x:Key="{x:Type DataGridRowGroupHeader}" TargetType="DataGridRowGroupHeader">
<Setter Property="Focusable" Value="False" /> <Setter Property="Focusable" Value="False" />
<Setter Property="Background" Value="{DynamicResource DataGridRowGroupHeaderBackground}" /> <Setter Property="Background" Value="{DynamicResource DataGridRowGroupHeaderBackground}" />
<Setter Property="MinHeight" Value="32" /> <Setter Property="MinHeight" Value="{DynamicResource DataGridRowGroupHeaderMinHeight}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate x:DataType="collections:DataGridCollectionViewGroup" TargetType="DataGridRowGroupHeader"> <ControlTemplate x:DataType="collections:DataGridCollectionViewGroup" TargetType="DataGridRowGroupHeader">
<DataGridFrozenGrid <DataGridFrozenGrid
@@ -400,20 +397,18 @@
Grid.Column="3" Grid.Column="3"
Margin="12,0,0,0" Margin="12,0,0,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal"> Orientation="Horizontal"
Spacing="4">
<TextBlock <TextBlock
Name="PART_PropertyNameElement" Name="PART_PropertyNameElement"
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding IsPropertyNameVisible}" /> IsVisible="{TemplateBinding IsPropertyNameVisible}" />
<ContentControl <ContentControl
Name="PART_GroupKeyContentControl" Name="PART_GroupKeyContentControl"
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
Content="{Binding Key}" /> Content="{Binding Key}" />
<TextBlock <TextBlock
Name="PART_ItemCountElement" Name="PART_ItemCountElement"
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding IsItemCountVisible}" /> IsVisible="{TemplateBinding IsItemCountVisible}" />
</StackPanel> </StackPanel>
@@ -530,6 +525,7 @@
Name="PART_VerticalScrollbar" Name="PART_VerticalScrollbar"
Grid.Row="1" Grid.Row="1"
Grid.Column="2" Grid.Column="2"
AllowAutoHide="{Binding Path=(ScrollViewer.AllowAutoHide), RelativeSource={RelativeSource TemplatedParent}}"
Orientation="Vertical" /> Orientation="Vertical" />
<Grid <Grid
@@ -540,6 +536,7 @@
<ScrollBar <ScrollBar
Name="PART_HorizontalScrollbar" Name="PART_HorizontalScrollbar"
Grid.Column="1" Grid.Column="1"
AllowAutoHide="{Binding Path=(ScrollViewer.AllowAutoHide), RelativeSource={RelativeSource TemplatedParent}}"
Height="{DynamicResource ScrollBarSize}" Height="{DynamicResource ScrollBarSize}"
Orientation="Horizontal" /> Orientation="Horizontal" />
</Grid> </Grid>
@@ -552,7 +549,7 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{DynamicResource DataGridDisabledBackground}" Background="{DynamicResource DataGridDisabledBackground}"
CornerRadius="2" CornerRadius="{DynamicResource DataGridDisabledCornerRadius}"
IsHitTestVisible="False" IsHitTestVisible="False"
IsVisible="{Binding !$parent[DataGrid].IsEnabled}" /> IsVisible="{Binding !$parent[DataGrid].IsEnabled}" />
</Grid> </Grid>
@@ -572,7 +569,7 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^[(ScrollViewer.AllowAutoHide)=False]"> <Style Selector="^.InsetContent">
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter"> <Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
<Setter Property="Grid.RowSpan" Value="1" /> <Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.ColumnSpan" Value="2" /> <Setter Property="Grid.ColumnSpan" Value="2" />
@@ -582,4 +579,4 @@
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,29 +1,21 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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="DataGridCellBackground" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusBorderBrush" Color="#C6CACD" /> <StaticResource x:Key="DataGridCellFocusBorderBrush" ResourceKey="SemiColorTertiaryLightActive" />
<SolidColorBrush x:Key="DataGridCellCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" /> <StaticResource x:Key="DataGridCellCurrentBorderBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="DataGridCellErrorBrush" Color="#FEF2ED" /> <StaticResource x:Key="DataGridCellErrorBrush" ResourceKey="SemiColorDangerLight" />
<StaticResource x:Key="DataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.09" Color="#2E3238" /> <StaticResource x:Key="DataGridColumnHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.13" Color="#2E3238" /> <StaticResource x:Key="DataGridColumnHeaderPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridRowBackground" Color="Transparent" />
<StaticResource x:Key="DataGridRowErrorBackground" ResourceKey="SemiColorDangerLight" />
<SolidColorBrush x:Key="DataGridRowErrorBackground" Color="#FEF2ED" />
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
<StaticResource x:Key="DataGridRowPointeroverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" /> <StaticResource x:Key="DataGridRowSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Color="#EAF5FF" /> <StaticResource x:Key="DataGridRowSelectedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Color="#CBE7FE" /> <StaticResource x:Key="DataGridRowGroupHeaderExpandIconForeground" ResourceKey="SemiColorText2" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" /> <StaticResource x:Key="DataGridRowGroupHeaderBackground" ResourceKey="SemiColorFill0" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" /> <StaticResource x:Key="DataGridRowGroupHeaderCurrentBorderBrush" ResourceKey="SemiColorBorder" />
<StaticResource x:Key="DataGridDisabledBackground" ResourceKey="SemiColorDisabledFill" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#2E3238" Opacity="0.02" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,10 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Package.props"/>
<PropertyGroup> <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> <Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.4</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
@@ -12,8 +20,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/> <PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/> <None Include="irihi.png" Pack="true" PackagePath=""/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,23 +1,22 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Thickness x:Key="DataGridCellTextBlockDefaultMargin">12 0</Thickness> <Thickness x:Key="DataGridCellTextBlockDefaultMargin">12 0</Thickness>
<StaticResource x:Key="DataGridCellMinHeight" ResourceKey="SemiHeightControlDefault" />
<x:Double x:Key="DataGridCellMinHeight">32</x:Double> <StaticResource x:Key="DataGridCellVisualBorderThickness" ResourceKey="SemiBorderThicknessControl" />
<Thickness x:Key="DataGridCellVisualBorderThickness">1</Thickness> <StaticResource x:Key="DataGridCellVisualStrokeThickness" ResourceKey="SemiBorderSpacingControl" />
<x:Double x:Key="DataGridCellVisualStrokeThickness">1</x:Double>
<Thickness x:Key="DataGridColumnHeaderPadding">12 0 0 0</Thickness> <Thickness x:Key="DataGridColumnHeaderPadding">12 0 0 0</Thickness>
<x:Double x:Key="DataGridColumnHeaderMinHeight">32</x:Double> <StaticResource x:Key="DataGridColumnHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
<StaticResource x:Key="DataGridColumnHeaderCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<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> <StaticResource x:Key="DataGridColumnHeaderAscendingGlyph" ResourceKey="SemiIconSmallTriangleTop" />
<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="DataGridColumnHeaderDescendingGlyph" ResourceKey="SemiIconSmallTriangleDown" />
<!-- <StaticResource x:Key="DataGridColumnHeaderAscendingGlyph" ResourceKey="SemiIconCaretUp" /> -->
<!-- <StaticResource x:Key="DataGridColumnHeaderDescendingGlyph" ResourceKey="SemiIconCaretDown" /> -->
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness> <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="DataGridRowGroupHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
<!-- <StaticResource x:Key="DataGridRowGroupHeaderExpandIconGlyph" ResourceKey="SemiIconChevronRight" /> --> <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> </ResourceDictionary>

View File

@@ -1,11 +1,11 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="White" /> <StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.16" Color="White" /> <StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.20" Color="White" /> <StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverForeground" Opacity="0.8" Color="#F9F9F9" /> <StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedForeground" Opacity="1" Color="#F9F9F9" /> <StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
<SolidColorBrush x:Key="TreeDataGridCellSelectedBackground" Opacity="0.2" Color="#FF54A9FF" /> <StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
<SolidColorBrush x:Key="TreeDataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" /> <StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,11 +1,11 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="#1C1F23" /> <StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.09" Color="#2E3238" /> <StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.13" Color="#2E3238" /> <StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverForeground" Opacity="0.8" Color="#1C1F23" /> <StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedForeground" Opacity="1" Color="#1C1F23" /> <StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
<SolidColorBrush x:Key="TreeDataGridCellSelectedBackground" Color="#EAF5FF" /> <StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
<SolidColorBrush x:Key="TreeDataGridColumnHeaderForeground" Opacity="0.62" Color="#1C1F23" /> <StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>11.0.10.1</Version> <Version>11.0.10.2</Version>
<PackageReleaseNotes>Update to 11.0.10.1</PackageReleaseNotes> <PackageReleaseNotes>Update to 11.0.10.2</PackageReleaseNotes>
<Authors>IRIHI Technology Co., Ltd.</Authors> <Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description> <Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl> <RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>

View File

@@ -1,9 +1,11 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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> <StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconSmallTriangleTop" />
<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> <StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconSmallTriangleDown" />
<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="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight" />
<!-- <StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconCaretUp"/> --> <StaticResource x:Key="TreeDataGridItemCollapsedChevronWidth" ResourceKey="SemiWidthIconMedium" />
<!-- <StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconCaretDown"/> --> <StaticResource x:Key="TreeDataGridColumnHeaderCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<!-- <StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight"/> --> <StaticResource x:Key="TreeDataGridColumnHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness> <StaticResource x:Key="TreeDataGridRowCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<StaticResource x:Key="TreeDataGridRowMinHeight" ResourceKey="SemiHeightControlDefault" />
<StaticResource x:Key="TreeDataGridRowMargin" ResourceKey="SemiThicknessSuperTight" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -49,10 +49,10 @@
<ControlTheme x:Key="{x:Type TreeDataGridColumnHeader}" TargetType="TreeDataGridColumnHeader"> <ControlTheme x:Key="{x:Type TreeDataGridColumnHeader}" TargetType="TreeDataGridColumnHeader">
<Setter Property="Background" Value="Transparent" /> <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="Padding" Value="8 2 0 2" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="4" /> <Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridColumnHeaderCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
<Setter Property="Template"> <Setter Property="Template">
@@ -87,11 +87,8 @@
</Panel> </Panel>
<PathIcon <PathIcon
Name="SortIcon" Name="SortIcon"
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8"
Margin="0,0,8,0" Margin="0,0,8,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
DockPanel.Dock="Right" DockPanel.Dock="Right"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
TabIndex="1" /> TabIndex="1" />
@@ -140,8 +137,8 @@
<ControlTheme x:Key="{x:Type TreeDataGridRow}" TargetType="TreeDataGridRow"> <ControlTheme x:Key="{x:Type TreeDataGridRow}" TargetType="TreeDataGridRow">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="CornerRadius" Value="3" /> <Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridRowCornerRadius}" />
<Setter Property="MinHeight" Value="32" /> <Setter Property="MinHeight" Value="{DynamicResource TreeDataGridRowMinHeight}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
@@ -192,25 +189,17 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="TreeDataGridExpandCollapseChevron" TargetType="ToggleButton"> <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="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <PathIcon
Name="ChevronPath"
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
HorizontalAlignment="Center" Theme="{StaticResource InnerPathIcon}"
VerticalAlignment="Center" Classes="Small"
Background="Transparent"> Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
<PathIcon Foreground="{TemplateBinding Foreground}" />
Name="ChevronPath"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
Foreground="{TemplateBinding Foreground}" />
</Border>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:checked /template/ PathIcon#ChevronPath"> <Style Selector="^:checked /template/ PathIcon#ChevronPath">
@@ -223,18 +212,16 @@
<ControlTemplate> <ControlTemplate>
<Border <Border
Name="CellBorder" Name="CellBorder"
Padding="{TemplateBinding Indent, Padding="{TemplateBinding Indent,Converter={x:Static conv:IndentConverter.Instance}}"
Converter={x:Static conv:IndentConverter.Instance}}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<DockPanel> <DockPanel>
<Border <Border
Width="12" DockPanel.Dock="Left"
Height="12" Width="{DynamicResource TreeDataGridItemCollapsedChevronWidth}"
Margin="4,0" Margin="4,0">
DockPanel.Dock="Left">
<ToggleButton <ToggleButton
Focusable="False" Focusable="False"
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
@@ -335,4 +322,4 @@
</Setter> </Setter>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer"> <ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
<Setter Property="DefaultFocusAdorner"> <Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate> <FocusAdornerTemplate>

View File

@@ -79,12 +79,12 @@
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}" BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}" BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}"> CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
<ListBox <ListBox
Name="PART_SelectingItemsControl" Name="PART_SelectingItemsControl"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
ItemTemplate="{TemplateBinding ItemTemplate}" ItemTemplate="{TemplateBinding ItemTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" /> ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Border> </Border>
</Popup> </Popup>
</Panel> </Panel>
@@ -98,4 +98,4 @@
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -31,4 +31,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -108,11 +108,9 @@
Classes="Solid" /> Classes="Solid" />
</FocusAdornerTemplate> </FocusAdornerTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
</Style>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
@@ -272,8 +270,8 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="InnerIconButton" TargetType="Button"> <ControlTheme x:Key="InnerIconButton" TargetType="Button">
<Setter Property="Width" Value="16"/> <Setter Property="Width" Value="{DynamicResource SemiWidthIconMedium}" />
<Setter Property="Height" Value="16"/> <Setter Property="Height" Value="{DynamicResource SemiWidthIconMedium}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />

View File

@@ -98,7 +98,7 @@
<Setter Property="Margin" Value="0 0 4 0" /> <Setter Property="Margin" Value="0 0 4 0" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#ButtonGroup"> <Style Selector="^:pointerover /template/ Border#ButtonGroup">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}"/> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -2,6 +2,11 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith>
<Border Padding="20">
<Calendar />
</Border>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar"> <ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" /> <Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
@@ -37,7 +42,8 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="x:String" x:DataType="x:String"
FontSize="12" FontSize="{DynamicResource CalendarItemWeekDayNameFontSize}"
FontWeight="{DynamicResource CalendarItemWeekDayNameFontWeight}"
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}" Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
Text="{Binding}" /> Text="{Binding}" />
</Template> </Template>
@@ -58,38 +64,41 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
RowDefinitions="Auto,*"> RowDefinitions="Auto,*">
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto"> <Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
<Button <RepeatButton
Name="PART_PreviousButton" Name="PART_PreviousButton"
Grid.Column="0" Grid.Column="0"
HorizontalContentAlignment="Left" Padding="0"
MinWidth="{Binding $self.MinHeight}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessRepeatButton}">
<PathIcon <PathIcon
Theme="{DynamicResource InnerPathIcon}" Theme="{DynamicResource InnerPathIcon}"
Classes="Large" Classes="Large"
Data="{DynamicResource CalendarItemPreviousIconGlyph}" Data="{DynamicResource CalendarItemPreviousIconGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" /> Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button> </RepeatButton>
<Button <Button
Name="PART_HeaderButton" Name="PART_HeaderButton"
Grid.Column="1" Grid.Column="1"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
HorizontalAlignment="Stretch"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}" /> Theme="{DynamicResource BorderlessButton}" />
<Button <RepeatButton
Name="PART_NextButton" Name="PART_NextButton"
Grid.Column="2" Grid.Column="2"
HorizontalContentAlignment="Left" Padding="0"
MinWidth="{Binding $self.MinHeight}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}"> Theme="{DynamicResource BorderlessRepeatButton}">
<PathIcon <PathIcon
Theme="{DynamicResource InnerPathIcon}" Theme="{DynamicResource InnerPathIcon}"
Classes="Large" Classes="Large"
Data="{DynamicResource CalendarItemNextIconGlyph}" Data="{DynamicResource CalendarItemNextIconGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" /> Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button> </RepeatButton>
</Grid> </Grid>
<Grid <Grid
Name="PART_MonthView" Name="PART_MonthView"
@@ -244,4 +253,4 @@
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -13,7 +13,7 @@
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge"/> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="IsTodayHighlighted" Value="True" /> <Setter Property="IsTodayHighlighted" Value="True" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
@@ -34,7 +34,7 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"/> CornerRadius="{TemplateBinding CornerRadius}" />
<Grid <Grid
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -227,4 +227,4 @@
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -83,7 +83,7 @@
<ControlTheme x:Key="CarouselIndicatorDotListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CarouselIndicatorDotListBoxItem" TargetType="ListBoxItem">
<Setter Property="Foreground" Value="{DynamicResource CarouselIndicatorForeground}" /> <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="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
@@ -108,7 +108,7 @@
<ControlTheme x:Key="CarouselIndicatorLineListBoxItem" <ControlTheme x:Key="CarouselIndicatorLineListBoxItem"
BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}" BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}"
TargetType="ListBoxItem"> TargetType="ListBoxItem">
<Setter Property="Margin" Value="2 0"/> <Setter Property="Margin" Value="2 0" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Rectangle <Rectangle
@@ -122,9 +122,9 @@
<ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem" <ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem"
BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}" BasedOn="{StaticResource CarouselIndicatorDotListBoxItem}"
TargetType="ListBoxItem"> TargetType="ListBoxItem">
<Setter Property="Width" Value="{DynamicResource CarouselIndicatorColumnarWidth}"/> <Setter Property="Width" Value="{DynamicResource CarouselIndicatorColumnarWidth}" />
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}"/> <Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}" />
<Setter Property="Margin" Value="2 0"/> <Setter Property="Margin" Value="2 0" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Rectangle <Rectangle
@@ -250,4 +250,4 @@
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -12,7 +12,7 @@
<ComboBoxItem>BBB</ComboBoxItem> <ComboBoxItem>BBB</ComboBoxItem>
<ComboBoxItem>CCC</ComboBoxItem> <ComboBoxItem>CCC</ComboBoxItem>
</ComboBox> </ComboBox>
<ComboBox Width="100" PlaceholderText="Select"> <ComboBox Width="100" PlaceholderText="Select" PlaceholderForeground="Red">
<ComboBoxItem>AAA</ComboBoxItem> <ComboBoxItem>AAA</ComboBoxItem>
<ComboBoxItem>BBB</ComboBoxItem> <ComboBoxItem>BBB</ComboBoxItem>
<ComboBoxItem>CCC</ComboBoxItem> <ComboBoxItem>CCC</ComboBoxItem>
@@ -44,6 +44,7 @@
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxSelectorPlaceHolderForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ComboBox"> <ControlTemplate TargetType="ComboBox">
<DataValidationErrors> <DataValidationErrors>
@@ -65,9 +66,8 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding PlaceholderForeground}"
IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}" IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}"
Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" /> Text="{TemplateBinding PlaceholderText}" />
<ContentPresenter <ContentPresenter
Name="ContentPresenter" Name="ContentPresenter"
@@ -137,7 +137,7 @@
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" /> <Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph"> <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>
</Style> </Style>
@@ -320,4 +320,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -10,9 +10,10 @@
<Setter Property="MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" /> <Setter Property="MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" /> <Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True"></Setter> <Setter Property="Focusable" Value="True" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <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="WindowManagerAddShadowHint" Value="False" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ContextMenu"> <ControlTemplate TargetType="ContextMenu">
@@ -38,4 +39,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -104,4 +104,4 @@
</DataTemplate> </DataTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -2,15 +2,19 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith>
<Border Padding="20">
<DatePickerPresenter />
</Border>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter"> <ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
<Setter Property="Width" Value="296" /> <Setter Property="Width" Value="296" />
<Setter Property="MinWidth" Value="296" /> <Setter Property="MinWidth" Value="296" />
<Setter Property="MaxHeight" Value="300" /> <Setter Property="MaxHeight" Value="300" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerPopupCornerRadius}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DatePickerPresenter"> <ControlTemplate TargetType="DatePickerPresenter">
<Border <Border
@@ -92,8 +96,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}"> Theme="{StaticResource DateTimePickerButton}">
<PathIcon <PathIcon
Width="12" Theme="{StaticResource InnerPathIcon}"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" /> Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button> </Button>
<Rectangle <Rectangle
@@ -107,8 +110,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}"> Theme="{StaticResource DateTimePickerButton}">
<PathIcon <PathIcon
Width="12" Theme="{StaticResource InnerPathIcon}"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" /> Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button> </Button>
<Rectangle <Rectangle
@@ -268,4 +270,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -115,8 +115,8 @@
<Setter Property="Content"> <Setter Property="Content">
<Template> <Template>
<PathIcon <PathIcon
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8" Classes="ExtraSmall"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DateTimePickerButtonUpGlyph}" /> Data="{DynamicResource DateTimePickerButtonUpGlyph}" />
@@ -136,12 +136,12 @@
<Setter Property="Content"> <Setter Property="Content">
<Template> <Template>
<PathIcon <PathIcon
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8" Classes="ExtraSmall"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DateTimePickerButtonDownGlyph}" /> Data="{DynamicResource DateTimePickerButtonDownGlyph}" />
</Template> </Template>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -3,6 +3,7 @@
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" /> <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
@@ -21,4 +22,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -149,4 +149,4 @@
<Setter Property="Foreground" Value="{DynamicResource ExpanderHeaderDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ExpanderHeaderDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -90,4 +90,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -26,4 +26,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -16,4 +16,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -170,14 +170,13 @@
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="UseLayoutRounding" Value="False" /> <Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource LabelTagSmallPadding}" /> <Setter Property="Padding" Value="{DynamicResource LabelTagSmallPadding}" />
<Setter Property="FontSize" Value="{DynamicResource LabelTagFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource LabelTagFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Label"> <ControlTemplate TargetType="Label">
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -406,4 +405,4 @@
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -59,7 +59,6 @@
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
FontWeight="Normal"
Foreground="{TemplateBinding Foreground}" /> Foreground="{TemplateBinding Foreground}" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>

View File

@@ -195,7 +195,7 @@
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooserOverwritePrompt}" <ControlTheme x:Key="{x:Type dialogs:ManagedFileChooserOverwritePrompt}"
TargetType="dialogs:ManagedFileChooserOverwritePrompt"> TargetType="dialogs:ManagedFileChooserOverwritePrompt">
<Setter Property="MaxWidth" Value="400" /> <Setter Property="MaxWidth" Value="400" />
<Setter Property="Padding" Value="10"/> <Setter Property="Padding" Value="10" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border Background="{TemplateBinding Background}" <Border Background="{TemplateBinding Background}"
@@ -233,4 +233,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -24,6 +24,7 @@
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
CornerRadius="0" CornerRadius="0"
MinHeight="0" MinHeight="0"
Padding="0 4"
DockPanel.Dock="Top" DockPanel.Dock="Top"
RenderTransform="{x:Null}"> RenderTransform="{x:Null}">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
@@ -37,8 +38,8 @@
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<PathIcon <PathIcon
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8" Classes="ExtraSmall"
Data="{DynamicResource MenuScrollViewerUpButtonGlyph}" Data="{DynamicResource MenuScrollViewerUpButtonGlyph}"
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" /> Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
</RepeatButton> </RepeatButton>
@@ -49,8 +50,9 @@
BorderThickness="0" BorderThickness="0"
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}" Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
CornerRadius="0" CornerRadius="0"
DockPanel.Dock="Bottom"
MinHeight="0" MinHeight="0"
Padding="0 4"
DockPanel.Dock="Bottom"
RenderTransform="{x:Null}"> RenderTransform="{x:Null}">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
<MultiBinding <MultiBinding
@@ -63,8 +65,8 @@
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<PathIcon <PathIcon
Width="8" Theme="{StaticResource InnerPathIcon}"
Height="8" Classes="ExtraSmall"
Data="{DynamicResource MenuScrollViewerDownButtonGlyph}" Data="{DynamicResource MenuScrollViewerDownButtonGlyph}"
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" /> Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
</RepeatButton> </RepeatButton>
@@ -301,7 +303,8 @@
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}" /> <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. --> <!-- 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"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
@@ -324,8 +327,7 @@
MinWidth="{Binding $parent[MenuItem].Bounds.Width}" MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
HorizontalOffset="-8" HorizontalOffset="-8"
IsLightDismissEnabled="True" IsLightDismissEnabled="True"
IsOpen="{TemplateBinding IsSubMenuOpen, IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
Mode=TwoWay}"
OverlayInputPassThroughElement="{Binding $parent[Menu]}" OverlayInputPassThroughElement="{Binding $parent[Menu]}"
Placement="BottomEdgeAlignedLeft" Placement="BottomEdgeAlignedLeft"
VerticalOffset="-4" VerticalOffset="-4"

View File

@@ -55,4 +55,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -172,7 +172,7 @@
<Setter Property="Background" Value="{DynamicResource NotificationCardLightBackground}" /> <Setter Property="Background" Value="{DynamicResource NotificationCardLightBackground}" />
<Style Selector="^:information /template/ Border#PART_RootBorder"> <Style Selector="^:information /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightInformationBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightInformationBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardLightInformationBackground}"/> <Setter Property="Background" Value="{DynamicResource NotificationCardLightInformationBackground}" />
</Style> </Style>
<Style Selector="^:success /template/ Border#PART_RootBorder"> <Style Selector="^:success /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightSuccessBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightSuccessBorderBrush}" />

View File

@@ -25,8 +25,8 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="InnerPathIcon" TargetType="PathIcon"> <ControlTheme x:Key="InnerPathIcon" TargetType="PathIcon">
<Setter Property="Height" Value="16" /> <Setter Property="Width" Value="{StaticResource SemiWidthIconMedium}" />
<Setter Property="Width" Value="16" /> <Setter Property="Height" Value="{StaticResource SemiWidthIconMedium}" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="PathIcon"> <ControlTemplate TargetType="PathIcon">
@@ -48,20 +48,20 @@
<Setter Property="Fill" Value="{TemplateBinding BorderBrush}" /> <Setter Property="Fill" Value="{TemplateBinding BorderBrush}" />
</Style> </Style>
<Style Selector="^.ExtraSmall"> <Style Selector="^.ExtraSmall">
<Setter Property="Height" Value="8" /> <Setter Property="Width" Value="{StaticResource SemiWidthIconExtraSmall}" />
<Setter Property="Width" Value="8" /> <Setter Property="Height" Value="{StaticResource SemiWidthIconExtraSmall}" />
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small">
<Setter Property="Height" Value="12" /> <Setter Property="Width" Value="{StaticResource SemiWidthIconSmall}" />
<Setter Property="Width" Value="12" /> <Setter Property="Height" Value="{StaticResource SemiWidthIconSmall}" />
</Style> </Style>
<Style Selector="^.Large"> <Style Selector="^.Large">
<Setter Property="Height" Value="20" /> <Setter Property="Width" Value="{StaticResource SemiWidthIconLarge}" />
<Setter Property="Width" Value="20" /> <Setter Property="Height" Value="{StaticResource SemiWidthIconLarge}" />
</Style> </Style>
<Style Selector="^.ExtraLarge"> <Style Selector="^.ExtraLarge">
<Setter Property="Height" Value="24" /> <Setter Property="Width" Value="{StaticResource SemiWidthIconExtraLarge}" />
<Setter Property="Width" Value="24" /> <Setter Property="Height" Value="{StaticResource SemiWidthIconExtraLarge}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -5,6 +5,9 @@
<ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot"> <ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot">
<Setter Property="Background" Value="{x:Null}" /> <Setter Property="Background" Value="{x:Null}" />
<Setter Property="TransparencyLevelHint" Value="Transparent" /> <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"> <Setter Property="Template">
<ControlTemplate TargetType="PopupRoot"> <ControlTemplate TargetType="PopupRoot">
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}"> <LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
@@ -44,4 +47,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -210,9 +210,7 @@
</Style> </Style>
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl"> <Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
<Setter Property="LayoutTransform"> <Setter Property="LayoutTransform">
<Setter.Value> <RotateTransform Angle="90" />
<RotateTransform Angle="90" />
</Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style Selector="^:indeterminate /template/ Panel#DeterminateRoot"> <Style Selector="^:indeterminate /template/ Panel#DeterminateRoot">
@@ -445,4 +443,4 @@
</Style.Animations> </Style.Animations>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -384,7 +384,7 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
UseLayoutRounding="False" UseLayoutRounding="False"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -421,4 +421,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -265,4 +265,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -2,7 +2,6 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:dialog="using:Avalonia.Dialogs"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel> <StackPanel>
@@ -18,15 +17,16 @@
Height="400" Height="400"
Background="aqua" /> Background="aqua" />
</ScrollViewer> </ScrollViewer>
<dialog:ManagedFileChooser />
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="ScrollBarRepeatButton" TargetType="{x:Type RepeatButton}"> <ControlTheme x:Key="ScrollBarRepeatButton" TargetType="{x:Type RepeatButton}">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="Gray" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}"> <Border
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}">
<ContentPresenter <ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -39,35 +39,42 @@
<ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar"> <ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Width" Duration="0:0:0.1" />
<DoubleTransition Property="Height" Duration="0:0:0.1" />
<!--<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" />-->
</Transitions>
</Setter>
<Style Selector="^:horizontal"> <Style Selector="^:horizontal">
<Setter Property="Height" Value="{DynamicResource ScrollBarThickness}" /> <Setter Property="Height" Value="{StaticResource ScrollBarThickness}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ScrollBar"> <ControlTemplate TargetType="ScrollBar">
<Border Background="{DynamicResource ScrollBarBackground}" UseLayoutRounding="False"> <Border
Background="{DynamicResource ScrollBarBackground}"
UseLayoutRounding="False">
<Grid Name="PART_RootGrid" ColumnDefinitions="Auto,*,Auto"> <Grid Name="PART_RootGrid" ColumnDefinitions="Auto,*,Auto">
<RepeatButton <RepeatButton
Name="PART_LineUpButton" Name="PART_LineUpButton"
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
MinWidth="{DynamicResource ScrollBarThickness}" MinWidth="{StaticResource ScrollBarThickness}"
Padding="4,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}"> Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon <PathIcon
Width="10" Theme="{StaticResource InnerPathIcon}"
Height="10" Classes="Large"
Data="{DynamicResource ScrollBarLeftGlyph}" /> Data="{StaticResource ScrollBarLeftGlyph}" />
</RepeatButton> </RepeatButton>
<Track <Track
Grid.Column="1" Grid.Column="1"
DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
Maximum="{TemplateBinding Maximum}" Maximum="{TemplateBinding Maximum}"
Minimum="{TemplateBinding Minimum}" Minimum="{TemplateBinding Minimum}"
Orientation="{TemplateBinding Orientation}" Orientation="{TemplateBinding Orientation}"
ViewportSize="{TemplateBinding ViewportSize}" ViewportSize="{TemplateBinding ViewportSize}"
DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Value="{TemplateBinding Value, Mode=TwoWay}">
Value="{TemplateBinding Value,
Mode=TwoWay}">
<Track.DecreaseButton> <Track.DecreaseButton>
<RepeatButton <RepeatButton
Name="PART_PageUpButton" Name="PART_PageUpButton"
@@ -76,7 +83,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
CornerRadius="0" CornerRadius="0"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" /> Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.DecreaseButton> </Track.DecreaseButton>
<Track.IncreaseButton> <Track.IncreaseButton>
<RepeatButton <RepeatButton
@@ -86,7 +93,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
CornerRadius="0" CornerRadius="0"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" /> Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.IncreaseButton> </Track.IncreaseButton>
<Thumb Name="thumb" /> <Thumb Name="thumb" />
</Track> </Track>
@@ -94,14 +101,13 @@
Name="PART_LineDownButton" Name="PART_LineDownButton"
Grid.Column="2" Grid.Column="2"
MinWidth="{DynamicResource ScrollBarThickness}" MinWidth="{DynamicResource ScrollBarThickness}"
Padding="4,0"
VerticalAlignment="Center" VerticalAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}"> Theme="{DynamicResource ScrollBarRepeatButton}">
<PathIcon <PathIcon
Width="10" Theme="{DynamicResource InnerPathIcon}"
Height="10" Classes="Large"
Data="{DynamicResource ScrollBarRightGlyph}" /> Data="{DynamicResource ScrollBarRightGlyph}" />
</RepeatButton> </RepeatButton>
</Grid> </Grid>
@@ -110,36 +116,36 @@
</Setter> </Setter>
</Style> </Style>
<Style Selector="^:vertical"> <Style Selector="^:vertical">
<Setter Property="Width" Value="{DynamicResource ScrollBarThickness}" /> <Setter Property="Width" Value="{StaticResource ScrollBarThickness}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ScrollBar"> <ControlTemplate TargetType="ScrollBar">
<Border Background="{DynamicResource ScrollBarBackground}" UseLayoutRounding="False"> <Border
Background="{DynamicResource ScrollBarBackground}"
UseLayoutRounding="False">
<Grid RowDefinitions="Auto,*,Auto"> <Grid RowDefinitions="Auto,*,Auto">
<RepeatButton <RepeatButton
Name="PART_LineUpButton" Name="PART_LineUpButton"
Grid.Row="0" Grid.Row="0"
MinHeight="{DynamicResource ScrollBarThickness}" MinHeight="{StaticResource ScrollBarThickness}"
Padding="0,4"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}"> Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon <PathIcon
Width="10" Theme="{StaticResource InnerPathIcon}"
Height="10" Classes="Large"
Data="{DynamicResource ScrollBarUpGlyph}" /> Data="{StaticResource ScrollBarUpGlyph}" />
</RepeatButton> </RepeatButton>
<Track <Track
Grid.Row="1" Grid.Row="1"
DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
IsDirectionReversed="True" IsDirectionReversed="True"
Maximum="{TemplateBinding Maximum}" Maximum="{TemplateBinding Maximum}"
Minimum="{TemplateBinding Minimum}" Minimum="{TemplateBinding Minimum}"
Orientation="{TemplateBinding Orientation}" Orientation="{TemplateBinding Orientation}"
ViewportSize="{TemplateBinding ViewportSize}" ViewportSize="{TemplateBinding ViewportSize}"
DeferThumbDrag="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Value="{TemplateBinding Value, Mode=TwoWay}">
Value="{TemplateBinding Value,
Mode=TwoWay}">
<Track.DecreaseButton> <Track.DecreaseButton>
<RepeatButton <RepeatButton
Name="PART_PageUpButton" Name="PART_PageUpButton"
@@ -148,7 +154,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
CornerRadius="0" CornerRadius="0"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" /> Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.DecreaseButton> </Track.DecreaseButton>
<Track.IncreaseButton> <Track.IncreaseButton>
<RepeatButton <RepeatButton
@@ -158,23 +164,22 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
CornerRadius="0" CornerRadius="0"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" /> Theme="{StaticResource ScrollBarRepeatButton}" />
</Track.IncreaseButton> </Track.IncreaseButton>
<Thumb Name="thumb" /> <Thumb Name="thumb" />
</Track> </Track>
<RepeatButton <RepeatButton
Name="PART_LineDownButton" Name="PART_LineDownButton"
Grid.Row="2" Grid.Row="2"
MinHeight="{DynamicResource ScrollBarThickness}" MinHeight="{StaticResource ScrollBarThickness}"
Padding="0,4"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Focusable="False" Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}"> Theme="{StaticResource ScrollBarRepeatButton}">
<PathIcon <PathIcon
Width="10" Theme="{StaticResource InnerPathIcon}"
Height="10" Classes="Large"
Data="{DynamicResource ScrollBarDownGlyph}" /> Data="{StaticResource ScrollBarDownGlyph}" />
</RepeatButton> </RepeatButton>
</Grid> </Grid>
</Border> </Border>
@@ -184,14 +189,12 @@
<Style Selector="^ /template/ Thumb#thumb"> <Style Selector="^ /template/ Thumb#thumb">
<Setter Property="Foreground" Value="{DynamicResource ScrollBarThumbForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarThumbForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <ControlTemplate TargetType="Thumb">
<ControlTemplate TargetType="Thumb"> <Border
<Border Background="{TemplateBinding Foreground}"
Background="{TemplateBinding Foreground}" CornerRadius="{DynamicResource ScrollBarThumbCornerRadius}"
CornerRadius="24" UseLayoutRounding="False" />
UseLayoutRounding="False" /> </ControlTemplate>
</ControlTemplate>
</Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style Selector="^ /template/ Thumb#thumb:pointerover"> <Style Selector="^ /template/ Thumb#thumb:pointerover">
@@ -215,6 +218,17 @@
<Setter Property="RenderTransform" Value="scale(0.92)" /> <Setter Property="RenderTransform" Value="scale(0.92)" />
</Style> </Style>
<Style Selector="^[IsExpanded=False]">
<Style Selector="^ /template/ RepeatButton">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^:vertical">
<Setter Property="Width" Value="2" />
</Style>
<Style Selector="^:horizontal">
<Setter Property="Height" Value="2" />
</Style>
</Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type ScrollViewer}" TargetType="ScrollViewer"> <ControlTheme x:Key="{x:Type ScrollViewer}" TargetType="ScrollViewer">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
@@ -249,14 +263,11 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
Orientation="Vertical" /> Orientation="Vertical" />
<Panel
Grid.Row="1"
Grid.Column="1" />
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ ScrollBar"> <Style Selector="^ /template/ ScrollBar">
<Setter Property="Opacity" Value="0"></Setter> <Setter Property="Opacity" Value="0" />
</Style> </Style>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ ScrollBar#PART_HorizontalScrollBar"> <Style Selector="^ /template/ ScrollBar#PART_HorizontalScrollBar">
@@ -266,9 +277,14 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.InsetContent /template/ ScrollContentPresenter#PART_ContentPresenter">
<Setter Property="Grid.RowSpan" Value="1"/>
<Setter Property="Grid.ColumnSpan" Value="1"/>
</Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="StaticScrollViewer" TargetType="ScrollViewer"> <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="Background" Value="Transparent" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ScrollViewer"> <ControlTemplate TargetType="ScrollViewer">
@@ -299,9 +315,6 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
Orientation="Vertical" /> Orientation="Vertical" />
<Panel
Grid.Row="1"
Grid.Column="1" />
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -354,4 +367,4 @@
<Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointeroverForeground}" /> <Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -86,4 +86,4 @@
<Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -272,4 +272,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -3,8 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20"> <StackPanel Width="500" Height="500" Margin="20" Spacing="8">
<SplitButton>Hello</SplitButton> <SplitButton
Theme="{DynamicResource SolidSplitButton}"
Content="Hello" />
<ToggleSplitButton
IsChecked="True"
HorizontalAlignment="Stretch"
Content="Hello" />
<SplitButton
Theme="{DynamicResource SolidSplitButton}" />
<ToggleSplitButton
IsChecked="True"
HorizontalAlignment="Stretch" />
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
@@ -13,22 +24,18 @@
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" /> <Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="RenderTransform" Value="none" /> <Setter Property="RenderTransform" Value="none" />
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -55,7 +62,7 @@
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" /> <Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
<Setter Property="RenderTransform" Value="none" /> <Setter Property="RenderTransform" Value="none" />
<Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
<Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" />
@@ -68,11 +75,28 @@
ClipToBounds="True" ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<DockPanel> <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 <Button
Name="PART_PrimaryButton" Name="PART_PrimaryButton"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -84,29 +108,7 @@
FontFamily="{TemplateBinding FontFamily}" FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" FontWeight="{TemplateBinding FontWeight}"
DockPanel.Dock="Left"
Theme="{DynamicResource SemiSplitButtonElement}" /> 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> </DockPanel>
</Border> </Border>
</ControlTemplate> </ControlTemplate>

View File

@@ -243,4 +243,4 @@
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -64,7 +64,7 @@
</Style> </Style>
--> -->
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="ScrollTabControl" TargetType="TabControl"> <ControlTheme x:Key="ScrollTabControl" TargetType="TabControl">
<Setter Property="Margin" Value="0" /> <Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" /> <Setter Property="Padding" Value="0" />
@@ -86,7 +86,7 @@
<DockPanel> <DockPanel>
<Panel DockPanel.Dock="{TemplateBinding TabStripPlacement}"> <Panel DockPanel.Dock="{TemplateBinding TabStripPlacement}">
<ScrollViewer Name="PART_ScrollViewer"> <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> </ScrollViewer>
<Border Name="PART_BorderSeparator" Background="{DynamicResource TabItemLinePipePressedBorderBrush}" /> <Border Name="PART_BorderSeparator" Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
</Panel> </Panel>
@@ -101,12 +101,12 @@
</Border> </Border>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]"> <Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
<Style Selector="^ /template/ ItemsPresenter"> <Style Selector="^ /template/ ItemsPresenter">
<Setter Property="ItemsPanel"> <Setter Property="ItemsPanel">
<ItemsPanelTemplate> <ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical"></VirtualizingStackPanel> <VirtualizingStackPanel Orientation="Vertical" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter> </Setter>
</Style> </Style>
@@ -124,7 +124,7 @@
<Setter Property="Width" Value="1" /> <Setter Property="Width" Value="1" />
<Setter Property="VerticalAlignment" Value="Stretch" /> <Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Margin" Value="0 0 12 0"></Setter> <Setter Property="Margin" Value="0 0 12 0" />
</Style> </Style>
<Style Selector="^[TabStripPlacement=Right] /template/ ScrollViewer#PART_ScrollViewer"> <Style Selector="^[TabStripPlacement=Right] /template/ ScrollViewer#PART_ScrollViewer">
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" /> <Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
@@ -134,7 +134,7 @@
<Setter Property="Height" Value="1" /> <Setter Property="Height" Value="1" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Bottom" /> <Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="0 0 0 12"></Setter> <Setter Property="Margin" Value="0 0 0 12" />
</Style> </Style>
<Style Selector="^[TabStripPlacement=Top] /template/ ScrollViewer#PART_ScrollViewer"> <Style Selector="^[TabStripPlacement=Top] /template/ ScrollViewer#PART_ScrollViewer">
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
@@ -150,4 +150,4 @@
<Setter Property="VerticalScrollBarVisibility" Value="Disabled" /> <Setter Property="VerticalScrollBarVisibility" Value="Disabled" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -130,4 +130,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -106,4 +106,4 @@
<Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundDisabled}" /> <Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundDisabled}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -75,4 +75,4 @@
<Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -29,7 +29,6 @@
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
@@ -75,8 +74,8 @@
TextWrapping="{TemplateBinding TextWrapping}"> TextWrapping="{TemplateBinding TextWrapping}">
<TextBlock.IsVisible> <TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding ElementName="PART_TextPresenter" Path="PreeditText" 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}"/> <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
</MultiBinding> </MultiBinding>
</TextBlock.IsVisible> </TextBlock.IsVisible>
</TextBlock> </TextBlock>
@@ -172,7 +171,7 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton"> <Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
<Setter Property="PasswordChar" Value="•"/> <Setter Property="PasswordChar" Value="•" />
<Style Selector="^ /template/ ToggleButton#PART_RevealButton"> <Style Selector="^ /template/ ToggleButton#PART_RevealButton">
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
@@ -219,10 +218,10 @@
</Style> </Style>
</Style> </Style>
</Style> </Style>
<Style Selector="^.TextArea"> <Style Selector="^.TextArea">
<Setter Property="AcceptsReturn" Value="True"/> <Setter Property="AcceptsReturn" Value="True" />
<Setter Property="VerticalContentAlignment" Value="Top"/> <Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
</Style> </Style>
@@ -237,7 +236,6 @@
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
@@ -283,8 +281,8 @@
TextWrapping="{TemplateBinding TextWrapping}"> TextWrapping="{TemplateBinding TextWrapping}">
<TextBlock.IsVisible> <TextBlock.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding ElementName="PART_TextPresenter" Path="PreeditText" 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}"/> <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
</MultiBinding> </MultiBinding>
</TextBlock.IsVisible> </TextBlock.IsVisible>
</TextBlock> </TextBlock>
@@ -380,7 +378,7 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton"> <Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
<Setter Property="PasswordChar" Value="•"/> <Setter Property="PasswordChar" Value="•" />
<Style Selector="^ /template/ ToggleButton#PART_RevealButton"> <Style Selector="^ /template/ ToggleButton#PART_RevealButton">
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
@@ -429,8 +427,8 @@
</Style> </Style>
<Style Selector="^.TextArea"> <Style Selector="^.TextArea">
<Setter Property="AcceptsReturn" Value="True"/> <Setter Property="AcceptsReturn" Value="True" />
<Setter Property="VerticalContentAlignment" Value="Top"/> <Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
</Style> </Style>
@@ -440,7 +438,6 @@
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" />
@@ -512,8 +509,8 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton"> <ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton">
<Setter Property="Width" Value="16"/> <Setter Property="Width" Value="16" />
<Setter Property="Height" Value="16"/> <Setter Property="Height" Value="16" />
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
<!-- Background must be transparent or hit test will fail --> <!-- Background must be transparent or hit test will fail -->
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
@@ -543,4 +540,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -5,6 +5,7 @@
<ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope"> <ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope">
<Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" /> <Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" />
<Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" /> <Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="TextElement.FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" /> <Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" />
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -2,6 +2,11 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith>
<Border Padding="20">
<TimePickerPresenter />
</Border>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter"> <ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
<Setter Property="Width" Value="242" /> <Setter Property="Width" Value="242" />
<Setter Property="MinWidth" Value="242" /> <Setter Property="MinWidth" Value="242" />
@@ -10,7 +15,7 @@
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerPopupCornerRadius}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="TimePickerPresenter"> <ControlTemplate TargetType="TimePickerPresenter">
<Border <Border
@@ -113,8 +118,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}"> Theme="{StaticResource DateTimePickerButton}">
<PathIcon <PathIcon
Width="12" Theme="{StaticResource InnerPathIcon}"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" /> Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button> </Button>
<Rectangle <Rectangle
@@ -126,11 +130,9 @@
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
FontSize="16"
Theme="{StaticResource DateTimePickerButton}"> Theme="{StaticResource DateTimePickerButton}">
<PathIcon <PathIcon
Width="12" Theme="{StaticResource InnerPathIcon}"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" /> Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button> </Button>
<Rectangle <Rectangle
@@ -157,8 +159,8 @@
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="{DynamicResource DateTimePickerButtonBorderThickness}" />
<Setter Property="CornerRadius" Value="3" /> <Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerButtonCornerRadius}" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
@@ -249,9 +251,9 @@
FontFamily="{TemplateBinding FontFamily}" FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" FontWeight="{TemplateBinding FontWeight}"
Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}"/> Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}" />
</Border> </Border>
<Rectangle <Rectangle
Name="PART_ThirdColumnDivider" Name="PART_ThirdColumnDivider"
Grid.Column="5" Grid.Column="5"
@@ -308,7 +310,7 @@
</DataValidationErrors> </DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^.clearButton:pointerover, ^.ClearButton:pointerover"> <Style Selector="^.clearButton:pointerover, ^.ClearButton:pointerover">
<Style Selector="^:not(:hasnotime) /template/ Button#ClearButton"> <Style Selector="^:not(:hasnotime) /template/ Button#ClearButton">
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
@@ -333,4 +335,4 @@
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -49,4 +49,4 @@
<Setter Property="RenderTransform" Value="none" /> <Setter Property="RenderTransform" Value="none" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -30,8 +30,8 @@
<Setter Property="RenderTransform" Value="none" /> <Setter Property="RenderTransform" Value="none" />
<Setter Property="FontSize" Value="{DynamicResource ToggleButtonDefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource ToggleButtonDefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource ToggleButtonDefaultFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource ToggleButtonDefaultFontWeight}" />
<Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
@@ -280,4 +280,4 @@
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -39,4 +39,4 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -30,4 +30,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -71,8 +71,8 @@
Background="Transparent"> Background="Transparent">
<PathIcon <PathIcon
Name="PART_ExpandIconPath" Name="PART_ExpandIconPath"
Width="{DynamicResource TreeViewItemIconSize}" Theme="{StaticResource InnerPathIcon}"
Height="{DynamicResource TreeViewItemIconSize}" Classes="Small"
Data="{DynamicResource ExpanderIconData}" Data="{DynamicResource ExpanderIconData}"
Foreground="{DynamicResource TreeViewItemIconDefaultForeground}"> Foreground="{DynamicResource TreeViewItemIconDefaultForeground}">
<PathIcon.Transitions> <PathIcon.Transitions>
@@ -96,7 +96,7 @@
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem"> <ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
<Setter Property="Background" Value="{DynamicResource TreeViewItemDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
<Setter Property="CornerRadius" Value="3" /> <Setter Property="CornerRadius" Value="{DynamicResource TreeViewItemDefaultCornerRadius}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="TreeViewItem"> <ControlTemplate TargetType="TreeViewItem">
@@ -179,4 +179,4 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -7,6 +7,7 @@
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" /> <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" /> <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Window"> <ControlTemplate TargetType="Window">
@@ -30,4 +31,4 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -44,4 +44,4 @@
<Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Center" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View 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>

View File

@@ -0,0 +1,8 @@
using Avalonia.Controls;
namespace Semi.Avalonia.Locale;
public class es_es: ResourceDictionary
{
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia</Title> <Title>Semi.Avalonia</Title>
<PackageReleaseNotes>Update to Semi.Avalonia 11.2.1.4</PackageReleaseNotes> <PackageReleaseNotes>Update to Semi.Avalonia 11.2.1.6</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -20,6 +20,7 @@ public class SemiTheme : Styles
{ new CultureInfo("ru-ru"), new ru_ru() }, { new CultureInfo("ru-ru"), new ru_ru() },
{ new CultureInfo("zh-tw"), new zh_tw() }, { new CultureInfo("zh-tw"), new zh_tw() },
{ new CultureInfo("de-de"), new de_de() }, { new CultureInfo("de-de"), new de_de() },
{ new CultureInfo("es-es"), new es_es() },
}; };
private static readonly ResourceDictionary _defaultResource = new zh_cn(); private static readonly ResourceDictionary _defaultResource = new zh_cn();

View File

@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorFill0" /> <StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorFill0" />
<StaticResource x:Key="ComboBoxSelectorPlaceHolderForeground" ResourceKey="SemiColorText2" />
<StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorFill1" /> <StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorFill1" /> <StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorFill2" /> <StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorFill2" />

View File

@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorWindow" /> <StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorWindow" />
<StaticResource x:Key="ComboBoxSelectorPlaceHolderForeground" ResourceKey="SemiColorGrayText" />
<StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorHighlightText" /> <StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorHighlightText" />
<StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorWindow" /> <StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorWindow" />
<StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorHighlightText" /> <StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorHighlightText" />

View File

@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorFill0" /> <StaticResource x:Key="ComboBoxSelectorBackground" ResourceKey="SemiColorFill0" />
<StaticResource x:Key="ComboBoxSelectorPlaceHolderForeground" ResourceKey="SemiColorText2" />
<StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorFill1" /> <StaticResource x:Key="ComboBoxSelectorPointeroverBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorFill1" /> <StaticResource x:Key="ComboBoxSelectorFocusBackground" ResourceKey="SemiColorFill1" />
<StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorFill2" /> <StaticResource x:Key="ComboBoxSelectorPressedBackground" ResourceKey="SemiColorFill2" />

View File

@@ -2,6 +2,7 @@
<StaticResource x:Key="CalendarBorderThickness" ResourceKey="SemiBorderThicknessControl" /> <StaticResource x:Key="CalendarBorderThickness" ResourceKey="SemiBorderThicknessControl" />
<StaticResource x:Key="CalendarCornerRadius" ResourceKey="SemiBorderRadiusMedium" /> <StaticResource x:Key="CalendarCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
<GridLength x:Key="CalendarItemWeekDayNameHeight">40</GridLength> <GridLength x:Key="CalendarItemWeekDayNameHeight">40</GridLength>
<StaticResource x:Key="CalendarItemWeekDayNameFontWeight" ResourceKey="SemiFontWeightBold" />
<StaticResource x:Key="CalendarItemPreviousIconGlyph" ResourceKey="SemiIconChevronLeft" /> <StaticResource x:Key="CalendarItemPreviousIconGlyph" ResourceKey="SemiIconChevronLeft" />
<StaticResource x:Key="CalendarItemNextIconGlyph" ResourceKey="SemiIconChevronRight" /> <StaticResource x:Key="CalendarItemNextIconGlyph" ResourceKey="SemiIconChevronRight" />
<StaticResource x:Key="CalendarItemCalendarButtonSelectedFontWeight" ResourceKey="SemiFontWeightBold" /> <StaticResource x:Key="CalendarItemCalendarButtonSelectedFontWeight" ResourceKey="SemiFontWeightBold" />
@@ -9,4 +10,5 @@
<StaticResource x:Key="CalendarItemCalendarDayButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" /> <StaticResource x:Key="CalendarItemCalendarDayButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<x:Double x:Key="CalendarMinWidth">240</x:Double> <x:Double x:Key="CalendarMinWidth">240</x:Double>
<x:Double x:Key="CalendarMinHeight">250</x:Double> <x:Double x:Key="CalendarMinHeight">250</x:Double>
<StaticResource x:Key="CalendarItemWeekDayNameFontSize" ResourceKey="SemiFontSizeSmall" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,8 +1,9 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconCaretUp" /> <StaticResource x:Key="DateTimePickerButtonUpGlyph" ResourceKey="SemiIconTriangleUp" />
<StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconCaretDown" /> <StaticResource x:Key="DateTimePickerButtonDownGlyph" ResourceKey="SemiIconTriangleDown" />
<StaticResource x:Key="DateTimePickerAcceptGlyph" ResourceKey="SemiIconTick" /> <StaticResource x:Key="DateTimePickerAcceptGlyph" ResourceKey="SemiIconTick" />
<StaticResource x:Key="DateTimePickerDismissGlyph" ResourceKey="SemiIconClose" /> <StaticResource x:Key="DateTimePickerDismissGlyph" ResourceKey="SemiIconClose" />
<StaticResource x:Key="DateTimePickerPopupCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
<x:Double x:Key="DateTimePickerListBoxItemHeight">36</x:Double> <x:Double x:Key="DateTimePickerListBoxItemHeight">36</x:Double>
<StaticResource x:Key="DateTimePickerFlyoutPadding" ResourceKey="SemiThicknessNone" /> <StaticResource x:Key="DateTimePickerFlyoutPadding" ResourceKey="SemiThicknessNone" />
<StaticResource x:Key="DateTimePickerFlyoutBorderMargin" ResourceKey="SemiThicknessTight" /> <StaticResource x:Key="DateTimePickerFlyoutBorderMargin" ResourceKey="SemiThicknessTight" />

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconCaretUp" /> <StaticResource x:Key="MenuScrollViewerUpButtonGlyph" ResourceKey="SemiIconTriangleUp" />
<StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconCaretDown" /> <StaticResource x:Key="MenuScrollViewerDownButtonGlyph" ResourceKey="SemiIconTriangleDown" />
<StaticResource x:Key="MenuItemExpandIconGlyph" ResourceKey="SemiIconChevronRight" /> <StaticResource x:Key="MenuItemExpandIconGlyph" ResourceKey="SemiIconChevronRight" />
<StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconTick" /> <StaticResource x:Key="MenuCheckGlyph" ResourceKey="SemiIconTick" />
<!-- MenuFlyout --> <!-- MenuFlyout -->
@@ -11,7 +11,11 @@
<x:Double x:Key="MenuFlyoutMinWidth">100</x:Double> <x:Double x:Key="MenuFlyoutMinWidth">100</x:Double>
<x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double> <x:Double x:Key="MenuFlyoutMaxHeight">400</x:Double>
<x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double> <x:Double x:Key="MenuFlyoutMaxWidth">600</x:Double>
<StaticResource x:Key="MenuFlyoutFontSize" ResourceKey="SemiFontSizeRegular" />
<StaticResource x:Key="MenuFlyoutFontWeight" ResourceKey="SemiFontWeightRegular" />
<!-- MenuItem --> <!-- MenuItem -->
<Thickness x:Key="TopLevelMenuItemPadding">16 0</Thickness>
<StaticResource x:Key="TopLevelMenuItemMinHeight" ResourceKey="SemiHeightControlDefault" />
<Thickness x:Key="MenuItemPadding">16 8</Thickness> <Thickness x:Key="MenuItemPadding">16 8</Thickness>
<StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" /> <StaticResource x:Key="MenuItemCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<x:Double x:Key="MenuItemSeparatorHeight">1</x:Double> <x:Double x:Key="MenuItemSeparatorHeight">1</x:Double>

View File

@@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="ScrollBarThickness" ResourceKey="SemiFontSizeRegular" /> <StaticResource x:Key="ScrollBarThickness" ResourceKey="SemiSpacingTight" />
<x:Double x:Key="ScrollBarThumbThickness">10</x:Double> <StaticResource x:Key="ScrollBarThumbThickness" ResourceKey="SemiSpacingTight" />
<StaticResource x:Key="ScrollBarThumbCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
<StaticResource x:Key="ScrollBarUpGlyph" ResourceKey="SemiIconSmallTriangleTop" /> <StaticResource x:Key="ScrollBarUpGlyph" ResourceKey="SemiIconSmallTriangleTop" />
<StaticResource x:Key="ScrollBarDownGlyph" ResourceKey="SemiIconSmallTriangleDown" /> <StaticResource x:Key="ScrollBarDownGlyph" ResourceKey="SemiIconSmallTriangleDown" />
<StaticResource x:Key="ScrollBarLeftGlyph" ResourceKey="SemiIconSmallTriangleLeft" /> <StaticResource x:Key="ScrollBarLeftGlyph" ResourceKey="SemiIconSmallTriangleLeft" />

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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="TreeViewItemIndent">20</x:Double>
<x:Double x:Key="TreeViewItemIconSize">8</x:Double>
<StaticResource x:Key="ExpanderIconData" ResourceKey="SemiIconTreeTriangleRight" /> <StaticResource x:Key="ExpanderIconData" ResourceKey="SemiIconTreeTriangleRight" />
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness> <Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
<Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness> <Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness>

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="DefaultFontSize" ResourceKey="SemiFontSizeRegular" /> <StaticResource x:Key="DefaultFontSize" ResourceKey="SemiFontSizeRegular" />
<StaticResource x:Key="DefaultFontWeight" ResourceKey="SemiFontWeightRegular" />
<StaticResource x:Key="DefaultFontFamily" ResourceKey="SemiFontFamilyRegular" /> <StaticResource x:Key="DefaultFontFamily" ResourceKey="SemiFontFamilyRegular" />
</ResourceDictionary> </ResourceDictionary>