mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
Compare commits
57 Commits
v0.1.0-pre
...
v0.1.0-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
befd62fbb4 | ||
|
|
f86ad05a01 | ||
|
|
2d11584282 | ||
|
|
8987fa23d6 | ||
|
|
b243d3270f | ||
|
|
fdd90f20b6 | ||
|
|
48d36d1418 | ||
|
|
931e09701a | ||
|
|
ae3376c0b2 | ||
|
|
547e95e7b6 | ||
|
|
38fd422b90 | ||
|
|
db5dd11bee | ||
|
|
a7a677db3a | ||
|
|
76f82bebb8 | ||
|
|
c6cd17007a | ||
|
|
fa6f7a3ae8 | ||
|
|
7536b8b2a3 | ||
|
|
a56a0ee18b | ||
|
|
1554e7bac9 | ||
|
|
3e12731393 | ||
|
|
9e75d56845 | ||
|
|
1030fa47e7 | ||
|
|
5d31e05bfc | ||
|
|
1984771fcb | ||
|
|
500f6526b0 | ||
|
|
a7d0568526 | ||
|
|
d8109d9c54 | ||
|
|
626160493b | ||
|
|
be0d3d1aad | ||
|
|
cb9542ad25 | ||
|
|
4bb5303375 | ||
|
|
0887dd5e31 | ||
|
|
30af6dae40 | ||
|
|
1b1caa1a35 | ||
|
|
c973adb2df | ||
|
|
eccf82f706 | ||
|
|
dc010357ba | ||
|
|
d7574237ec | ||
|
|
8e584fe4eb | ||
|
|
c59bae2c03 | ||
|
|
aa52f874ca | ||
|
|
e4a5f09fed | ||
|
|
6674ca3715 | ||
|
|
b9a8bd3a2e | ||
|
|
c8074300a0 | ||
|
|
dcf557ad1a | ||
|
|
4811e4b848 | ||
|
|
7f1c962843 | ||
|
|
3bfac4d143 | ||
|
|
e5d1b744bd | ||
|
|
4e74d1ab90 | ||
|
|
9934ea791e | ||
|
|
c94dfb2948 | ||
|
|
22663a3769 | ||
|
|
79b9b67313 | ||
|
|
75a6f57f0f | ||
|
|
3b5cf24c98 |
@@ -4,6 +4,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Semi.Avalonia.Demo.Desktop">
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/LightTheme.axaml" />
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/DarkTheme.axaml" />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Dialogs;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Desktop;
|
||||
@@ -26,6 +27,8 @@ class Program
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UseManagedSystemDialogs()
|
||||
.UsePlatformDetect()
|
||||
.With(new Win32PlatformOptions())
|
||||
.LogToTrace();
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.999-cibuild0029384-beta" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Semi.Avalonia.Demo.Web">
|
||||
<Application.Styles>
|
||||
<FluentTheme Mode="Light" />
|
||||
<FluentTheme />
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/LightTheme.axaml" />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
@@ -1,25 +1,17 @@
|
||||
using System.Runtime.Versioning;
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Web;
|
||||
using Semi.Avalonia.Demo.Web;
|
||||
using Avalonia.Browser;
|
||||
|
||||
[assembly: SupportedOSPlatform("browser")]
|
||||
|
||||
internal partial class Program
|
||||
{
|
||||
private static void Main(string[] args) => BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
{
|
||||
new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("avares://Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf#Source Han Sans CN")
|
||||
}
|
||||
}
|
||||
})
|
||||
.SetupBrowserApp("out");
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
BuildAvaloniaApp().SetupBrowserApp("out");
|
||||
}
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>();
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview4" />
|
||||
<PackageReference Include="Avalonia.Web" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview5" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800" mc:Ignorable="d">
|
||||
<StackPanel Margin="20" HorizontalAlignment="Left" Spacing="20">
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel
|
||||
Margin="20"
|
||||
HorizontalAlignment="Left"
|
||||
Spacing="20">
|
||||
<TextBlock>Light (Default)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary">Primary</Button>
|
||||
@@ -23,7 +27,12 @@
|
||||
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
|
||||
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
||||
<Button Classes="Primary" IsEnabled="False" Theme="{DynamicResource SolidButton}">Danger</Button>
|
||||
<Button
|
||||
Classes="Primary"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource SolidButton}">
|
||||
Danger
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Borderless</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
@@ -32,7 +41,75 @@
|
||||
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
|
||||
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
||||
<Button Classes="Primary" IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
||||
<Button
|
||||
Classes="Primary"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Danger
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>DropdownButton</TextBlock>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<DropDownButton Content="Submit">
|
||||
<DropDownButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</DropDownButton.Flyout>
|
||||
</DropDownButton>
|
||||
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropdownButton}">
|
||||
<DropDownButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</DropDownButton.Flyout>
|
||||
</DropDownButton>
|
||||
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropdownButton}">
|
||||
<DropDownButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</DropDownButton.Flyout>
|
||||
</DropDownButton>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<SplitButton Content="Submit">
|
||||
<SplitButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</SplitButton.Flyout>
|
||||
</SplitButton>
|
||||
<SplitButton Classes="Secondary" Content="Submit" />
|
||||
<SplitButton Classes="Tertiary" Content="Submit" />
|
||||
<SplitButton Classes="Warning" Content="Submit" />
|
||||
<SplitButton Classes="Danger" Content="Submit" />
|
||||
<SplitButton
|
||||
Classes="Danger"
|
||||
Content="Submit"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ToggleSplitButton Content="Submit">
|
||||
<ToggleSplitButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</ToggleSplitButton.Flyout>
|
||||
</ToggleSplitButton>
|
||||
<ToggleSplitButton Classes="Secondary" Content="Submit" />
|
||||
<ToggleSplitButton Classes="Tertiary" Content="Submit" />
|
||||
<ToggleSplitButton Classes="Warning" Content="Submit" />
|
||||
<ToggleSplitButton Classes="Danger" Content="Submit" />
|
||||
<ToggleSplitButton
|
||||
Classes="Danger"
|
||||
Content="Submit"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
25
demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml
Normal file
25
demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.CalendarDatePickerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<CalendarDatePicker />
|
||||
<CalendarDatePicker
|
||||
Name="DatePicker2"
|
||||
Margin="0,0,0,8"
|
||||
SelectedDateFormat="Long" />
|
||||
<CalendarDatePicker
|
||||
Name="DatePicker3"
|
||||
Margin="0,0,0,8"
|
||||
CustomDateFormatString="ddd, MMM d"
|
||||
SelectedDateFormat="Custom" />
|
||||
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
||||
|
||||
<CalendarDatePicker IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class CalendarDatePickerDemo : UserControl
|
||||
{
|
||||
public CalendarDatePickerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
14
demo/Semi.Avalonia.Demo/Pages/CalendarDemo.axaml
Normal file
14
demo/Semi.Avalonia.Demo/Pages/CalendarDemo.axaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.CalendarDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<Calendar />
|
||||
<Calendar SelectionMode="SingleRange" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/CalendarDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/CalendarDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class CalendarDemo : UserControl
|
||||
{
|
||||
public CalendarDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
37
demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml
Normal file
37
demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml
Normal file
@@ -0,0 +1,37 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.CarouselDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Spacing="20">
|
||||
<TextBlock Classes="Strong" Text="This is still WIP" />
|
||||
<Grid
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
ColumnDefinitions="Auto, *, Auto">
|
||||
<RepeatButton
|
||||
Name="Previous"
|
||||
Grid.Column="0"
|
||||
Content="Previous" />
|
||||
<Carousel Name="carousel" Grid.Column="1">
|
||||
<Carousel.PageTransition>
|
||||
<PageSlide Orientation="Horizontal" Duration="0.25" />
|
||||
</Carousel.PageTransition>
|
||||
<TextBlock Text="Text 1" />
|
||||
<TextBlock Text="Text 2" />
|
||||
<TextBlock Text="Text 3" />
|
||||
<TextBlock Text="Text 4" />
|
||||
</Carousel>
|
||||
<RepeatButton
|
||||
Name="Next"
|
||||
Grid.Column="2"
|
||||
Content="Next" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="{Binding #carousel.SelectedIndex}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
26
demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs
Normal file
26
demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class CarouselDemo : UserControl
|
||||
{
|
||||
public CarouselDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
Previous.Click += OnPreviousClick;
|
||||
Next.Click += OnNextClick;
|
||||
}
|
||||
|
||||
private void OnPreviousClick(object sender, RoutedEventArgs args)
|
||||
{
|
||||
carousel.Previous();
|
||||
}
|
||||
|
||||
private void OnNextClick(object sender, RoutedEventArgs args)
|
||||
{
|
||||
carousel.Next();
|
||||
}
|
||||
}
|
||||
15
demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml
Normal file
15
demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.DatePickerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<DatePicker />
|
||||
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
||||
<DatePicker IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/DatePickerDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class DatePickerDemo : UserControl
|
||||
{
|
||||
public DatePickerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
42
demo/Semi.Avalonia.Demo/Pages/GridSplitter.axaml
Normal file
42
demo/Semi.Avalonia.Demo/Pages/GridSplitter.axaml
Normal file
@@ -0,0 +1,42 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.GridSplitter"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<Grid
|
||||
Width="300"
|
||||
Height="300"
|
||||
RowDefinitions="*, Auto, *">
|
||||
<Border
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#FEFBCB"
|
||||
CornerRadius="10" />
|
||||
<GridSplitter Grid.Row="1" ShowsPreview="True" />
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#FEFBCB"
|
||||
CornerRadius="10" />
|
||||
</Grid>
|
||||
<Grid
|
||||
Width="300"
|
||||
Height="300"
|
||||
ColumnDefinitions="*, Auto, *">
|
||||
<Border
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#FEFBCB"
|
||||
CornerRadius="10" />
|
||||
<GridSplitter Grid.Column="1" ShowsPreview="True" />
|
||||
<Border
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="#FEFBCB"
|
||||
CornerRadius="10" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/GridSplitter.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/GridSplitter.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class GridSplitter : UserControl
|
||||
{
|
||||
public GridSplitter()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
15
demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml
Normal file
15
demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ManagedFileChooserDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10">
|
||||
<Button Name="openFileDialog">Open File</Button>
|
||||
<Button Name="selectFolderDialog">Select Folder</Button>
|
||||
<Button Name="saveFileDialog">Save File</Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Dialogs;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Platform.Storage;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class ManagedFileChooserDemo : UserControl
|
||||
{
|
||||
public ManagedFileChooserDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
openFileDialog.Click += OpenFileDialog;
|
||||
selectFolderDialog.Click += SelectFolderDialog;
|
||||
saveFileDialog.Click += SaveFileDialog;
|
||||
}
|
||||
|
||||
private async void OpenFileDialog(object sender, RoutedEventArgs args)
|
||||
{
|
||||
IStorageProvider? sp = GetStorageProvider();
|
||||
if (sp is null) return;
|
||||
var result = await sp.OpenFilePickerAsync(new FilePickerOpenOptions()
|
||||
{
|
||||
Title = "Open File",
|
||||
FileTypeFilter = GetFileTypes(),
|
||||
AllowMultiple = true,
|
||||
});
|
||||
}
|
||||
private async void SelectFolderDialog(object sender, RoutedEventArgs args)
|
||||
{
|
||||
IStorageProvider? sp = GetStorageProvider();
|
||||
if (sp is null) return;
|
||||
var result = await sp.OpenFolderPickerAsync(new FolderPickerOpenOptions()
|
||||
{
|
||||
Title = "Select Folder",
|
||||
AllowMultiple = true,
|
||||
});
|
||||
}
|
||||
private async void SaveFileDialog(object sender, RoutedEventArgs args)
|
||||
{
|
||||
IStorageProvider? sp = GetStorageProvider();
|
||||
if (sp is null) return;
|
||||
var result = await sp.SaveFilePickerAsync(new FilePickerSaveOptions()
|
||||
{
|
||||
Title = "Open File",
|
||||
});
|
||||
}
|
||||
|
||||
private IStorageProvider? GetStorageProvider()
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
return topLevel?.StorageProvider;
|
||||
}
|
||||
|
||||
List<FilePickerFileType>? GetFileTypes()
|
||||
{
|
||||
return new List<FilePickerFileType>
|
||||
{
|
||||
FilePickerFileTypes.All,
|
||||
FilePickerFileTypes.TextPlain
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class NotificationDemo : UserControl
|
||||
{
|
||||
private MainWindow? _window;
|
||||
private WindowNotificationManager? _manager;
|
||||
public NotificationDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -21,14 +21,15 @@ public partial class NotificationDemo : UserControl
|
||||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
_window = VisualRoot as MainWindow;
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
_manager = new WindowNotificationManager(topLevel){ MaxItems = 3};
|
||||
}
|
||||
|
||||
private void InfoButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button b && b.Content is string s && Enum.TryParse<NotificationType>(s, out NotificationType t))
|
||||
{
|
||||
_window?.Notify(t);
|
||||
_manager?.Show(new Notification(t.ToString(), "This is message", t));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,6 @@
|
||||
Text="Welcome to Semi Avalonia"
|
||||
Theme="{StaticResource TitleTextBlock}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary">主要按钮</Button>
|
||||
<Button Classes="Secondary">次要按钮</Button>
|
||||
<Button Classes="Tertiary">第三按钮</Button>
|
||||
<Button Classes="Warning">警告按钮</Button>
|
||||
<Button Classes="Danger">危险按钮</Button>
|
||||
<Button Classes="Primary" IsEnabled="False">禁用按钮</Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
||||
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
|
||||
@@ -61,8 +53,6 @@
|
||||
<RadioButton Theme="{StaticResource ButtonRadioButton}">选项 2</RadioButton>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton Margin="4" Theme="{StaticResource CardRadioButton}">
|
||||
<StackPanel>
|
||||
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
||||
@@ -79,6 +69,7 @@
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Margin="0,0,8,0">Avalonia</CheckBox>
|
||||
<CheckBox Margin="0,0,8,0" IsChecked="True">WPF</CheckBox>
|
||||
@@ -89,6 +80,15 @@
|
||||
Content="Content"
|
||||
OffContent="No"
|
||||
OnContent="Yes" />
|
||||
<ProgressBar
|
||||
Classes="Right"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<Slider
|
||||
Width="200"
|
||||
Margin="30,0"
|
||||
Orientation="Horizontal"
|
||||
Value="30" />
|
||||
</StackPanel>
|
||||
<TabControl>
|
||||
<TabItem Header="Tab 1">
|
||||
@@ -103,7 +103,9 @@
|
||||
</TabControl>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ComboBox Width="200" PlaceholderText="Please Select" />
|
||||
|
||||
<DatePicker />
|
||||
<TimePicker />
|
||||
<CalendarDatePicker />
|
||||
</StackPanel>
|
||||
<Grid ColumnDefinitions="* * *">
|
||||
<Border Theme="{StaticResource CardBorder}">
|
||||
@@ -132,6 +134,7 @@
|
||||
Classes="revealPasswordButton"
|
||||
PasswordChar="*"
|
||||
Text="Avalonia" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
@@ -152,6 +155,7 @@
|
||||
<TextBlock>List Item 4</TextBlock>
|
||||
<TextBlock>List Item 5</TextBlock>
|
||||
</ListBox>
|
||||
<Calendar />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
79
demo/Semi.Avalonia.Demo/Pages/SliderDemo.axaml
Normal file
79
demo/Semi.Avalonia.Demo/Pages/SliderDemo.axaml
Normal file
@@ -0,0 +1,79 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.SliderDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel
|
||||
Margin="20"
|
||||
HorizontalAlignment="Left"
|
||||
Spacing="20">
|
||||
<Slider
|
||||
Width="300"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Width="300"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
TickPlacement="Outside"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Width="300"
|
||||
Classes="ToolTip"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
TickPlacement="Outside"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Width="300"
|
||||
IsDirectionReversed="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Width="300"
|
||||
IsEnabled="False"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
TickFrequency="10"
|
||||
Value="30" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Slider
|
||||
Height="300"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
TickFrequency="10"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Height="300"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
TickFrequency="10"
|
||||
TickPlacement="TopLeft"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Height="300"
|
||||
Classes="ToolTip"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
TickFrequency="10"
|
||||
TickPlacement="TopLeft"
|
||||
Value="0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/SliderDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/SliderDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class SliderDemo : UserControl
|
||||
{
|
||||
public SliderDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
152
demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml
Normal file
152
demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml
Normal file
@@ -0,0 +1,152 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.SplitViewDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Border>
|
||||
<Grid ColumnDefinitions="*,400">
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="5"
|
||||
Orientation="Vertical"
|
||||
Spacing="4">
|
||||
<ToggleButton
|
||||
Name="PaneOpenButton"
|
||||
Content="IsPaneOpen"
|
||||
IsChecked="{Binding IsPaneOpen, ElementName=SplitView}" />
|
||||
|
||||
<ToggleButton
|
||||
Name="UseLightDismissOverlayModeButton"
|
||||
Content="UseLightDismissOverlayMode"
|
||||
IsChecked="{Binding UseLightDismissOverlayMode, ElementName=SplitView}" />
|
||||
|
||||
<ToggleSwitch
|
||||
Content="Placement"
|
||||
IsChecked="{Binding !IsLeft}"
|
||||
OffContent="Left"
|
||||
OnContent="Right" />
|
||||
|
||||
<TextBlock Text="DisplayMode" />
|
||||
<ComboBox
|
||||
Name="DisplayModeSelector"
|
||||
Width="170"
|
||||
Margin="10"
|
||||
SelectedIndex="{Binding DisplayMode}">
|
||||
<ComboBoxItem>Inline</ComboBoxItem>
|
||||
<ComboBoxItem>CompactInline</ComboBoxItem>
|
||||
<ComboBoxItem>Overlay</ComboBoxItem>
|
||||
<ComboBoxItem>CompactOverlay</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Text="PaneBackground" />
|
||||
<ComboBox
|
||||
Name="PaneBackgroundSelector"
|
||||
Width="170"
|
||||
Margin="10"
|
||||
SelectedIndex="0">
|
||||
<ComboBoxItem Tag="White">White</ComboBoxItem>
|
||||
<ComboBoxItem Tag="Red">Red</ComboBoxItem>
|
||||
<ComboBoxItem Tag="Blue">Blue</ComboBoxItem>
|
||||
<ComboBoxItem Tag="Green">Green</ComboBoxItem>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Text="{Binding Value, ElementName=OpenPaneLengthSlider, StringFormat='{}OpenPaneLength: {0}'}" />
|
||||
<Slider
|
||||
Name="OpenPaneLengthSlider"
|
||||
Width="150"
|
||||
Maximum="500"
|
||||
Minimum="128"
|
||||
Value="256" />
|
||||
|
||||
<TextBlock Text="{Binding Value, ElementName=CompactPaneLengthSlider, StringFormat='{}CompactPaneLength: {0}'}" />
|
||||
<Slider
|
||||
Name="CompactPaneLengthSlider"
|
||||
Width="150"
|
||||
Maximum="128"
|
||||
Minimum="24"
|
||||
Value="48" />
|
||||
</StackPanel>
|
||||
<Border BorderBrush="{DynamicResource SystemControlHighlightBaseLowBrush}" BorderThickness="1">
|
||||
<!-- {Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector} -->
|
||||
<SplitView
|
||||
Name="SplitView"
|
||||
CompactPaneLength="{Binding Value, ElementName=CompactPaneLengthSlider}"
|
||||
DisplayMode="CompactOverlay"
|
||||
OpenPaneLength="{Binding Value, ElementName=OpenPaneLengthSlider}"
|
||||
PaneBackground="{Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector}"
|
||||
PanePlacement="{Binding PanePlacement}">
|
||||
<SplitView.Pane>
|
||||
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
||||
<TextBlock
|
||||
Name="PaneHeader"
|
||||
Margin="5,12,0,0"
|
||||
FontWeight="Bold"
|
||||
Text="PANE CONTENT" />
|
||||
<ComboBox Grid.Row="1" Width="150">
|
||||
<ComboBoxItem Content="Item1" />
|
||||
<ComboBoxItem Content="Item2" />
|
||||
<ComboBoxItem Content="Item3" />
|
||||
</ComboBox>
|
||||
<ListBoxItem
|
||||
Grid.Row="2"
|
||||
Margin="0,10"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!-- Path glyph from materialdesignicons.com -->
|
||||
<Border Width="48">
|
||||
<Viewbox
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Left">
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path Data="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" Fill="{DynamicResource SystemControlForegroundBaseHighBrush}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center" Text="People" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Margin="60,12"
|
||||
Text="Item at bottom" />
|
||||
</Grid>
|
||||
</SplitView.Pane>
|
||||
|
||||
<Grid>
|
||||
<Grid.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="FontWeight" Value="700" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="SplitViewContent" />
|
||||
<TextBlock Text="SplitViewContent" TextAlignment="Left" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
Text="SplitViewContent"
|
||||
TextAlignment="Left" />
|
||||
<TextBlock
|
||||
VerticalAlignment="Bottom"
|
||||
Text="SplitViewContent"
|
||||
TextAlignment="Left" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Text="SplitViewContent"
|
||||
TextAlignment="Left" />
|
||||
</Grid>
|
||||
|
||||
</SplitView>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/SplitViewDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class SplitViewDemo : UserControl
|
||||
{
|
||||
public SplitViewDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.TabControlDemo" xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="450"
|
||||
d:DesignWidth="800" mc:Ignorable="d">
|
||||
x:Class="Semi.Avalonia.Demo.Pages.TabControlDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<Border Theme="{StaticResource CardBorder}">
|
||||
<TabControl TabStripPlacement="Top">
|
||||
@@ -11,7 +15,8 @@
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4" Header="Tab 4"
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
@@ -22,7 +27,8 @@
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4" Header="Tab 4"
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
@@ -33,7 +39,8 @@
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4" Header="Tab 4"
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
@@ -44,9 +51,16 @@
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4" Header="Tab 4"
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border Theme="{StaticResource CardBorder}">
|
||||
<TabStrip>
|
||||
<TabStripItem>Tab 1</TabStripItem>
|
||||
<TabStripItem>Tab 2</TabStripItem>
|
||||
</TabStrip>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
16
demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml
Normal file
16
demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.TimePickerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<TimePicker />
|
||||
<TimePicker MinuteIncrement="15" />
|
||||
<TimePicker ClockIdentifier="24HourClock" />
|
||||
<TimePicker ClockIdentifier="12HourClock" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
18
demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/TimePickerDemo.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class TimePickerDemo : UserControl
|
||||
{
|
||||
public TimePickerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.999-cibuild0029384-beta" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
||||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -27,24 +27,42 @@
|
||||
<TabItem Header="ButtonSpinner">
|
||||
<pages:ButtonSpinnerDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Calendar">
|
||||
<pages:CalendarDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="CalendarDatePicker">
|
||||
<pages:CalendarDatePickerDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Carousel">
|
||||
<pages:CarouselDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="CheckBox">
|
||||
<pages:CheckBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="ComboBox">
|
||||
<pages:ComboBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="DatePicker">
|
||||
<pages:DatePickerDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Expander">
|
||||
<pages:ExpanderDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Flyout">
|
||||
<pages:FlyoutDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="GridSplitter">
|
||||
<pages:GridSplitter />
|
||||
</TabItem>
|
||||
<TabItem Header="Label">
|
||||
<pages:LabelDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="ListBox">
|
||||
<pages:ListBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="ManagedFileChooser">
|
||||
<pages:ManagedFileChooserDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Menu">
|
||||
<pages:MenuDemo />
|
||||
</TabItem>
|
||||
@@ -63,6 +81,12 @@
|
||||
<TabItem Header="RepeatButton">
|
||||
<pages:RepeatButtonDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Slider">
|
||||
<pages:SliderDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="SplitView">
|
||||
<pages:SplitViewDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="TabControl">
|
||||
<pages:TabControlDemo />
|
||||
</TabItem>
|
||||
@@ -72,6 +96,9 @@
|
||||
<TabItem Header="TextBox">
|
||||
<pages:TextBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="TimePicker">
|
||||
<pages:TimePickerDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="ToggleButton">
|
||||
<pages:ToggleButtonDemo />
|
||||
</TabItem>
|
||||
|
||||
@@ -5,19 +5,8 @@ namespace Semi.Avalonia.Demo.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private readonly WindowNotificationManager _manager;
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
_manager = new WindowNotificationManager(this)
|
||||
{
|
||||
Position = NotificationPosition.TopLeft,
|
||||
MaxItems = 3
|
||||
};
|
||||
}
|
||||
|
||||
internal void Notify(NotificationType t)
|
||||
{
|
||||
_manager.Show(new Notification(t.ToString(), "This is a notification message", t));
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,11 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AutoCompleteBoxDefaultBorderBrush}" />
|
||||
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="600" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AutoCompleteBox">
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ThicknessCardBorderThickness}" />
|
||||
<Setter Property="Border.Margin" Value="{DynamicResource ThicknessCardMargin}" />
|
||||
<Style Selector="^.Shadow">
|
||||
<Setter Property="Border.BoxShadow" Value="0 0 14 #1A000000" />
|
||||
<Setter Property="Border.BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
||||
</Style>
|
||||
<Style Selector="^.Hover:pointerover">
|
||||
<Setter Property="Border.BoxShadow" Value="0 0 14 #1A000000" />
|
||||
<Setter Property="Border.BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
|
||||
@@ -89,6 +89,15 @@
|
||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary">
|
||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
Grid.Row="1"
|
||||
Foreground="Black"
|
||||
Theme="{StaticResource ButtonSpinnerRepeatButton}">
|
||||
<PathIcon
|
||||
Width="8"
|
||||
|
||||
272
src/Semi.Avalonia/Controls/Calendar.axaml
Normal file
272
src/Semi.Avalonia/Controls/Calendar.axaml
Normal file
@@ -0,0 +1,272 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarBorderThickness}" />
|
||||
<Setter Property="Calendar.CornerRadius" Value="{DynamicResource CalendarCornerRadius}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Calendar">
|
||||
<StackPanel
|
||||
Name="PART_Root"
|
||||
HorizontalAlignment="Center"
|
||||
ClipToBounds="True">
|
||||
<CalendarItem
|
||||
Name="PART_CalendarItem"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
HeaderBackground="{TemplateBinding HeaderBackground}" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
||||
<Setter Property="CalendarItem.DayTitleTemplate">
|
||||
<Template>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
|
||||
Text="{Binding}" />
|
||||
</Template>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="CalendarItem.Template">
|
||||
<ControlTemplate TargetType="CalendarItem">
|
||||
<Border
|
||||
Padding="16"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<!--
|
||||
To keep calendar from resizing when switching DisplayMode
|
||||
In WinUI Min-Width from TemplateSettings
|
||||
basically...MinWidth of DayItem = 40, 40 * 7 = 280 + margins/padding = ~294
|
||||
Viewport height is set from # of rows displayed (2-8) in Month mode, = ~290 for 6 weeks (+ day names)
|
||||
-->
|
||||
<Grid
|
||||
MinWidth="{DynamicResource CalendarMinWidth}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
RowDefinitions="Auto,*">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<Button
|
||||
Name="PART_PreviousButton"
|
||||
Grid.Column="0"
|
||||
HorizontalContentAlignment="Left"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
<!-- Path mimics Segoe MDL2 Assets font glyph used in WinUI -->
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Name="PART_HeaderButton"
|
||||
Grid.Column="1"
|
||||
HorizontalContentAlignment="Center"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}" />
|
||||
|
||||
<Button
|
||||
Name="PART_NextButton"
|
||||
Grid.Column="2"
|
||||
HorizontalContentAlignment="Left"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
<!-- Path mimics Segoe MDL2 Assets font glyph used in WinUI -->
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</Grid>
|
||||
<!-- Border below is used only for MonthView but it can't be moved inside of Grid because CalendarItem expects it to be empty and it will cause side-effects -->
|
||||
<Grid
|
||||
Name="PART_MonthView"
|
||||
Grid.Row="1"
|
||||
MinHeight="200"
|
||||
HorizontalAlignment="Stretch"
|
||||
IsVisible="False">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- This should always be the week day names?? -->
|
||||
<RowDefinition Height="{DynamicResource CalendarItemWeekDayNameHeight}" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
<Grid
|
||||
Name="PART_YearView"
|
||||
Grid.Row="1"
|
||||
MinHeight="200"
|
||||
Background="{TemplateBinding Background}"
|
||||
IsVisible="False">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CalendarButton}" TargetType="CalendarButton">
|
||||
<Setter Property="ClickMode" Value="Release" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<!-- These are actually set on the CalendarView in WinUI -->
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarButtonBorderBrush}" />
|
||||
<Setter Property="CalendarButton.CornerRadius" Value="{DynamicResource CalendarItemCalendarButtonCornerRadius}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="ClipToBounds" Value="False" />
|
||||
<Setter Property="CalendarButton.HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="CalendarButton.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="CalendarButton.HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="CalendarButton.VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CalendarButton">
|
||||
<ContentControl
|
||||
Name="Content"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontSize="{TemplateBinding FontSize}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Adjusted :selected to look like :today from DayItem -->
|
||||
<Style Selector="^:selected">
|
||||
<Style Selector="^ /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonSelectedBackground}" />
|
||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarButtonSelectedForeground}" />
|
||||
<Setter Property="ContentControl.FontWeight" Value="{DynamicResource CalendarItemCalendarButtonSelectedFontWeight}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:blackout /template/ ContentControl">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonBlackoutForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentControl">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inactive /template/ ContentControl">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonInactiveForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CalendarDayButton}" TargetType="CalendarDayButton">
|
||||
<Setter Property="ClickMode" Value="Release" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarDayButtonBackground}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarItemCalendarDayButtonCornerRadius}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarDayButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="ClipToBounds" Value="False" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CalendarDayButton">
|
||||
<ContentControl
|
||||
Name="Content"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontSize="{TemplateBinding FontSize}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:today /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonTodayBackground}" />
|
||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonTodayForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:selected /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedBackground}" />
|
||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inactive /template/ ContentControl">
|
||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonInactiveForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:blackout /template/ ContentControl">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonBlackoutForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentControl">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
137
src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
Normal file
137
src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
Normal file
@@ -0,0 +1,137 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="CalendarDatePickerButton" TargetType="Button">
|
||||
<Setter Property="Button.Foreground" Value="{DynamicResource CalendarDatePickerIconForeground}" />
|
||||
<Setter Property="Button.Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid Margin="{TemplateBinding Padding}" Background="Transparent">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource CalendarDatePickerIconGlyph}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover /template/ PathIcon">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerIconPointeroverForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ PathIcon">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerIconPointeroverForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||
<Setter Property="CalendarDatePicker.IsTodayHighlighted" Value="True" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="4 0" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CalendarDatePicker">
|
||||
<Panel
|
||||
x:Name="LayoutRoot"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Border
|
||||
x:Name="Background"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
ColumnDefinitions="*,Auto">
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||
Watermark="{TemplateBinding Watermark}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_BorderElement">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="TextBox#PART_TextBox:disabled">
|
||||
<Style Selector="^ /template/ Border#PART_BorderElement">
|
||||
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_Watermark, ^ TextBlock#PART_FloatingWatermark">
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource CalendarDatePickerTextForegroundDisabled}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</TextBox.Styles>
|
||||
</TextBox>
|
||||
<Button
|
||||
Name="PART_Button"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,8,0"
|
||||
Cursor="Hand"
|
||||
Focusable="False"
|
||||
Theme="{DynamicResource CalendarDatePickerButton}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementTarget="{TemplateBinding}"
|
||||
VerticalOffset="-4">
|
||||
<Border Margin="8" BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}">
|
||||
<Calendar
|
||||
Name="PART_Calendar"
|
||||
DisplayDate="{TemplateBinding DisplayDate}"
|
||||
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
||||
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
||||
SelectedDate="{TemplateBinding SelectedDate,
|
||||
Mode=TwoWay}" />
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Disabled State -->
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerDisabledBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerDisabledBorderBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Button#PART_Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerDisabledIconForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Focused State -->
|
||||
<Style Selector="^:focus-within /template/ Border#Background">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerFocusBorderBrush}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
101
src/Semi.Avalonia/Controls/CaptionButtons.axaml
Normal file
101
src/Semi.Avalonia/Controls/CaptionButtons.axaml
Normal file
@@ -0,0 +1,101 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="CaptionButton" TargetType="Button">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Height" Value="28" />
|
||||
<Setter Property="Width" Value="28" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="Transparent"
|
||||
Content="{TemplateBinding Content}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{TemplateBinding BorderBrush}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CaptionButtons}" TargetType="CaptionButtons">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CaptionButtons">
|
||||
<StackPanel
|
||||
VerticalAlignment="Stretch"
|
||||
Orientation="Horizontal"
|
||||
Spacing="2"
|
||||
TextElement.FontSize="10">
|
||||
<Button x:Name="PART_FullScreenButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_FullScreenButtonIcon"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource WindowExpandGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button x:Name="PART_MinimiseButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource WindowMinimizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button x:Name="PART_RestoreButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_RestoreButtonIcon"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource WindowMaximizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="PART_CloseButton"
|
||||
Background="{DynamicResource CaptionButtonClosePointeroverBackground}"
|
||||
BorderBrush="{DynamicResource CaptionButtonClosePressedBackground}"
|
||||
Theme="{StaticResource CaptionButton}">
|
||||
<Button.Styles>
|
||||
<Style Selector="Button:pointerover">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Style>
|
||||
<Style Selector="Button:pressed">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Style>
|
||||
</Button.Styles>
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource WindowCloseIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:maximized /template/ PathIcon#PART_RestoreButtonIcon">
|
||||
<Setter Property="Data" Value="{DynamicResource WindowRestoreGlyph}" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ PathIcon#PART_FullScreenButtonIcon">
|
||||
<Setter Property="Data" Value="{DynamicResource WindowCollapseGlyph}" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
21
src/Semi.Avalonia/Controls/Carousel.axaml
Normal file
21
src/Semi.Avalonia/Controls/Carousel.axaml
Normal file
@@ -0,0 +1,21 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ScrollViewer
|
||||
Name="PART_ScrollViewer"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -120,10 +120,7 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizationMode}" />
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
KeyboardNavigation.TabNavigation="Continue" />
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -5,15 +5,24 @@
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Button.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ButtonSpinner.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Calendar.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/CalendarDatePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/CaptionButtons.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Carousel.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/CheckBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ComboBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContentControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropdownButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ItemsControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Label.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ListBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ManagedFileChooser.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Menu.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/MenuFlyoutPresenter.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/NotificationCard.axaml" />
|
||||
@@ -25,13 +34,20 @@
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/RepeatButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/SelectableTextBlock.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ScrollViewer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Slider.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/SplitButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/SplitView.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TabControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TabItem.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TabStrip.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TextBlock.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TextBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TimePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TitleBar.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ToggleButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ToggleSwitch.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Tooltip.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TransitioningContentControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/TreeView.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/UserControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Window.axaml" />
|
||||
|
||||
234
src/Semi.Avalonia/Controls/DatePicker.axaml
Normal file
234
src/Semi.Avalonia/Controls/DatePicker.axaml
Normal file
@@ -0,0 +1,234 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
||||
<Setter Property="Width" Value="296" />
|
||||
<Setter Property="MinWidth" Value="296" />
|
||||
<Setter Property="MaxHeight" Value="300" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DatePickerPresenter">
|
||||
<Border
|
||||
Name="Background"
|
||||
Margin="{DynamicResource DateTimePickerFlyoutBorderMargin}"
|
||||
Padding="{DynamicResource DateTimePickerFlyoutPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
|
||||
<Grid Name="PART_PickerContainer">
|
||||
<Grid.Styles>
|
||||
<Style Selector="DateTimePickerPanel > ListBoxItem">
|
||||
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<!-- Column Definitions set in code, ignore here -->
|
||||
<Panel Name="PART_MonthHost">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_MonthSelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="Month"
|
||||
ShouldLoop="True" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_MonthUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_MonthDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
<Panel Name="PART_DayHost">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_DaySelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="Day"
|
||||
ShouldLoop="True" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_DayUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_DayDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
<Panel Name="PART_YearHost">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_YearSelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="Year"
|
||||
ShouldLoop="False" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_YearUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_YearDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
<Rectangle
|
||||
Name="PART_FirstSpacer"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
<Rectangle
|
||||
Name="PART_SecondSpacer"
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
Name="AcceptDismissGrid"
|
||||
Grid.Row="1"
|
||||
ColumnDefinitions="*,*">
|
||||
<Button
|
||||
Name="PART_AcceptButton"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_DismissButton"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
FontSize="16"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
Grid.ColumnSpan="2"
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ Panel">
|
||||
<Style Selector="^:pointerover RepeatButton">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type DatePicker}" TargetType="DatePicker">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DatePicker">
|
||||
<Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}">
|
||||
<Button
|
||||
Name="PART_FlyoutButton"
|
||||
Width="298"
|
||||
MinWidth="298"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Cursor="Hand"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsEnabled="{TemplateBinding IsEnabled}"
|
||||
Theme="{StaticResource DateTimePickerFlyoutButton}">
|
||||
<Grid ColumnDefinitions="*, Auto">
|
||||
<Grid
|
||||
Name="PART_ButtonContentGrid"
|
||||
Grid.Column="0"
|
||||
ColumnDefinitions="78*,Auto,132*,Auto,78*">
|
||||
<TextBlock
|
||||
Name="PART_DayTextBlock"
|
||||
Padding="12,4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Text="day" />
|
||||
<TextBlock
|
||||
Name="PART_MonthTextBlock"
|
||||
Padding="12,4"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Text="month"
|
||||
TextAlignment="Left" />
|
||||
<TextBlock
|
||||
Name="PART_YearTextBlock"
|
||||
Padding="12,4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Text="year" />
|
||||
<Rectangle
|
||||
x:Name="PART_FirstSpacer"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
<Rectangle
|
||||
x:Name="PART_SecondSpacer"
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
</Grid>
|
||||
<PathIcon
|
||||
Name="PART_Icon"
|
||||
Grid.Column="1"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0,0,8,0"
|
||||
Data="{DynamicResource DatePickerIconGlyph}"
|
||||
Foreground="{DynamicResource DateTimePickerIconForeground}" />
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementMode="Bottom"
|
||||
PlacementTarget="{TemplateBinding}"
|
||||
WindowManagerAddShadowHint="False">
|
||||
<DatePickerPresenter Name="PART_PickerPresenter" />
|
||||
</Popup>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:disabled /template/ PathIcon#PART_Icon">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonDisabledIconForeground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Changes foreground for watermark text when SelectedDate is null -->
|
||||
<Style Selector="^:hasnodate /template/ Button#PART_FlyoutButton TextBlock">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
129
src/Semi.Avalonia/Controls/DateTimePickerShared.axaml
Normal file
129
src/Semi.Avalonia/Controls/DateTimePickerShared.axaml
Normal file
@@ -0,0 +1,129 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="DateTimePickerFlyoutButton" TargetType="Button">
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonDisabledBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonDisabledBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- Theme for the items displayed in the selectors -->
|
||||
<ControlTheme
|
||||
x:Key="DateTimePickerItem"
|
||||
BasedOn="{StaticResource {x:Type ListBoxItem}}"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="ListBoxItem.CornerRadius" Value="0" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerListItemBackground}" />
|
||||
|
||||
<Style Selector="^:selected">
|
||||
<Setter Property="IsHitTestVisible" Value="False" />
|
||||
</Style>
|
||||
<Style Selector="^.MonthItem">
|
||||
<Setter Property="Padding" Value="{DynamicResource DatePickerFlyoutPresenterMonthPadding}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- This is used for both the accept/dismiss & buttons in the presenter -->
|
||||
<ControlTheme x:Key="DateTimePickerButton" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerFlyoutButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerFlyoutButtonBackground}" />
|
||||
<Setter Property="Padding" Value="0 8" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<ContentPresenter
|
||||
x:Name="ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerFlyoutButtonPointeroverForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerFlyoutButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerFlyoutButtonPressedForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerFlyoutButtonPressedBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
x:Key="DateTimePickerUpButton"
|
||||
BasedOn="{StaticResource DateTimePickerButton}"
|
||||
TargetType="RepeatButton">
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
<Setter Property="Padding" Value="0 4" />
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonUpGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Template>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
x:Key="DateTimePickerDownButton"
|
||||
BasedOn="{StaticResource DateTimePickerButton}"
|
||||
TargetType="RepeatButton">
|
||||
<Setter Property="VerticalAlignment" Value="Bottom" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
<Setter Property="Padding" Value="0 4" />
|
||||
<Setter Property="Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="8"
|
||||
Height="8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DateTimePickerButtonDownGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Template>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
234
src/Semi.Avalonia/Controls/DropdownButton.axaml
Normal file
234
src/Semi.Avalonia/Controls/DropdownButton.axaml
Normal file
@@ -0,0 +1,234 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||
<Setter Property="DropDownButton.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||
<Setter Property="DropDownButton.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="DropDownButton.RenderTransform" Value="none" />
|
||||
<Setter Property="DropDownButton.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||
<Setter Property="DropDownButton.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DropDownButton">
|
||||
<Border
|
||||
x:Name="RootBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid x:Name="InnerGrid" ColumnDefinitions="*,Auto">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Grid.Column="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
RecognizesAccessKey="True" />
|
||||
<PathIcon
|
||||
x:Name="DropDownGlyph"
|
||||
Grid.Column="1"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Margin="0,0,8,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DropdownButtonIconGlyph}"
|
||||
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
|
||||
IsHitTestVisible="False"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Secondary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Warning">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Danger">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonLargePadding}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="SolidDropdownButton" TargetType="DropDownButton">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||
<Setter Property="DropDownButton.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||
<Setter Property="DropDownButton.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="DropDownButton.RenderTransform" Value="none" />
|
||||
<Setter Property="DropDownButton.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||
<Setter Property="DropDownButton.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DropDownButton">
|
||||
<Border
|
||||
x:Name="RootBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid x:Name="InnerGrid" ColumnDefinitions="*,Auto">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Grid.Column="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
RecognizesAccessKey="True" />
|
||||
<PathIcon
|
||||
x:Name="DropDownGlyph"
|
||||
Grid.Column="1"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Margin="0,0,8,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource DropdownButtonIconGlyph}"
|
||||
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
|
||||
IsHitTestVisible="False"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Secondary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Warning">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Danger">
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
x:Key="BorderlessDropdownButton"
|
||||
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||
TargetType="DropDownButton">
|
||||
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
||||
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
25
src/Semi.Avalonia/Controls/GridSplitter.axaml
Normal file
25
src/Semi.Avalonia/Controls/GridSplitter.axaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type GridSplitter}" TargetType="GridSplitter">
|
||||
<Setter Property="Focusable" Value="True" />
|
||||
<Setter Property="MinWidth" Value="6" />
|
||||
<Setter Property="MinHeight" Value="6" />
|
||||
<Setter Property="GridSplitter.Padding" Value="2" />
|
||||
<Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" />
|
||||
<Setter Property="PreviewContent">
|
||||
<Template>
|
||||
<Rectangle Fill="{DynamicResource GridSplitterPreviewBackground}" />
|
||||
</Template>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="GridSplitter">
|
||||
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -8,11 +8,7 @@
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
<ItemsPresenter Name="PART_ItemsPresenter" ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
@@ -30,10 +30,7 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizationMode}" />
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
188
src/Semi.Avalonia/Controls/ManagedFileChooser.axaml
Normal file
188
src/Semi.Avalonia/Controls/ManagedFileChooser.axaml
Normal file
@@ -0,0 +1,188 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
|
||||
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs">
|
||||
<!-- Add Resources Here -->
|
||||
<Design.PreviewWith>
|
||||
<Border
|
||||
Width="800"
|
||||
Height="500"
|
||||
Padding="20">
|
||||
<dialogs:ManagedFileChooser />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<internal:ResourceSelectorConverter x:Key="Icons">
|
||||
<PathGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</PathGeometry>
|
||||
<PathGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</PathGeometry>
|
||||
<PathGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</PathGeometry>
|
||||
</internal:ResourceSelectorConverter>
|
||||
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
|
||||
<Setter Property="dialogs:ManagedFileChooser.Template">
|
||||
<ControlTemplate TargetType="dialogs:ManagedFileChooser">
|
||||
<DockPanel>
|
||||
<Border
|
||||
Padding="4"
|
||||
DockPanel.Dock="Left"
|
||||
Theme="{DynamicResource CardBorder}">
|
||||
<ListBox
|
||||
x:Name="PART_QuickLinks"
|
||||
Focusable="False"
|
||||
Items="{Binding QuickLinks}"
|
||||
SelectedIndex="{Binding QuickLinksSelectedIndex}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{Binding IconKey, Converter={StaticResource Icons}}"
|
||||
Foreground="{DynamicResource ManagedFileChooserIconForeground}" />
|
||||
<TextBlock Foreground="{DynamicResource ManagedFileChooserTextForeground}" Text="{Binding DisplayName}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<DockPanel
|
||||
x:Name="NavBar"
|
||||
Margin="8,5,8,0"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Top">
|
||||
<Button
|
||||
Command="{Binding GoUp}"
|
||||
DockPanel.Dock="Left"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{DynamicResource ManagedFileChooserUpButtonGlyph}"
|
||||
Foreground="{DynamicResource ManagedFileChooserIconForeground}" />
|
||||
</Button>
|
||||
<TextBox x:Name="Location" Text="{Binding Location}">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Command="{Binding EnterPressed}" Gesture="Enter" />
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
</DockPanel>
|
||||
<DockPanel Margin="8,0,8,8" DockPanel.Dock="Bottom">
|
||||
<DockPanel Margin="0,0,0,8" DockPanel.Dock="Top">
|
||||
<ComboBox
|
||||
DockPanel.Dock="Right"
|
||||
IsVisible="{Binding ShowFilters}"
|
||||
Items="{Binding Filters}"
|
||||
SelectedItem="{Binding SelectedFilter}" />
|
||||
<TextBox
|
||||
Margin="0,0,8,0"
|
||||
IsVisible="{Binding !SelectingFolder}"
|
||||
Text="{Binding FileName}"
|
||||
Watermark="File name" />
|
||||
</DockPanel>
|
||||
<CheckBox
|
||||
VerticalAlignment="Center"
|
||||
Content="Show hidden files"
|
||||
DockPanel.Dock="Left"
|
||||
IsChecked="{Binding ShowHiddenFiles}" />
|
||||
<UniformGrid
|
||||
x:Name="Finalize"
|
||||
HorizontalAlignment="Right"
|
||||
Rows="1">
|
||||
<Button
|
||||
Margin="8,0"
|
||||
Classes="Primary"
|
||||
Command="{Binding Ok}">
|
||||
OK
|
||||
</Button>
|
||||
<Button
|
||||
Margin="8,0"
|
||||
Classes="Danger"
|
||||
Command="{Binding Cancel}">
|
||||
Cancel
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</DockPanel>
|
||||
<Border Padding="8" Theme="{DynamicResource CardBorder}">
|
||||
<DockPanel Grid.IsSharedSizeScope="True">
|
||||
<Grid
|
||||
Margin="0,0,0,8"
|
||||
HorizontalAlignment="Stretch"
|
||||
ClipToBounds="True"
|
||||
DockPanel.Dock="Top">
|
||||
<Grid.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="Margin" Value="8 0 0 0 " />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" SharedSizeGroup="Icon" />
|
||||
<ColumnDefinition Width="16" SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition Width="275" SharedSizeGroup="Name" />
|
||||
<ColumnDefinition Width="16" SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition Width="200" SharedSizeGroup="Modified" />
|
||||
<ColumnDefinition Width="16" SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition Width="150" SharedSizeGroup="Type" />
|
||||
<ColumnDefinition Width="16" SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition Width="200" SharedSizeGroup="Size" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<GridSplitter Grid.Column="1" Width="1" />
|
||||
<TextBlock Grid.Column="2" Text="Name" />
|
||||
<GridSplitter Grid.Column="3" Width="1" />
|
||||
<TextBlock Grid.Column="4" Text="Date Modified" />
|
||||
<GridSplitter Grid.Column="5" Width="1" />
|
||||
<TextBlock Grid.Column="6" Text="Type" />
|
||||
<GridSplitter Grid.Column="7" Width="1" />
|
||||
<TextBlock Grid.Column="8" Text="Size" />
|
||||
</Grid>
|
||||
<ListBox Name="PART_Files" Items="{Binding Items}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition SharedSizeGroup="Icon" />
|
||||
<ColumnDefinition SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition SharedSizeGroup="Name" />
|
||||
<ColumnDefinition SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition SharedSizeGroup="Modified" />
|
||||
<ColumnDefinition SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition SharedSizeGroup="Type" />
|
||||
<ColumnDefinition SharedSizeGroup="Splitter" />
|
||||
<ColumnDefinition SharedSizeGroup="Size" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<PathIcon
|
||||
Width="16"
|
||||
Height="16"
|
||||
Data="{Binding IconKey, Converter={StaticResource Icons}}"
|
||||
Foreground="{DynamicResource ManagedFileChooserIconForeground}" />
|
||||
<TextBlock
|
||||
Grid.Column="2"
|
||||
Foreground="{DynamicResource ManagedFileChooserTextForeground}"
|
||||
Text="{Binding DisplayName}" />
|
||||
<TextBlock
|
||||
Grid.Column="4"
|
||||
Foreground="{DynamicResource ManagedFileChooserTextForeground}"
|
||||
Text="{Binding Modified}" />
|
||||
<TextBlock
|
||||
Grid.Column="6"
|
||||
Foreground="{DynamicResource ManagedFileChooserTextForeground}"
|
||||
Text="{Binding Type}" />
|
||||
<TextBlock Grid.Column="8" Foreground="{DynamicResource ManagedFileChooserTextForeground}">
|
||||
<TextBlock.Text>
|
||||
<Binding Path="Size">
|
||||
<Binding.Converter>
|
||||
<internal:FileSizeStringConverter />
|
||||
</Binding.Converter>
|
||||
</Binding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -172,18 +172,19 @@
|
||||
</Border>
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
HorizontalOffset="{DynamicResource MenuFlyoutSubItemPopupHorizontalOffset}"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="False"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||
Mode=TwoWay}"
|
||||
PlacementMode="Right"
|
||||
VerticalOffset="-4"
|
||||
WindowManagerAddShadowHint="False">
|
||||
<Border
|
||||
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
||||
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||
Margin="0,4"
|
||||
Margin="8"
|
||||
Padding="{DynamicResource MenuFlyoutPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource MenuFlyoutBackground}"
|
||||
@@ -195,8 +196,6 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -274,29 +273,30 @@
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||
Mode=TwoWay}"
|
||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||
VerticalOffset="-4"
|
||||
WindowManagerAddShadowHint="False">
|
||||
<Border
|
||||
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
||||
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||
Margin="0,4"
|
||||
Margin="8"
|
||||
Padding="{DynamicResource MenuFlyoutPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource MenuFlyoutBackground}"
|
||||
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
|
||||
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
||||
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||
<ScrollViewer Padding="{DynamicResource MenuFlyoutPadding}" Theme="{StaticResource MenuScrollViewer}">
|
||||
<ScrollViewer Theme="{StaticResource MenuScrollViewer}">
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -339,8 +339,6 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
KeyboardNavigation.TabNavigation="Continue" />
|
||||
</Border>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<Setter Property="MenuFlyoutPresenter.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
|
||||
<Setter Property="MenuFlyoutPresenter.BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" />
|
||||
<Setter Property="MenuFlyoutPresenter.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
|
||||
<Setter Property="MenuFlyoutPresenter.FontSize" Value="{DynamicResource TextBlockFontSize}" />
|
||||
<Setter Property="MenuFlyoutPresenter.FontWeight" Value="{DynamicResource TextBlockFontWeight}" />
|
||||
<Setter Property="MenuFlyoutPresenter.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="MenuFlyoutPresenter.Margin" Value="4" />
|
||||
@@ -17,7 +20,7 @@
|
||||
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||
Margin="0,4"
|
||||
Margin="8"
|
||||
Padding="{DynamicResource MenuFlyoutPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource MenuFlyoutBackground}"
|
||||
@@ -33,8 +36,6 @@
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
KeyboardNavigation.TabNavigation="Continue" />
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<ControlTemplate TargetType="NotificationCard">
|
||||
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True">
|
||||
<Border
|
||||
Margin="4"
|
||||
BoxShadow="0 0 14 #1A000000"
|
||||
Margin="8"
|
||||
BoxShadow="{DynamicResource NotificationCardBoxShadows}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
|
||||
@@ -20,4 +20,21 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type OverlayPopupHost}" TargetType="OverlayPopupHost">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
<VisualLayerManager IsPopup="True">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</VisualLayerManager>
|
||||
</LayoutTransformControl>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -150,7 +150,10 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding ShowProgressText}">
|
||||
<TextBlock FontWeight="{DynamicResource ProgressBarTextFontWeight}" Foreground="{DynamicResource ProgressBarTextForeground}">
|
||||
<TextBlock
|
||||
Name="PART_ProgressText"
|
||||
FontWeight="{DynamicResource ProgressBarTextFontWeight}"
|
||||
Foreground="{DynamicResource ProgressBarTextForeground}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}">
|
||||
<TemplateBinding Property="ProgressTextFormat" />
|
||||
@@ -294,6 +297,9 @@
|
||||
<Setter Property="Border.MinWidth" Value="4" />
|
||||
<Setter Property="Border.HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Right">
|
||||
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
@@ -314,6 +320,9 @@
|
||||
<Setter Property="Border.MinWidth" Value="4" />
|
||||
<Setter Property="Border.HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
Height="{DynamicResource RadioButtonIconRadius}"
|
||||
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
|
||||
Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}"
|
||||
StrokeThickness="1" UseLayoutRounding="False" />
|
||||
StrokeThickness="1"
|
||||
UseLayoutRounding="False" />
|
||||
|
||||
<Ellipse
|
||||
Name="CheckGlyph"
|
||||
@@ -48,11 +49,13 @@
|
||||
Fill="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
Opacity="0"
|
||||
Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
StrokeThickness="0" UseLayoutRounding="False" />
|
||||
StrokeThickness="0"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter" Grid.Column="1"
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
@@ -158,7 +161,7 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:checked">
|
||||
<Setter Property="RadioButton.Background" Value="White" />
|
||||
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonCheckedBackground}" />
|
||||
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:unchecked">
|
||||
@@ -206,7 +209,8 @@
|
||||
Height="{DynamicResource RadioButtonIconRadius}"
|
||||
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
|
||||
Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}"
|
||||
StrokeThickness="1" UseLayoutRounding="False" />
|
||||
StrokeThickness="1"
|
||||
UseLayoutRounding="False" />
|
||||
|
||||
<Ellipse
|
||||
Name="CheckGlyph"
|
||||
@@ -215,11 +219,13 @@
|
||||
Fill="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
Opacity="0"
|
||||
Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
StrokeThickness="0" UseLayoutRounding="False" />
|
||||
StrokeThickness="0"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter" Grid.Column="1"
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:dialog="using:Avalonia.Dialogs">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel>
|
||||
<ScrollBar Width="200" Orientation="Horizontal" />
|
||||
<ScrollBar Height="200" Orientation="Vertical" />
|
||||
<ScrollViewer
|
||||
Width="200" Height="200"
|
||||
HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
|
||||
Width="200"
|
||||
Height="200"
|
||||
HorizontalScrollBarVisibility="Visible"
|
||||
VerticalScrollBarVisibility="Visible">
|
||||
<Border
|
||||
Width="400" Height="400"
|
||||
Width="400"
|
||||
Height="400"
|
||||
Background="aqua" />
|
||||
</ScrollViewer>
|
||||
<dialog:ManagedFileChooser />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar">
|
||||
@@ -23,11 +29,14 @@
|
||||
<Border Background="{DynamicResource ScrollBarBackground}" UseLayoutRounding="False">
|
||||
<Grid Name="PART_RootGrid" ColumnDefinitions="Auto,*,Auto">
|
||||
<RepeatButton
|
||||
Name="PART_LineUpButton" Grid.Row="0"
|
||||
Name="PART_LineUpButton"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
MinWidth="{DynamicResource ScrollBarThickness}"
|
||||
VerticalAlignment="Center" Classes="repeat"
|
||||
CornerRadius="0" Focusable="False">
|
||||
VerticalAlignment="Center"
|
||||
Classes="repeat"
|
||||
CornerRadius="0"
|
||||
Focusable="False">
|
||||
<Path Data="M 4 0 L 4 8 L 0 4 Z" />
|
||||
</RepeatButton>
|
||||
<Track
|
||||
@@ -40,25 +49,34 @@
|
||||
Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_PageUpButton" MinWidth="0"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Classes="repeattrack" CornerRadius="0"
|
||||
Name="PART_PageUpButton"
|
||||
MinWidth="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Classes="repeattrack"
|
||||
CornerRadius="0"
|
||||
Focusable="False" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_PageDownButton" MinWidth="0"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Classes="repeattrack" CornerRadius="0"
|
||||
Name="PART_PageDownButton"
|
||||
MinWidth="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Classes="repeattrack"
|
||||
CornerRadius="0"
|
||||
Focusable="False" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb Name="thumb" />
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Name="PART_LineDownButton" Grid.Column="2"
|
||||
Name="PART_LineDownButton"
|
||||
Grid.Column="2"
|
||||
MinWidth="{DynamicResource ScrollBarThickness}"
|
||||
VerticalAlignment="Center" Classes="repeat"
|
||||
CornerRadius="0" Focusable="False">
|
||||
VerticalAlignment="Center"
|
||||
Classes="repeat"
|
||||
CornerRadius="0"
|
||||
Focusable="False">
|
||||
<Path Data="M 0 0 L 4 4 L 0 8 Z" />
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
@@ -73,14 +91,18 @@
|
||||
<Border Background="{DynamicResource ScrollBarBackground}" UseLayoutRounding="False">
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<RepeatButton
|
||||
Name="PART_LineUpButton" Grid.Row="0"
|
||||
Name="PART_LineUpButton"
|
||||
Grid.Row="0"
|
||||
MinHeight="{DynamicResource ScrollBarThickness}"
|
||||
HorizontalAlignment="Center" Classes="repeat"
|
||||
CornerRadius="0" Focusable="False">
|
||||
HorizontalAlignment="Center"
|
||||
Classes="repeat"
|
||||
CornerRadius="0"
|
||||
Focusable="False">
|
||||
<Path Data="M 0 4 L 8 4 L 4 0 Z" />
|
||||
</RepeatButton>
|
||||
<Track
|
||||
Grid.Row="1" IsDirectionReversed="True"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="True"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
@@ -89,25 +111,34 @@
|
||||
Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_PageUpButton" MinHeight="0"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Classes="repeattrack" CornerRadius="0"
|
||||
Name="PART_PageUpButton"
|
||||
MinHeight="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Classes="repeattrack"
|
||||
CornerRadius="0"
|
||||
Focusable="False" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_PageDownButton" MinHeight="0"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Classes="repeattrack" CornerRadius="0"
|
||||
Name="PART_PageDownButton"
|
||||
MinHeight="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Classes="repeattrack"
|
||||
CornerRadius="0"
|
||||
Focusable="False" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb Name="thumb" />
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Name="PART_LineDownButton" Grid.Row="2"
|
||||
Name="PART_LineDownButton"
|
||||
Grid.Row="2"
|
||||
MinHeight="{DynamicResource ScrollBarThickness}"
|
||||
HorizontalAlignment="Center" Classes="repeat"
|
||||
CornerRadius="0" Focusable="False">
|
||||
HorizontalAlignment="Center"
|
||||
Classes="repeat"
|
||||
CornerRadius="0"
|
||||
Focusable="False">
|
||||
<Path Data="M 0 0 L 4 4 L 8 0 Z" />
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
@@ -122,7 +153,8 @@
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="24" UseLayoutRounding="False" />
|
||||
CornerRadius="24"
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
@@ -185,8 +217,10 @@
|
||||
</ScrollContentPresenter.GestureRecognizers>
|
||||
</ScrollContentPresenter>
|
||||
<ScrollBar
|
||||
Name="horizontalScrollBar" Grid.Row="1"
|
||||
Grid.Column="0" Focusable="False"
|
||||
Name="horizontalScrollBar"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Focusable="False"
|
||||
LargeChange="{Binding LargeChange.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Maximum="{TemplateBinding HorizontalScrollBarMaximum}"
|
||||
Orientation="Horizontal"
|
||||
@@ -196,8 +230,10 @@
|
||||
Value="{TemplateBinding HorizontalScrollBarValue,
|
||||
Mode=TwoWay}" />
|
||||
<ScrollBar
|
||||
Name="verticalScrollBar" Grid.Row="0"
|
||||
Grid.Column="1" Focusable="False"
|
||||
Name="verticalScrollBar"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Focusable="False"
|
||||
LargeChange="{Binding LargeChange.Height, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Maximum="{TemplateBinding VerticalScrollBarMaximum}"
|
||||
Orientation="Vertical"
|
||||
@@ -207,7 +243,8 @@
|
||||
Value="{TemplateBinding VerticalScrollBarValue,
|
||||
Mode=TwoWay}" />
|
||||
<Panel
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Background="{DynamicResource ColorScrollBarBackground}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
@@ -228,7 +265,8 @@
|
||||
<ControlTemplate TargetType="ScrollViewer">
|
||||
<DockPanel>
|
||||
<RepeatButton
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
DockPanel.Dock="Top">
|
||||
<RepeatButton.IsVisible>
|
||||
@@ -242,7 +280,8 @@
|
||||
<Path Data="M 0 4 L 8 4 L 4 0 Z" />
|
||||
</RepeatButton>
|
||||
<RepeatButton
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
DockPanel.Dock="Bottom">
|
||||
<RepeatButton.IsVisible>
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
|
||||
<MenuItem
|
||||
x:Name="SelectableTextBlockContextFlyoutCopyItem"
|
||||
Command="{Binding $parent[SelectableTextBlock].Copy}"
|
||||
Header="Copy"
|
||||
InputGesture="{x:Static TextBox.CopyGesture}"
|
||||
IsEnabled="{Binding $parent[SelectableTextBlock].CanCopy}" />
|
||||
</MenuFlyout>
|
||||
|
||||
<ControlTheme x:Key="{x:Type SelectableTextBlock}" TargetType="SelectableTextBlock">
|
||||
<Setter Property="SelectableTextBlock.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
|
||||
<Setter Property="SelectableTextBlock.FontSize" Value="{DynamicResource TextBlockFontSize}" />
|
||||
@@ -34,6 +44,10 @@
|
||||
<Style Selector="^.Delete">
|
||||
<Setter Property="SelectableTextBlock.TextDecorations" Value="StrikeThrough" />
|
||||
</Style>
|
||||
<Style Selector="^[IsEnabled=True]">
|
||||
<Setter Property="Cursor" Value="IBeam" />
|
||||
<Setter Property="ContextFlyout" Value="{StaticResource SelectableTextBlockContextFlyout}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
<ControlTheme
|
||||
x:Key="TitleSelectableTextBlock"
|
||||
|
||||
293
src/Semi.Avalonia/Controls/Slider.axaml
Normal file
293
src/Semi.Avalonia/Controls/Slider.axaml
Normal file
@@ -0,0 +1,293 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="SliderHorizontalRepeatButton" TargetType="RepeatButton">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Grid>
|
||||
<Border
|
||||
Name="FocusTarget"
|
||||
Margin="0,-10"
|
||||
Background="Transparent" />
|
||||
<Border
|
||||
Name="TrackBackground"
|
||||
Height="{DynamicResource SliderTrackWidth}"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
VerticalAlignment="Center"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="{DynamicResource SliderTrackCornerRadius}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="SliderVerticalRepeatButton" TargetType="RepeatButton">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Grid>
|
||||
<Border
|
||||
Name="FocusTarget"
|
||||
Margin="0,-10"
|
||||
Background="Transparent" />
|
||||
<Border
|
||||
Name="TrackBackground"
|
||||
Width="{DynamicResource SliderTrackWidth}"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="{DynamicResource SliderTrackCornerRadius}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="SliderThumbTheme" TargetType="Thumb">
|
||||
<Setter Property="Thumb.CornerRadius" Value="{DynamicResource SliderThumbCornerRadius}" />
|
||||
<Setter Property="Thumb.Cursor" Value="Hand" />
|
||||
<Setter Property="Thumb.Background" Value="{DynamicResource SliderThumbBackground}" />
|
||||
<Setter Property="Thumb.BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}" />
|
||||
<Setter Property="Thumb.BorderThickness" Value="{DynamicResource SliderThumbBorderThickness}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover /template/ Border">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPressedBorderBrush}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type Slider}" TargetType="Slider">
|
||||
<Setter Property="Background" Value="{DynamicResource SliderTrackBackground}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource SliderBorderThickness}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SliderTrackForeground}" />
|
||||
<Style Selector="^:horizontal">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Slider">
|
||||
<Border
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
x:Name="SliderContainer"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Background="Transparent">
|
||||
<Grid.Styles>
|
||||
<Style Selector="TickBar">
|
||||
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<Grid x:Name="HorizontalTemplate" MinHeight="50">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="15" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="15" />
|
||||
</Grid.RowDefinitions>
|
||||
<TickBar
|
||||
Name="TopTickBar"
|
||||
Grid.Row="0"
|
||||
Height="{DynamicResource SliderTickHorizontalHeight}"
|
||||
Margin="0,0,0,4"
|
||||
VerticalAlignment="Bottom"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Top"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<TickBar
|
||||
Name="BottomTickBar"
|
||||
Grid.Row="2"
|
||||
Height="{DynamicResource SliderTickHorizontalHeight}"
|
||||
Margin="0,4,0,0"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Bottom"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="Horizontal"
|
||||
Value="{TemplateBinding Value,
|
||||
Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
Background="{TemplateBinding Foreground}"
|
||||
Focusable="False"
|
||||
Theme="{StaticResource SliderHorizontalRepeatButton}" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_IncreaseButton"
|
||||
Background="{TemplateBinding Background}"
|
||||
Focusable="False"
|
||||
Theme="{StaticResource SliderHorizontalRepeatButton}" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb
|
||||
Name="thumb"
|
||||
Width="{DynamicResource SliderThumbWidth}"
|
||||
Height="{DynamicResource SliderThumbHeight}"
|
||||
DataContext="{TemplateBinding Value}"
|
||||
Theme="{StaticResource SliderThumbTheme}" />
|
||||
</Track>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^:vertical">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
x:Name="SliderContainer"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Background="{DynamicResource SliderContainerBackground}">
|
||||
<Grid.Styles>
|
||||
<Style Selector="TickBar">
|
||||
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<Grid
|
||||
x:Name="VerticalTemplate"
|
||||
MinWidth="{DynamicResource SliderVerticalWidth}"
|
||||
RowDefinitions="*,Auto,Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{DynamicResource SliderPreContentMargin}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="{DynamicResource SliderPostContentMargin}" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TickBar
|
||||
Name="LeftTickBar"
|
||||
Grid.RowSpan="3"
|
||||
Width="{DynamicResource SliderTickVerticalWidth}"
|
||||
Margin="0,0,4,0"
|
||||
HorizontalAlignment="Right"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Left"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<TickBar
|
||||
Name="RightTickBar"
|
||||
Grid.RowSpan="3"
|
||||
Grid.Column="2"
|
||||
Width="{DynamicResource SliderTickVerticalWidth}"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Right"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.RowSpan="3"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="1"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="Vertical"
|
||||
Value="{TemplateBinding Value,
|
||||
Mode=TwoWay}">
|
||||
<Track.DecreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
Background="{TemplateBinding Foreground}"
|
||||
Focusable="False"
|
||||
Theme="{StaticResource SliderVerticalRepeatButton}" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
<RepeatButton
|
||||
Name="PART_IncreaseButton"
|
||||
Background="{TemplateBinding Background}"
|
||||
Focusable="False"
|
||||
Theme="{StaticResource SliderVerticalRepeatButton}" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb
|
||||
Name="thumb"
|
||||
Width="{DynamicResource SliderThumbWidth}"
|
||||
Height="{DynamicResource SliderThumbHeight}"
|
||||
DataContext="{TemplateBinding Value}"
|
||||
Theme="{StaticResource SliderThumbTheme}" />
|
||||
</Track>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.ToolTip /template/ Thumb">
|
||||
<Setter Property="ToolTip.Tip" Value="{Binding $parent[Slider].Value, Mode=OneWay, StringFormat='\{0:f\}'}" />
|
||||
<Setter Property="ToolTip.Placement" Value="Top" />
|
||||
<Setter Property="ToolTip.VerticalOffset" Value="-10" />
|
||||
<Setter Property="ToolTip.HorizontalOffset" Value="-15" />
|
||||
</Style>
|
||||
|
||||
<!-- TickBar Placement States -->
|
||||
|
||||
<Style Selector="^[TickPlacement=TopLeft] /template/ TickBar#LeftTickBar, ^[TickPlacement=Outside] /template/ TickBar#LeftTickBar">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^[TickPlacement=TopLeft] /template/ TickBar#TopTickBar, ^[TickPlacement=Outside] /template/ TickBar#TopTickBar">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^[TickPlacement=BottomRight] /template/ TickBar#BottomTickBar, ^[TickPlacement=Outside] /template/ TickBar#BottomTickBar">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^[TickPlacement=BottomRight] /template/ TickBar#RightTickBar, ^[TickPlacement=Outside] /template/ TickBar#RightTickBar">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<!-- Disabled State -->
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ RepeatButton#PART_DecreaseButton">
|
||||
<Setter Property="Background" Value="{DynamicResource SliderTrackDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ RepeatButton#PART_IncreaseButton">
|
||||
<Setter Property="Background" Value="{DynamicResource SliderTrackDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Thumb">
|
||||
<Setter Property="Thumb.BorderBrush" Value="{DynamicResource SliderThumbDisabledBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
119
src/Semi.Avalonia/Controls/SplitButton.axaml
Normal file
119
src/Semi.Avalonia/Controls/SplitButton.axaml
Normal file
@@ -0,0 +1,119 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
|
||||
<ControlTheme x:Key="{x:Type SplitButton}" TargetType="SplitButton">
|
||||
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
<Setter Property="SplitButton.BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||
<Setter Property="SplitButton.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||
<Setter Property="SplitButton.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||
<Setter Property="SplitButton.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="SplitButton.RenderTransform" Value="none" />
|
||||
<Setter Property="SplitButton.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||
<Setter Property="SplitButton.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||
<Setter Property="SplitButton.HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="SplitButton.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="SplitButton.MinHeight" Value="12" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitButton">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||
<Button
|
||||
x:Name="PART_PrimaryButton"
|
||||
Grid.Column="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="3 0 0 3"
|
||||
Focusable="False"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
KeyboardNavigation.IsTabStop="False" />
|
||||
|
||||
<Border
|
||||
x:Name="SeparatorBorder"
|
||||
Grid.Column="1"
|
||||
Width="{DynamicResource SplitButtonSeparatorWidth}"
|
||||
Background="White"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0.5" />
|
||||
|
||||
<Button
|
||||
x:Name="PART_SecondaryButton"
|
||||
Grid.Column="2"
|
||||
Padding="4,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0 3 3 0"
|
||||
Focusable="False"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
KeyboardNavigation.IsTabStop="False">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
<Style Selector="^.Secondary /template/ Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary /template/ Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Warning /template/ Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Danger /template/ Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:checked">
|
||||
<Style Selector="^ /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Secondary /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Warning /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Danger /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
251
src/Semi.Avalonia/Controls/SplitView.axaml
Normal file
251
src/Semi.Avalonia/Controls/SplitView.axaml
Normal file
@@ -0,0 +1,251 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="using:System">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView">
|
||||
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
||||
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
||||
<Setter Property="PaneBackground" Value="{DynamicResource SplitViewPaneBackground}" />
|
||||
|
||||
<Style Selector="^:left">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitView">
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- why is this throwing a binding error? -->
|
||||
<ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Panel
|
||||
Name="PART_PaneRoot"
|
||||
HorizontalAlignment="Left"
|
||||
Background="{TemplateBinding PaneBackground}"
|
||||
ClipToBounds="True"
|
||||
ZIndex="100">
|
||||
<ContentPresenter
|
||||
x:Name="PART_PanePresenter"
|
||||
Content="{TemplateBinding Pane}"
|
||||
ContentTemplate="{TemplateBinding PaneTemplate}" />
|
||||
<Rectangle
|
||||
Name="HCPaneBorder"
|
||||
Width="1"
|
||||
HorizontalAlignment="Right"
|
||||
Fill="{DynamicResource SplitViewSeparatorBackground}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="ContentRoot">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Rectangle
|
||||
Name="LightDismissLayer"
|
||||
Fill="Transparent"
|
||||
IsVisible="False" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactinline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactoverlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<!-- ColumnSpan should be 2 -->
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:right">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Panel
|
||||
Name="PART_PaneRoot"
|
||||
HorizontalAlignment="Right"
|
||||
Background="{TemplateBinding PaneBackground}"
|
||||
ClipToBounds="True"
|
||||
ZIndex="100">
|
||||
<ContentPresenter
|
||||
x:Name="PART_PanePresenter"
|
||||
Content="{TemplateBinding Pane}"
|
||||
ContentTemplate="{TemplateBinding PaneTemplate}" />
|
||||
<Rectangle
|
||||
Name="HCPaneBorder"
|
||||
Width="1"
|
||||
HorizontalAlignment="Left"
|
||||
Fill="{DynamicResource SplitViewSeparatorBackground}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="ContentRoot">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Rectangle Name="LightDismissLayer" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactinline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactoverlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:open">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Width"
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Opacity"
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Opacity" Value="1.0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:closed">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Width"
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Opacity"
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Opacity" Value="0.0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:lightdismiss /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Fill" Value="#99000000" />
|
||||
</Style>
|
||||
<Style Selector="^:overlay:open /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="^:compactoverlay:open /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -15,11 +15,7 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel>
|
||||
<Panel DockPanel.Dock="{TemplateBinding TabStripPlacement}">
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
<ItemsPresenter Name="PART_ItemsPresenter" ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
<Border Name="PART_BorderSeparator" Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Panel>
|
||||
<ContentPresenter
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Panel>
|
||||
<Label
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
@@ -37,24 +37,23 @@
|
||||
<Border
|
||||
Name="PART_SelectedPipe"
|
||||
Background="{DynamicResource TabItemLinePipeBackground}"
|
||||
CornerRadius="{DynamicResource ControlCornerRadius}"
|
||||
IsVisible="True" UseLayoutRounding="False" />
|
||||
IsVisible="True"
|
||||
UseLayoutRounding="False" />
|
||||
</Panel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Selected state -->
|
||||
<!-- We don't use selector to PART_LayoutRoot, so developer can override selected item background with TabStripItem.Background -->
|
||||
<Style Selector="^:selected /template/ Label#PART_ContentPresenter">
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderSelectedForeground}" />
|
||||
<Setter Property="Label.FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
|
||||
<Setter Property="ContentPresenter.FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Style Selector="^:pointerover /template/ Label#PART_ContentPresenter">
|
||||
<Setter Property="Label.Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="ContentPresenter.Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_SelectedPipe">
|
||||
<Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipePointeroverBorderBrush}" />
|
||||
@@ -88,7 +87,7 @@
|
||||
<Setter Property="Border.HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Border.VerticalAlignment" Value="Bottom" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Label#PART_ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Margin" Value="0,0,0,4" />
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -99,7 +98,7 @@
|
||||
<Setter Property="Border.HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Border.VerticalAlignment" Value="Top" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Label#PART_ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Margin" Value="0,4,0,0" />
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -122,7 +121,7 @@
|
||||
<Setter Property="Border.HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="Border.VerticalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Label#PART_ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Margin" Value="0,0,8,0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
107
src/Semi.Avalonia/Controls/TabStrip.axaml
Normal file
107
src/Semi.Avalonia/Controls/TabStrip.axaml
Normal file
@@ -0,0 +1,107 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type TabStrip}" TargetType="TabStrip">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Panel>
|
||||
<ItemsPresenter Name="PART_ItemsPresenter" ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
<Border
|
||||
Name="PART_BorderSeparator"
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Bottom"
|
||||
Background="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type TabStripItem}" TargetType="TabStripItem">
|
||||
<Setter Property="TabStripItem.Background" Value="{DynamicResource TabItemLinePipeBackground}" />
|
||||
<Setter Property="TabStripItem.Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" />
|
||||
<Setter Property="TabStripItem.Margin" Value="0" />
|
||||
<Setter Property="TabStripItem.Padding" Value="8 4" />
|
||||
<Setter Property="TabStripItem.MinHeight" Value="5" />
|
||||
<Setter Property="TabStripItem.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="TabStripItem.Template">
|
||||
<ControlTemplate TargetType="TabStripItem">
|
||||
<Border
|
||||
Name="PART_LayoutRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Panel>
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Margin="0,0,0,4"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
<Border
|
||||
Name="PART_SelectedPipe"
|
||||
Height="2"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Bottom"
|
||||
Background="{DynamicResource TabItemLinePipeBackground}"
|
||||
IsVisible="True"
|
||||
UseLayoutRounding="False" />
|
||||
</Panel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<!-- Selected state -->
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderSelectedForeground}" />
|
||||
<Setter Property="ContentPresenter.FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Style Selector="^:pointerover /template/ Label#PART_ContentPresenter">
|
||||
<Setter Property="Label.Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_SelectedPipe">
|
||||
<Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipePointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#PART_SelectedPipe">
|
||||
<Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:selected /template/ Border#PART_SelectedPipe">
|
||||
<Setter Property="Border.Background" Value="{DynamicResource TabItemLinePipeSelectedBackground}" />
|
||||
</Style>
|
||||
|
||||
<!-- Selected Pressed state -->
|
||||
<Style Selector="^:selected:pressed /template/ Border#PART_LayoutRoot">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemHeaderBackgroundSelectedPressed}" />
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundSelectedPressed}" />
|
||||
</Style>
|
||||
|
||||
<!-- Disabled state -->
|
||||
<Style Selector="^:disabled /template/ Border#PART_LayoutRoot">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemHeaderBackgroundDisabled}" />
|
||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHeaderForegroundDisabled}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -18,6 +18,28 @@
|
||||
Theme="{StaticResource BorderlessTextBox}" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
|
||||
<MenuItem
|
||||
x:Name="TextBoxContextFlyoutCutItem"
|
||||
Command="{Binding $parent[TextBox].Cut}"
|
||||
Header="Cut"
|
||||
InputGesture="{x:Static TextBox.CutGesture}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCut}" />
|
||||
<MenuItem
|
||||
x:Name="TextBoxContextFlyoutCopyItem"
|
||||
Command="{Binding $parent[TextBox].Copy}"
|
||||
Header="Copy"
|
||||
InputGesture="{x:Static TextBox.CopyGesture}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCopy}" />
|
||||
<MenuItem
|
||||
x:Name="TextBoxContextFlyoutPasteItem"
|
||||
Command="{Binding $parent[TextBox].Paste}"
|
||||
Header="Paste"
|
||||
InputGesture="{x:Static TextBox.PasteGesture}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanPaste}" />
|
||||
</MenuFlyout>
|
||||
|
||||
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
|
||||
<ControlTheme.Resources>
|
||||
<ControlTheme x:Key="InputClearButton" TargetType="Button">
|
||||
@@ -72,11 +94,13 @@
|
||||
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
|
||||
<Setter Property="TextBox.FontSize" Value="14" />
|
||||
<Setter Property="TextBox.Cursor" Value="IBeam" />
|
||||
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
|
||||
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
||||
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
|
||||
<Setter Property="TextBox.Template">
|
||||
<ControlTemplate TargetType="TextBox">
|
||||
<Border
|
||||
@@ -85,7 +109,7 @@
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{DynamicResource TextBoxDefaultCornerRadius}">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto, Auto, Auto">
|
||||
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto,*,Auto, Auto, Auto">
|
||||
<ContentPresenter
|
||||
Grid.Column="0"
|
||||
Padding="{DynamicResource TextBoxInnerLeftContentPadding}"
|
||||
@@ -95,7 +119,6 @@
|
||||
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||
<ScrollViewer
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
||||
|
||||
249
src/Semi.Avalonia/Controls/TimePicker.axaml
Normal file
249
src/Semi.Avalonia/Controls/TimePicker.axaml
Normal file
@@ -0,0 +1,249 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
|
||||
<Setter Property="MinWidth" Value="242" />
|
||||
<Setter Property="MaxHeight" Value="300" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="TimePickerPresenter">
|
||||
<Border
|
||||
Name="Background"
|
||||
Margin="{DynamicResource DateTimePickerFlyoutBorderMargin}"
|
||||
Padding="{DynamicResource DateTimePickerFlyoutPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
|
||||
<Grid Name="PART_PickerContainer">
|
||||
<Grid.Styles>
|
||||
<Style Selector="DateTimePickerPanel > ListBoxItem">
|
||||
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<!-- Ignore col defs here, set in code -->
|
||||
<Panel Name="PART_HourHost" Grid.Column="0">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_HourSelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="Hour"
|
||||
ShouldLoop="True" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_HourUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_HourDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="PART_MinuteHost" Grid.Column="2">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_MinuteSelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="Minute"
|
||||
ShouldLoop="True" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="PART_PeriodHost" Grid.Column="4">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<DateTimePickerPanel
|
||||
Name="PART_PeriodSelector"
|
||||
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
|
||||
PanelType="TimePeriod"
|
||||
ShouldLoop="False" />
|
||||
</ScrollViewer>
|
||||
<RepeatButton Name="PART_PeriodUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
|
||||
<RepeatButton Name="PART_PeriodDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
|
||||
</Panel>
|
||||
|
||||
<Rectangle
|
||||
Name="PART_FirstSpacer"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
<Rectangle
|
||||
Name="PART_SecondSpacer"
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
Name="AcceptDismissGrid"
|
||||
Grid.Row="1"
|
||||
ColumnDefinitions="*,*">
|
||||
<Button
|
||||
Name="PART_AcceptButton"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource DateTimePickerAcceptGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_DismissButton"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
FontSize="16"
|
||||
Theme="{StaticResource DateTimePickerButton}">
|
||||
<PathIcon
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource DateTimePickerDismissGlyph}"
|
||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
Grid.ColumnSpan="2"
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ Panel">
|
||||
<Style Selector="^:pointerover RepeatButton">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type TimePicker}" TargetType="TimePicker">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}">
|
||||
<Button
|
||||
x:Name="PART_FlyoutButton"
|
||||
Width="242"
|
||||
MinWidth="242"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Cursor="Hand"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsEnabled="{TemplateBinding IsEnabled}"
|
||||
Theme="{StaticResource DateTimePickerFlyoutButton}">
|
||||
<Grid ColumnDefinitions="*, Auto">
|
||||
<Grid Name="PART_FlyoutButtonContentGrid" Grid.Column="0">
|
||||
<!-- Ignore col defs here, set in code -->
|
||||
<Border
|
||||
x:Name="PART_FirstPickerHost"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<TextBlock
|
||||
x:Name="PART_HourTextBlock"
|
||||
Padding="12,4"
|
||||
HorizontalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}" />
|
||||
</Border>
|
||||
|
||||
<Rectangle
|
||||
Name="PART_FirstColumnDivider"
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
|
||||
<Border
|
||||
x:Name="PART_SecondPickerHost"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<TextBlock
|
||||
x:Name="PART_MinuteTextBlock"
|
||||
Padding="12,4"
|
||||
HorizontalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}" />
|
||||
</Border>
|
||||
|
||||
<Rectangle
|
||||
Name="PART_SecondColumnDivider"
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||
|
||||
<Border
|
||||
x:Name="PART_ThirdPickerHost"
|
||||
Grid.Column="4"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<TextBlock
|
||||
x:Name="PART_PeriodTextBlock"
|
||||
Padding="12,4"
|
||||
HorizontalAlignment="Center"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<PathIcon
|
||||
Name="PART_Icon"
|
||||
Grid.Column="1"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0,0,8,0"
|
||||
Data="{DynamicResource TimePickerIconGlyph}"
|
||||
Foreground="{DynamicResource DateTimePickerIconForeground}" />
|
||||
</Grid>
|
||||
|
||||
</Button>
|
||||
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementMode="Bottom"
|
||||
PlacementTarget="{TemplateBinding}"
|
||||
WindowManagerAddShadowHint="False">
|
||||
<TimePickerPresenter Name="PART_PickerPresenter" Width="{Binding $parent[TimePicker].Bounds.Width}" />
|
||||
</Popup>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:disabled /template/ PathIcon#PART_Icon">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonDisabledIconForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:hasnotime /template/ Button#PART_FlyoutButton TextBlock">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
50
src/Semi.Avalonia/Controls/TitleBar.axaml
Normal file
50
src/Semi.Avalonia/Controls/TitleBar.axaml
Normal file
@@ -0,0 +1,50 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type TitleBar}" TargetType="TitleBar">
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="Stretch">
|
||||
<Panel
|
||||
x:Name="PART_MouseTracker"
|
||||
Height="1"
|
||||
VerticalAlignment="Top" />
|
||||
<Panel x:Name="PART_Container">
|
||||
<Border
|
||||
x:Name="PART_Background"
|
||||
Background="{TemplateBinding Background}"
|
||||
IsHitTestVisible="False" />
|
||||
<CaptionButtons
|
||||
x:Name="PART_CaptionButtons"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Panel>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Border#PART_Background">
|
||||
<Setter Property="IsHitTestVisible" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_MouseTracker">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen /template/ Panel#PART_Container">
|
||||
<Setter Property="RenderTransform" Value="translateY(-50px)" />
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:fullscreen:pointerover /template/ Panel#PART_Container">
|
||||
<Setter Property="RenderTransform" Value="none" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
19
src/Semi.Avalonia/Controls/TransitioningContentControl.axaml
Normal file
19
src/Semi.Avalonia/Controls/TransitioningContentControl.axaml
Normal file
@@ -0,0 +1,19 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding CurrentContent}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -44,7 +44,6 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
@@ -139,7 +138,6 @@
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
IsVisible="{TemplateBinding IsExpanded}"
|
||||
Items="{TemplateBinding Items}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Version>0.1.0-preview1</Version>
|
||||
<Version>0.1.0-preview5</Version>
|
||||
<Title>Semi.Avalonia</Title>
|
||||
<Authors>IRIHI Technology</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<PackageReleaseNotes>Initial Release</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>Migrate to Avalonia lately nightly build.
|
||||
Please don't update if you are not using Avalonia latest nightly build. </PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
12
src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
Normal file
12
src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
Normal file
@@ -0,0 +1,12 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxDefaultBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxDefaultBackground" Color="Transparent" />
|
||||
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="#35363C" />
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<Thickness x:Key="AutoCompleteBoxPopupBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="AutoCompleteBoxPopupMargin">4</Thickness>
|
||||
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="AutoCompleteBoxBorderlessBackground" Opacity="0.05" Color="#E6E8EA" />
|
||||
</ResourceDictionary>
|
||||
12
src/Semi.Avalonia/Themes/Dark/Border.axaml
Normal file
12
src/Semi.Avalonia/Themes/Dark/Border.axaml
Normal file
@@ -0,0 +1,12 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="BorderCardBackground" Color="#232429" />
|
||||
<SolidColorBrush x:Key="BorderCardBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<CornerRadius x:Key="RadiusCardCornerRadius">4</CornerRadius>
|
||||
<Thickness x:Key="ThicknessCardPadding">20</Thickness>
|
||||
<Thickness x:Key="ThicknessCardMargin">4</Thickness>
|
||||
<Thickness x:Key="ThicknessCardBorderThickness">1</Thickness>
|
||||
<BoxShadows x:Key="BorderCardBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +1,85 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Color="Red"/>
|
||||
<SolidColorBrush x:Key="ButtonDefaultForeground" Color="White"/>
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="using:System">
|
||||
<!-- Add Resources Here -->
|
||||
<sys:Double x:Key="ButtonDefaultFontSize">14</sys:Double>
|
||||
<FontWeight x:Key="ButtonDefaultFontWeight">600</FontWeight>
|
||||
|
||||
<Thickness x:Key="ButtonDefaultPadding">12 6</Thickness>
|
||||
<Thickness x:Key="ButtonLargePadding">16 10</Thickness>
|
||||
<Thickness x:Key="ButtonSmallPadding">6 2</Thickness>
|
||||
|
||||
<Thickness x:Key="ButtonBorderThickness">1</Thickness>
|
||||
|
||||
<CornerRadius x:Key="ButtonCornerRadius">3</CornerRadius>
|
||||
|
||||
<!-- Light -->
|
||||
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Color="#2E3238" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultDisabledBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultPressedBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||
|
||||
<!-- end Light -->
|
||||
|
||||
<!-- Solid -->
|
||||
<SolidColorBrush x:Key="ButtonSolidForeground" Color="Black" />
|
||||
<SolidColorBrush x:Key="ButtonSolidDisabledForeground" Color="Gray" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBackground" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedBackground" Color="#A9D7FF" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryBackground" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryPointeroverBackground" Color="#6EC8F6" />
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryPressedBackground" Color="#9DDCF9" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryBackground" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBackground" Color="#A7ABB0" />
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBackground" Color="#C6CACD" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningBackground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBackground" Color="#FFC772" />
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningPressedBackground" Color="#FFDDA1" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerBackground" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBackground" Color="#FD9983" />
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBackground" Color="#FDBEAC" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="Gray" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedBorderBrush" Color="#A9D7FF" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryBorderBrush" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryPointeroverBorderBrush" Color="#6EC8F6" />
|
||||
<SolidColorBrush x:Key="ButtonSolidSecondaryPressedBorderBrush" Color="#9DDCF9" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryBorderBrush" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBorderBrush" Color="#A7ABB0" />
|
||||
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBorderBrush" Color="#C6CACD" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningBorderBrush" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBorderBrush" Color="#FFC772" />
|
||||
<SolidColorBrush x:Key="ButtonSolidWarningPressedBorderBrush" Color="#FFDDA1" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
|
||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
|
||||
|
||||
<SolidColorBrush x:Key="ButtonSolidDisabledBorderBrush" Color="Gray" />
|
||||
<!-- end Solid -->
|
||||
</ResourceDictionary>
|
||||
|
||||
15
src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml
Normal file
15
src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<PathGeometry x:Key="ButtonSpinnerIncreaseButtonGlyph">M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z</PathGeometry>
|
||||
<PathGeometry x:Key="ButtonSpinnerDecreaseButtonGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBackground" Color="#16161A" />
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonDisabledBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
|
||||
<CornerRadius x:Key="ButtonSpinnerButtonGroupCornerRadius">3</CornerRadius>
|
||||
<Thickness x:Key="ButtonSpinnerButtonGroupBorderThickness">1</Thickness>
|
||||
|
||||
</ResourceDictionary>
|
||||
50
src/Semi.Avalonia/Themes/Dark/Calendar.axaml
Normal file
50
src/Semi.Avalonia/Themes/Dark/Calendar.axaml
Normal file
@@ -0,0 +1,50 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="using:System">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="CalendarBackground" Color="#232429" />
|
||||
<SolidColorBrush x:Key="CalendarForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<Thickness x:Key="CalendarBorderThickness">1</Thickness>
|
||||
<CornerRadius x:Key="CalendarCornerRadius">6</CornerRadius>
|
||||
<GridLength x:Key="CalendarItemWeekDayNameHeight">40</GridLength>
|
||||
<SolidColorBrush x:Key="CalendarItemWeekDayNameForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<PathGeometry x:Key="CalendarItemPreviousIconGlyph">M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z</PathGeometry>
|
||||
<PathGeometry x:Key="CalendarItemNextIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonBackground" Color="#232429" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonBorderBrush" Color="Transparent" />
|
||||
<Thickness x:Key="CalendarItemCalendarButtonBorderThickness">0</Thickness>
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedForeground" Color="#232429" />
|
||||
<FontWeight x:Key="CalendarItemCalendarButtonSelectedFontWeight">600</FontWeight>
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonBlackoutForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarButtonInactiveForeground" Opacity="0.65" Color="#F9F9F9" />
|
||||
<CornerRadius x:Key="CalendarItemCalendarButtonCornerRadius">3</CornerRadius>
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBorderBrush" Color="Transparent" />
|
||||
<CornerRadius x:Key="CalendarItemCalendarDayButtonCornerRadius">3</CornerRadius>
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedForeground" Color="#232429" />
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBlackoutForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonInactiveForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
|
||||
<sys:Double x:Key="CalendarMinWidth">240</sys:Double>
|
||||
</ResourceDictionary>
|
||||
15
src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml
Normal file
15
src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- -->
|
||||
<SolidColorBrush x:Key="CalendarDatePickerIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="#F9F9F9" />
|
||||
<PathGeometry x:Key="CalendarDatePickerIconGlyph">M4 20V8H20V20H4ZM2 4C2 2.89543 2.89543 2 4 2H20C21.1046 2 22 2.89543 22 4V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V4ZM6 10.5C6 10.2239 6.22386 10 6.5 10H8.5C8.77614 10 9 10.2239 9 10.5V12.5C9 12.7761 8.77614 13 8.5 13H6.5C6.22386 13 6 12.7761 6 12.5V10.5ZM6.5 15C6.22386 15 6 15.2239 6 15.5V17.5C6 17.7761 6.22386 18 6.5 18H8.5C8.77614 18 9 17.7761 9 17.5V15.5C9 15.2239 8.77614 15 8.5 15H6.5ZM10.5 10.5C10.5 10.2239 10.7239 10 11 10H13C13.2761 10 13.5 10.2239 13.5 10.5V12.5C13.5 12.7761 13.2761 13 13 13H11C10.7239 13 10.5 12.7761 10.5 12.5V10.5ZM11 15C10.7239 15 10.5 15.2239 10.5 15.5V17.5C10.5 17.7761 10.7239 18 11 18H13C13.2761 18 13.5 17.7761 13.5 17.5V15.5C13.5 15.2239 13.2761 15 13 15H11ZM15 10.5C15 10.2239 15.2239 10 15.5 10H17.5C17.7761 10 18 10.2239 18 10.5V12.5C18 12.7761 17.7761 13 17.5 13H15.5C15.2239 13 15 12.7761 15 12.5V10.5ZM15.5 15C15.2239 15 15 15.2239 15 15.5V17.5C15 17.7761 15.2239 18 15.5 18H17.5C17.7761 18 18 17.7761 18 17.5V15.5C18 15.2239 17.7761 15 17.5 15H15.5Z</PathGeometry>
|
||||
<SolidColorBrush x:Key="CalendarDatePickerBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="CalendarDatePickerBorderBrush" Color="#41464C" />
|
||||
<Thickness x:Key="CalendarDatePickerBorderThickness">1</Thickness>
|
||||
<CornerRadius x:Key="CalendarDatePickerCornerRadius">3</CornerRadius>
|
||||
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="CalendarDatePickerDisabledBorderBrush" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />
|
||||
<BoxShadows x:Key="CalendarDatePickerPopupBoxShadows">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
</ResourceDictionary>
|
||||
14
src/Semi.Avalonia/Themes/Dark/CaptionButtons.axaml
Normal file
14
src/Semi.Avalonia/Themes/Dark/CaptionButtons.axaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<PathGeometry x:Key="WindowCloseIconGlyph">M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z</PathGeometry>
|
||||
<PathGeometry x:Key="WindowMaximizeGlyph">M4,4H20V20H4V4M6,8V18H18V8H6Z</PathGeometry>
|
||||
<PathGeometry x:Key="WindowMinimizeGlyph">M20,14H4V10H20</PathGeometry>
|
||||
<PathGeometry x:Key="WindowRestoreGlyph">M4,8H8V4H20V16H16V20H4V8M16,8V14H18V6H10V8H16M6,12V18H14V12H6Z</PathGeometry>
|
||||
<PathGeometry x:Key="WindowExpandGlyph">M10,21V19H6.41L10.91,14.5L9.5,13.09L5,17.59V14H3V21H10M14.5,10.91L19,6.41V10H21V3H14V5H17.59L13.09,9.5L14.5,10.91Z</PathGeometry>
|
||||
<PathGeometry x:Key="WindowCollapseGlyph">M19.5,3.09L15,7.59V4H13V11H20V9H16.41L20.91,4.5L19.5,3.09M4,13V15H7.59L3.09,19.5L4.5,20.91L9,16.41V20H11V13H4Z</PathGeometry>
|
||||
<SolidColorBrush x:Key="CaptionButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="CaptionButtonClosePointeroverBackground" Color="#FD9983" />
|
||||
<SolidColorBrush x:Key="CaptionButtonClosePressedBackground" Color="#FDBEAC" />
|
||||
<SolidColorBrush x:Key="CaptionButtonForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,38 +1,38 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="CheckboxForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CheckboxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="CheckboxForeground" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="CheckboxDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||
|
||||
<SolidColorBrush x:Key="CheckboxGlyphFill" Color="White" />
|
||||
<SolidColorBrush x:Key="CheckboxGlyphDisabledFill" Color="White" />
|
||||
<SolidColorBrush x:Key="CheckboxGlyphFill" Color="#16161A" />
|
||||
<SolidColorBrush x:Key="CheckboxGlyphDisabledFill" Color="#16161A" />
|
||||
|
||||
<SolidColorBrush x:Key="CheckboxDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="CheckboxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="CheckboxPointOverBackground" Opacity="0.05" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="CheckboxPointOverBorderBrush" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#004FB3" />
|
||||
<SolidColorBrush x:Key="CheckboxPressedBorderBrush" Color="#004FB3" />
|
||||
<SolidColorBrush x:Key="CheckboxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CheckboxPointOverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="CheckboxPointOverBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="CheckboxPressedBorderBrush" Color="#A9D7FF" />
|
||||
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDefaultBackground" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDefaultBorderBrush" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPointOverBackground" Color="#0062D6" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPointOverBorderBrush" Color="#0062D6" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPressedBackground" Color="#004FB3" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPressedBorderBrush" Color="#004FB3" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDefaultBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDefaultBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPointOverBackground" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPointOverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPressedBackground" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedPressedBorderBrush" Color="#A9D7FF" />
|
||||
|
||||
<SolidColorBrush x:Key="CheckboxDefaultDisabledBackground" Opacity="0.04" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="CheckboxDefaultDisabledBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDisabledBackground" Color="#98CDFD" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDisabledBorderBrush" Color="#98CDFD" />
|
||||
<SolidColorBrush x:Key="CheckboxDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="CheckboxDefaultDisabledBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDisabledBackground" Color="#135cb8" />
|
||||
<SolidColorBrush x:Key="CheckboxCheckedDisabledBorderBrush" Color="#135cb8" />
|
||||
|
||||
<sys:Double x:Key="CheckboxFontSize">14</sys:Double>
|
||||
<sys:Double x:Key="CheckboxBoxWidth">16</sys:Double>
|
||||
<sys:Double x:Key="CheckboxBoxHeight">16</sys:Double>
|
||||
<FontWeight x:Key="CheckboxFontWeight">400</FontWeight>
|
||||
|
||||
<CornerRadius x:Key="CornerRadius">3</CornerRadius>
|
||||
<CornerRadius x:Key="CheckboxBoxCornerRadius">3</CornerRadius>
|
||||
<Thickness x:Key="CheckboxContentMargin">8 0 0 0</Thickness>
|
||||
<Thickness x:Key="CheckboxBoxBorderThickness">1</Thickness>
|
||||
</ResourceDictionary>
|
||||
|
||||
40
src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
Normal file
40
src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorPointerOverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorPointerOverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ComboBoxSelectorPressedBorderBrush" Color="#A9D7FF" />
|
||||
|
||||
<CornerRadius x:Key="ComboBoxSelectorCornerRadius">3</CornerRadius>
|
||||
|
||||
<SolidColorBrush x:Key="ComboBoxIconDefaultForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ComboBoxIconPointerOverForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ComboBoxIconPressedForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ComboBoxIconDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="ComboBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
<Thickness x:Key="ComboBoxItemDefaultPadding">8 4</Thickness>
|
||||
<Thickness x:Key="ComboBoxSelectorDefaultPadding">8 0</Thickness>
|
||||
|
||||
<BoxShadows x:Key="ComboBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<SolidColorBrush x:Key="ComboBoxPopupBackground" Color="#35363C" />
|
||||
<SolidColorBrush x:Key="ComboBoxPopupBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<Thickness x:Key="ComboBoxPopupBorderThickness">1</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ComboBoxItemPointerOverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Color="#053170" />
|
||||
<SolidColorBrush x:Key="ComboBoxItemSelectedPointerOverBackground" Color="#0A4694" />
|
||||
|
||||
<SolidColorBrush x:Key="ComboBoxItemDisabledBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||
<PathGeometry x:Key="ComboBoxIcon">
|
||||
M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z
|
||||
</PathGeometry>
|
||||
</ResourceDictionary>
|
||||
@@ -3,8 +3,42 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Button.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Calendar.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/CaptionButtons.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/CheckBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ComboBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DatePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropdownButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ListBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ManagedFileChooser.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Menu.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/NotificationCard.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/NumericUpDown.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ProgressBar.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/RadioButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ScrollViewer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Slider.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/SplitButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/SplitView.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TabControl.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TabItem.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TextBlock.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TextBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TimePicker.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ToggleButton.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Tooltip.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/TreeView.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Window.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Flyout.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
4
src/Semi.Avalonia/Themes/Dark/DatePicker.axaml
Normal file
4
src/Semi.Avalonia/Themes/Dark/DatePicker.axaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<PathGeometry x:Key="DatePickerIconGlyph">M4 20V8H20V20H4ZM2 4C2 2.89543 2.89543 2 4 2H20C21.1046 2 22 2.89543 22 4V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V4ZM6 10.5C6 10.2239 6.22386 10 6.5 10H8.5C8.77614 10 9 10.2239 9 10.5V12.5C9 12.7761 8.77614 13 8.5 13H6.5C6.22386 13 6 12.7761 6 12.5V10.5ZM6.5 15C6.22386 15 6 15.2239 6 15.5V17.5C6 17.7761 6.22386 18 6.5 18H8.5C8.77614 18 9 17.7761 9 17.5V15.5C9 15.2239 8.77614 15 8.5 15H6.5ZM10.5 10.5C10.5 10.2239 10.7239 10 11 10H13C13.2761 10 13.5 10.2239 13.5 10.5V12.5C13.5 12.7761 13.2761 13 13 13H11C10.7239 13 10.5 12.7761 10.5 12.5V10.5ZM11 15C10.7239 15 10.5 15.2239 10.5 15.5V17.5C10.5 17.7761 10.7239 18 11 18H13C13.2761 18 13.5 17.7761 13.5 17.5V15.5C13.5 15.2239 13.2761 15 13 15H11ZM15 10.5C15 10.2239 15.2239 10 15.5 10H17.5C17.7761 10 18 10.2239 18 10.5V12.5C18 12.7761 17.7761 13 17.5 13H15.5C15.2239 13 15 12.7761 15 12.5V10.5ZM15.5 15C15.2239 15 15 15.2239 15 15.5V17.5C15 17.7761 15.2239 18 15.5 18H17.5C17.7761 18 18 17.7761 18 17.5V15.5C18 15.2239 17.7761 15 17.5 15H15.5Z</PathGeometry>
|
||||
</ResourceDictionary>
|
||||
42
src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
Normal file
42
src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
Normal file
@@ -0,0 +1,42 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="DateTimePickerListItemBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DateTimePickerPopupBackground" Color="#35363C" />
|
||||
<Thickness x:Key="DateTimePickerListItemPadding">0 3 0 6</Thickness>
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPointeroverForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPressedForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPressedBackground" Opacity="0.20" Color="White" />
|
||||
|
||||
<PathGeometry x:Key="DateTimePickerButtonUpGlyph">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</PathGeometry>
|
||||
<PathGeometry x:Key="DateTimePickerButtonDownGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</PathGeometry>
|
||||
<PathGeometry x:Key="DateTimePickerAcceptGlyph">M17.4111 7.30848C18.0692 7.81171 18.1947 8.75312 17.6915 9.41119L11.1915 17.9112C10.909 18.2806 10.4711 18.4981 10.0061 18.5C9.54105 18.5019 9.10143 18.288 8.81592 17.9209L5.31592 13.4209C4.80731 12.767 4.92512 11.8246 5.57904 11.316C6.23296 10.8074 7.17537 10.9252 7.68398 11.5791L9.98988 14.5438L15.3084 7.58884C15.8116 6.93077 16.7531 6.80525 17.4111 7.30848Z</PathGeometry>
|
||||
<PathGeometry x:Key="DateTimePickerDismissGlyph">M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z</PathGeometry>
|
||||
|
||||
<SolidColorBrush x:Key="DateTimePickerSeparatorBackground" Opacity="0.08" Color="#F9F9F9" />
|
||||
<sys:Double x:Key="DateTimePickerListBoxItemHeight">28</sys:Double>
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="DateTimePickerIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="DateTimePickerEmptyForeground" Opacity="0.5" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonPointeroverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBorderBrush" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBackground" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />
|
||||
|
||||
<BoxShadows x:Key="DateTimePickerFlyoutBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<Thickness x:Key="DateTimePickerFlyoutPadding">16 0</Thickness>
|
||||
<Thickness x:Key="DateTimePickerFlyoutBorderMargin">8</Thickness>
|
||||
|
||||
</ResourceDictionary>
|
||||
4
src/Semi.Avalonia/Themes/Dark/DropdownButton.axaml
Normal file
4
src/Semi.Avalonia/Themes/Dark/DropdownButton.axaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<PathGeometry x:Key="DropdownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
|
||||
</ResourceDictionary>
|
||||
27
src/Semi.Avalonia/Themes/Dark/Expander.axaml
Normal file
27
src/Semi.Avalonia/Themes/Dark/Expander.axaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="ExpanderSeparatorBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ExpanderHeaderForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ExpanderHeaderDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ExpanderIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ExpanderHeaderDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ExpanderHeaderHoverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ExpanderHeaderPressedBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ExpanderContentForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
|
||||
<FontWeight x:Key="ExpanderHeaderFontWeight">600</FontWeight>
|
||||
<sys:Double x:Key="ExpanderIconSize">8</sys:Double>
|
||||
|
||||
<CornerRadius x:Key="ExpanderHeaderCornerRadius">3</CornerRadius>
|
||||
<Thickness x:Key="ExpanderHeaderMargin">8 4</Thickness>
|
||||
<Thickness x:Key="ExpanderHeaderPadding">8</Thickness>
|
||||
<Thickness x:Key="ExpanderEndIconMargin">0 0 8 0</Thickness>
|
||||
<Thickness x:Key="ExpanderContentMargin">16 4 16 8</Thickness>
|
||||
<Thickness x:Key="ExpanderFrontIconMargin">8 0 0 0</Thickness>
|
||||
<Thickness x:Key="ExpanderDownContentBorderThickness">0 0 0 1</Thickness>
|
||||
<Thickness x:Key="ExpanderUpContentBorderThickness">0 1 0 0</Thickness>
|
||||
<Thickness x:Key="ExpanderLeftContentBorderThickness">1 0 0 0</Thickness>
|
||||
<Thickness x:Key="ExpanderRightContentBorderThickness">0 0 1 0</Thickness>
|
||||
</ResourceDictionary>
|
||||
18
src/Semi.Avalonia/Themes/Dark/Flyout.axaml
Normal file
18
src/Semi.Avalonia/Themes/Dark/Flyout.axaml
Normal file
@@ -0,0 +1,18 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="FlyoutBackground" Color="#35363C" />
|
||||
<SolidColorBrush x:Key="FlyoutForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="FlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<FontWeight x:Key="FlyoutFontWeight">400</FontWeight>
|
||||
<Thickness x:Key="FlyoutBorderThickness">1</Thickness>
|
||||
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<sys:Double x:Key="FlyoutMinHeight">100</sys:Double>
|
||||
<sys:Double x:Key="FlyoutMinWidth">100</sys:Double>
|
||||
<sys:Double x:Key="FlyoutMaxHeight">600</sys:Double>
|
||||
<sys:Double x:Key="FlyoutMaxWidth">600</sys:Double>
|
||||
<CornerRadius x:Key="FlyoutCornerRadius">6</CornerRadius>
|
||||
<Thickness x:Key="FlyoutPadding">8</Thickness>
|
||||
|
||||
</ResourceDictionary>
|
||||
5
src/Semi.Avalonia/Themes/Dark/GridSplitter.axaml
Normal file
5
src/Semi.Avalonia/Themes/Dark/GridSplitter.axaml
Normal file
@@ -0,0 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="GridSplitterBackground" Opacity="0.4" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="GridSplitterPreviewBackground" Color="#0A4694" />
|
||||
</ResourceDictionary>
|
||||
109
src/Semi.Avalonia/Themes/Dark/Label.axaml
Normal file
109
src/Semi.Avalonia/Themes/Dark/Label.axaml
Normal file
@@ -0,0 +1,109 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Typography related resources are combined with TextBlock -->
|
||||
|
||||
<Thickness x:Key="LabelTagBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="LabelTagSmallPadding">8 2</Thickness>
|
||||
<Thickness x:Key="LabelTagLargePadding">8 4</Thickness>
|
||||
<sys:Double x:Key="LabelTagSmallHeight">20</sys:Double>
|
||||
<sys:Double x:Key="LabelTagLargeHeight">24</sys:Double>
|
||||
<sys:Double x:Key="LabelTagFontSize">12</sys:Double>
|
||||
<CornerRadius x:Key="LabelTagSquareCornerRadius">3</CornerRadius>
|
||||
<CornerRadius x:Key="LabelTagCircleCornerRadius">9999</CornerRadius>
|
||||
|
||||
<SolidColorBrush x:Key="LabelTagLightAmberForeground" Color="#FCF6D2" />
|
||||
<SolidColorBrush x:Key="LabelTagLightAmberBackground" Opacity="0.15" Color="#F5CA50" />
|
||||
<SolidColorBrush x:Key="LabelTagLightBlueForeground" Color="#D4ECFF" />
|
||||
<SolidColorBrush x:Key="LabelTagLightBlueBackground" Opacity="0.15" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="LabelTagLightCyanForeground" Color="#C6EFF1" />
|
||||
<SolidColorBrush x:Key="LabelTagLightCyanBackground" Opacity="0.15" Color="#38BBC6" />
|
||||
<SolidColorBrush x:Key="LabelTagLightGreenForeground" Color="#D0F0D1" />
|
||||
<SolidColorBrush x:Key="LabelTagLightGreenBackground" Opacity="0.15" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="LabelTagLightGreyForeground" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="LabelTagLightGreyBackground" Opacity="0.15" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="LabelTagLightIndigoForeground" Color="#D1D8F1" />
|
||||
<SolidColorBrush x:Key="LabelTagLightIndigoBackground" Opacity="0.15" Color="#5F71C5" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLightBlueForeground" Color="#CEEEFC" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#E4F1D1" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#97C65F" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#AEDC3A" />
|
||||
<SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#E5F6C9" />
|
||||
<SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#FFEFD0" />
|
||||
<SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#FBD3DC" />
|
||||
<SolidColorBrush x:Key="LabelTagLightPinkBackground" Opacity="0.15" Color="#EF5686" />
|
||||
<SolidColorBrush x:Key="LabelTagLightPurpleForeground" Color="#EFCEF0" />
|
||||
<SolidColorBrush x:Key="LabelTagLightPurpleBackground" Opacity="0.15" Color="#B553C2" />
|
||||
<SolidColorBrush x:Key="LabelTagLightRedForeground" Color="#FEE0D5" />
|
||||
<SolidColorBrush x:Key="LabelTagLightRedBackground" Opacity="0.15" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="LabelTagLightTealForeground" Color="#C4F0E8" />
|
||||
<SolidColorBrush x:Key="LabelTagLightTealBackground" Opacity="0.15" Color="#33C2B0" />
|
||||
<SolidColorBrush x:Key="LabelTagLightVioletForeground" Color="#8865D4" />
|
||||
<SolidColorBrush x:Key="LabelTagLightVioletBackground" Opacity="0.15" Color="#DDD4F4" />
|
||||
<SolidColorBrush x:Key="LabelTagLightYellowForeground" Color="#FEFBD0" />
|
||||
<SolidColorBrush x:Key="LabelTagLightYellowBackground" Opacity="0.15" Color="#FDDE43" />
|
||||
<SolidColorBrush x:Key="LabelTagLightWhiteForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="LabelTagLightWhiteBackground" Opacity="0.15" Color="#000000" />
|
||||
<SolidColorBrush x:Key="LabelTagLightWhiteBorderBrush" Color="#41464C" />
|
||||
|
||||
<SolidColorBrush x:Key="LabelTagGhostAmberBorderBrush" Color="#F2B726" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostAmberForeground" Color="#F5CA50" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostBlueBorderBrush" Color="#2990FF" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostBlueForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostCyanBorderBrush" Color="#13A8B8" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostCyanForeground" Color="#38BBC6" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostGreenBorderBrush" Color="#3EB349" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostGreenForeground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostGreyBorderBrush" Color="#6B7075" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostGreyForeground" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostIndigoBorderBrush" Color="#4053B7" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostIndigoForeground" Color="#5F71C5" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLightBlueBorderBrush" Color="#139FF0" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLightBlueForeground" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLightGreenBorderBrush" Color="#7FB840" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLightGreenForeground" Color="#97C65F" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLimeBorderBrush" Color="#A2D311" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostLimeForeground" Color="#AEDC3A" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostOrangeBorderBrush" Color="#FF9214" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostOrangeForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostPinkBorderBrush" Color="#EB2F71" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostPinkForeground" Color="#EF5686" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostPurpleBorderBrush" Color="#A033B3" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostPurpleForeground" Color="#B553C2" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostRedBorderBrush" Color="#FB4932" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostRedForeground" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostTealBorderBrush" Color="#0EB3A1" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostTealForeground" Color="#33C2B0" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostVioletBorderBrush" Color="#7246C9" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostVioletForeground" Color="#8865D4" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostYellowBorderBrush" Color="#FCCE14" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostYellowForeground" Color="#FDDE43" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostWhiteBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="LabelTagGhostWhiteForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="LabelTagSolidForeground" Color="#000000" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidAmberBackground" Color="#F5CA50" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidBlueBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidCyanBackground" Color="#38BBC6" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidGreenBackground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidGreyBackground" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidIndigoBackground" Color="#5F71C5" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidLightBlueBackground" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidLightGreenBackground" Color="#97C65F" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidLimeBackground" Color="#AEDC3A" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidOrangeBackground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidPinkBackground" Color="#EF5686" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidPurpleBackground" Color="#B553C2" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidRedBackground" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidTealBackground" Color="#33C2B0" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidVioletBackground" Color="#8865D4" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidYellowBackground" Color="#FDDE43" />
|
||||
|
||||
<SolidColorBrush x:Key="LabelTagSolidWhiteBackground" Color="#000000" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidWhiteBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="LabelTagSolidWhiteForeground" Color="#F9F9F9" />
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
19
src/Semi.Avalonia/Themes/Dark/ListBox.axaml
Normal file
19
src/Semi.Avalonia/Themes/Dark/ListBox.axaml
Normal file
@@ -0,0 +1,19 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Thickness x:Key="ListBoxItemDefaultPadding">8 4</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="ListBoxItemDefaultForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ListBoxItemIconDefaultForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ListBoxItemIconHoverForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ListBoxItemPointerOverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Color="#053170" />
|
||||
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Color="#0A4694" />
|
||||
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||
<CornerRadius x:Key="ListBoxItemCornerRadius">3</CornerRadius>
|
||||
|
||||
</ResourceDictionary>
|
||||
7
src/Semi.Avalonia/Themes/Dark/ManagedFileChooser.axaml
Normal file
7
src/Semi.Avalonia/Themes/Dark/ManagedFileChooser.axaml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="ManagedFileChooserIconForeground" Opacity="0.65" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ManagedFileChooserTextForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ManagedFileChooserSeparatorBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<PathGeometry x:Key="ManagedFileChooserUpButtonGlyph">M20 18V20H13.5C9.91 20 7 17.09 7 13.5V7.83L3.91 10.92L2.5 9.5L8 4L13.5 9.5L12.09 10.91L9 7.83V13.5C9 16 11 18 13.5 18H20Z</PathGeometry>
|
||||
</ResourceDictionary>
|
||||
46
src/Semi.Avalonia/Themes/Dark/Menu.axaml
Normal file
46
src/Semi.Avalonia/Themes/Dark/Menu.axaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<PathGeometry x:Key="MenuScrollViewerUpButtonGlyph">M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z</PathGeometry>
|
||||
<PathGeometry x:Key="MenuScrollViewerDownButtonGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
|
||||
<PathGeometry x:Key="MenuItemExpandIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
||||
<SolidColorBrush x:Key="MenuFlyoutScrollViewerIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
|
||||
<!-- MenuFlyout -->
|
||||
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" />
|
||||
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="MenuFlyoutPadding">0 4</Thickness>
|
||||
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
|
||||
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
||||
<sys:Double x:Key="MenuFlyoutMinWidth">100</sys:Double>
|
||||
<sys:Double x:Key="MenuFlyoutMaxHeight">400</sys:Double>
|
||||
<sys:Double x:Key="MenuFlyoutMaxWidth">600</sys:Double>
|
||||
|
||||
<!-- MenuItem -->
|
||||
<SolidColorBrush x:Key="MenuItemBackground" Color="#35363C" />
|
||||
<SolidColorBrush x:Key="MenuItemForeground" Color="#F9F9F9" />
|
||||
<Thickness x:Key="MenuItemPadding">16 8</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="MenuItemSeparatorBackground" Opacity="0.08" Color="#F9F9F9" />
|
||||
<sys:Double x:Key="MenuItemSeparatorHeight">1</sys:Double>
|
||||
<Thickness x:Key="MenuItemSeparatorMargin">2</Thickness>
|
||||
<SolidColorBrush x:Key="MenuItemPointeroverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="MenuItemPressedBackground" Opacity="0.16" Color="White" />
|
||||
|
||||
<Thickness x:Key="MenuItemIconMargin">0 0 12 0</Thickness>
|
||||
<Thickness x:Key="MenuItemInputGestureTextMargin">4 0</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="MenuItemInputGestureTextForeground" Color="Gray" />
|
||||
<SolidColorBrush x:Key="MenuItemExpandIconForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<Thickness x:Key="MenuItemExpandIconMargin">4 0</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="MenuItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="MenuItemDisabledInputGestureTextForeground" Opacity="0.2" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="MenuItemDisabledExpandIconForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
</ResourceDictionary>
|
||||
20
src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
Normal file
20
src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="NotificationCardForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="NotificationCardBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="NotificationCardBackground" Color="#43444A" />
|
||||
<SolidColorBrush x:Key="NotificationCardInformationIconForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" />
|
||||
<sys:Double x:Key="NotificationCardWidth">320</sys:Double>
|
||||
<Thickness x:Key="NotificationCardBorderThickness">1</Thickness>
|
||||
<CornerRadius x:Key="NotificationCardCornerRadius">6</CornerRadius>
|
||||
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||
<Geometry x:Key="NotificationCardInformationIconPathData">M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z</Geometry>
|
||||
<Geometry x:Key="NotificationCardSuccessIconPathData">M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z</Geometry>
|
||||
<Geometry x:Key="NotificationCardWarningIconPathData">M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z</Geometry>
|
||||
<Geometry x:Key="NotificationCardErrorIconPathData">M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z</Geometry>
|
||||
</ResourceDictionary>
|
||||
3
src/Semi.Avalonia/Themes/Dark/NumericUpDown.axaml
Normal file
3
src/Semi.Avalonia/Themes/Dark/NumericUpDown.axaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
</ResourceDictionary>
|
||||
13
src/Semi.Avalonia/Themes/Dark/ProgressBar.axaml
Normal file
13
src/Semi.Avalonia/Themes/Dark/ProgressBar.axaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="ProgressBarIndicatorBrush" Color="#54A9FF" />
|
||||
<CornerRadius x:Key="ProgressBarBackgroundCornerRadius">3</CornerRadius>
|
||||
<SolidColorBrush x:Key="ProgressBarBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ProgressBarTextForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ProgressBarOuterTextForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
|
||||
<FontWeight x:Key="ProgressBarTextFontWeight">600</FontWeight>
|
||||
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />
|
||||
</ResourceDictionary>
|
||||
69
src/Semi.Avalonia/Themes/Dark/RadioButton.axaml
Normal file
69
src/Semi.Avalonia/Themes/Dark/RadioButton.axaml
Normal file
@@ -0,0 +1,69 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<sys:Double x:Key="RadioButtonIconRadius">16</sys:Double>
|
||||
<sys:Double x:Key="RadioButtonGlyphRadius">6</sys:Double>
|
||||
<sys:Double x:Key="RadioButtonFontSize">14</sys:Double>
|
||||
<Thickness x:Key="RadioButtonIconMargin">0 2 8 0</Thickness>
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconPointOverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconPressedBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconPointOverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconPressedBorderBrush" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconDefaultBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconPointOverBackground" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconPressedBackground" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconDisabledBackground" Color="#135cb8" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconDefaultBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconPointOverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconPressedBorderBrush" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCheckIconDisabledBorderBrush" Color="#135cb8" />
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonCheckGlyphFill" Color="#16161A" />
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonGroupBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<CornerRadius x:Key="RadioButtonGroupCornerRadius">3</CornerRadius>
|
||||
<CornerRadius x:Key="RadioButtonButtonCornerRadius">3</CornerRadius>
|
||||
|
||||
<FontWeight x:Key="RadioButtonButtonFontWeight">600</FontWeight>
|
||||
<Thickness x:Key="RadioButtonButtonSmallPadding">16 2</Thickness>
|
||||
<Thickness x:Key="RadioButtonButtonDefaultPadding">16 4</Thickness>
|
||||
<Thickness x:Key="RadioButtonButtonLargePadding">24 6</Thickness>
|
||||
|
||||
<sys:Double x:Key="RadioButtonButtonSmallFontSize">12</sys:Double>
|
||||
<sys:Double x:Key="RadioButtonButtonDefaultFontSize">12</sys:Double>
|
||||
<sys:Double x:Key="RadioButtonButtonLargeFontSize">14</sys:Double>
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="RadioButtonButtonUncheckedForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="RadioButtonButtonCheckedBackground" Color="#43444A" />
|
||||
|
||||
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="RadioButtonCardDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardDefaultBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardCheckedBackground" Color="#053170" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardCheckDefaultBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardCheckPointOverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardCheckPressedBorderBrush" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardCheckDisabledBorderBrush" Color="#135cb8" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardUncheckPointOverBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardUncheckPressedBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="RadioButtonCardUncheckDisabledBackground" Opacity="0.12" Color="White" />
|
||||
|
||||
<CornerRadius x:Key="RadioButtonCardCornerRadius">3</CornerRadius>
|
||||
|
||||
</ResourceDictionary>
|
||||
12
src/Semi.Avalonia/Themes/Dark/ScrollViewer.axaml
Normal file
12
src/Semi.Avalonia/Themes/Dark/ScrollViewer.axaml
Normal file
@@ -0,0 +1,12 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<sys:Double x:Key="ScrollBarThickness">12</sys:Double>
|
||||
<sys:Double x:Key="ScrollBarThumbThickness">8</sys:Double>
|
||||
<SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ScrollBarButtonPointerOverForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ScrollBarBackground" Opacity="0.12" Color="White" />
|
||||
</ResourceDictionary>
|
||||
28
src/Semi.Avalonia/Themes/Dark/Slider.axaml
Normal file
28
src/Semi.Avalonia/Themes/Dark/Slider.axaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="SliderTrackForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="SliderTrackBackground" Opacity="0.12" Color="White" />
|
||||
<sys:Double x:Key="SliderTrackWidth">4</sys:Double>
|
||||
<CornerRadius x:Key="SliderTrackCornerRadius">3</CornerRadius>
|
||||
<sys:Double x:Key="SliderThumbWidth">16</sys:Double>
|
||||
<sys:Double x:Key="SliderThumbHeight">16</sys:Double>
|
||||
<CornerRadius x:Key="SliderThumbCornerRadius">24</CornerRadius>
|
||||
<Thickness x:Key="SliderBorderThickness">0</Thickness>
|
||||
<BoxShadows x:Key="SliderThumbBoxShadow">0 0 1 1 #1AFFFFFF</BoxShadows>
|
||||
|
||||
<sys:Double x:Key="SliderTickHorizontalHeight">4</sys:Double>
|
||||
<sys:Double x:Key="SliderTickVerticalWidth">4</sys:Double>
|
||||
<SolidColorBrush x:Key="SliderTickForeground" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="SliderThumbBackground" Color="White" />
|
||||
<SolidColorBrush x:Key="SliderThumbBorderBrush" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="SliderThumbPointeroverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="SliderThumbPressedBorderBrush" Color="#A9D7FF" />
|
||||
<Thickness x:Key="SliderThumbBorderThickness">2</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="SliderTrackDisabledForeground" Color="#0A4694" />
|
||||
<SolidColorBrush x:Key="SliderThumbDisabledBorderBrush" Color="#0A4694" />
|
||||
<SolidColorBrush x:Key="SliderTrackDisabledBackground" Color="#1C1F23" />
|
||||
</ResourceDictionary>
|
||||
8
src/Semi.Avalonia/Themes/Dark/SplitButton.axaml
Normal file
8
src/Semi.Avalonia/Themes/Dark/SplitButton.axaml
Normal file
@@ -0,0 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<!-- Add Resources Here -->
|
||||
<PathGeometry x:Key="SplitButtonIconGlyph">M20.5598 9.65618L12.7546 18.6322C12.3559 19.0906 11.644 19.0906 11.2453 18.6322L3.4401 9.65618C2.8773 9.00895 3.33701 8 4.19471 8L19.8052 8C20.6629 8 21.1226 9.00895 20.5598 9.65618Z</PathGeometry>
|
||||
<sys:Double x:Key="SplitButtonSeparatorWidth">1</sys:Double>
|
||||
</ResourceDictionary>
|
||||
13
src/Semi.Avalonia/Themes/Dark/SplitView.axaml
Normal file
13
src/Semi.Avalonia/Themes/Dark/SplitView.axaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="using:System">
|
||||
<!-- Add Resources Here -->
|
||||
<x:Double x:Key="SplitViewOpenPaneThemeLength">320</x:Double>
|
||||
<x:Double x:Key="SplitViewCompactPaneThemeLength">48</x:Double>
|
||||
<sys:TimeSpan x:Key="SplitViewPaneAnimationOpenDuration">00:00:00.2</sys:TimeSpan>
|
||||
<sys:TimeSpan x:Key="SplitViewPaneAnimationCloseDuration">00:00:00.1</sys:TimeSpan>
|
||||
<Easing x:Key="SplitViewPaneAnimationEasing">0.1,0.9,0.2,1.0</Easing>
|
||||
<SolidColorBrush x:Key="SplitViewSeparatorBackground" Opacity="0.08" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="SplitViewPaneBackground" Color="Black" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,3 +1,15 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="TabItemLinePipeBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TabItemLinePipeSelectedBackground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="TabItemLinePipePointeroverBorderBrush" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="TabItemLinePipePressedBorderBrush" Opacity="0.20" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="TabItemLineHeaderForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TabItemLineHeaderPointeroverForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TabItemLineHeaderSelectedForeground" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="TabItemLineHeaderBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TabItemLineHeaderPointeroverBackground" Color="Transparent" />
|
||||
<FontWeight x:Key="TabItemSelectedFontWeight">600</FontWeight>
|
||||
</ResourceDictionary>
|
||||
|
||||
42
src/Semi.Avalonia/Themes/Dark/TextBlock.axaml
Normal file
42
src/Semi.Avalonia/Themes/Dark/TextBlock.axaml
Normal file
@@ -0,0 +1,42 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="TextBlockDefaultForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockSecondaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockTertiaryForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockQuaternaryForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
|
||||
<SolidColorBrush x:Key="TextBlockSuccessForeground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#053170" />
|
||||
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#E6E8EA" />
|
||||
|
||||
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#54A9FF" />
|
||||
|
||||
<sys:Double x:Key="TextBlockCodeFontSize">12</sys:Double>
|
||||
|
||||
<sys:Double x:Key="TextBlockFontSize">14</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH1FontSize">32</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH2FontSize">28</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH3FontSize">24</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH4FontSize">20</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH5FontSize">18</sys:Double>
|
||||
<sys:Double x:Key="TextBlockTitleH6FontSize">16</sys:Double>
|
||||
<FontWeight x:Key="TextBlockFontWeight">400</FontWeight>
|
||||
<FontWeight x:Key="TextBlockTitleFontWeight">600</FontWeight>
|
||||
<FontWeight x:Key="TextBlockLinkFontWeight">600</FontWeight>
|
||||
<FontWeight x:Key="TextBlockStrongFontWeight">600</FontWeight>
|
||||
|
||||
<Thickness x:Key="TextBlockTitleH1Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockTitleH2Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockTitleH3Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockTitleH4Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockTitleH5Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockTitleH6Margin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockParagraphMargin">0</Thickness>
|
||||
<Thickness x:Key="TextBlockCodeBorder">1</Thickness>
|
||||
<CornerRadius x:Key="TextBlockCodeCornerRadius">2</CornerRadius>
|
||||
</ResourceDictionary>
|
||||
55
src/Semi.Avalonia/Themes/Dark/TextBox.axaml
Normal file
55
src/Semi.Avalonia/Themes/Dark/TextBox.axaml
Normal file
@@ -0,0 +1,55 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||
<SolidColorBrush x:Key="TextBoxTextCaretBrush" Color="White" />
|
||||
|
||||
<SolidColorBrush x:Key="TextBoxDefaultBorderBrush" Color="#41464C" />
|
||||
<SolidColorBrush x:Key="TextBoxDefaultBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TextBoxFocusBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="TextBoxPointerOverBorderBrush" Color="#7FC1FF" />
|
||||
<SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#A9D7FF" />
|
||||
<SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBoxWatermarkForeground" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBoxInnerForeground" Opacity="0.62" Color="#F9F9F9" />
|
||||
|
||||
<SolidColorBrush x:Key="TextBoxButtonDefaultForeground" Opacity="0.2" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="TextBoxButtonPointerOverForeground" Opacity="0.4" Color="#E6E8EA" />
|
||||
|
||||
<SolidColorBrush x:Key="TextBoxDisabledBackground" Opacity="0.04" Color="#403238" />
|
||||
<SolidColorBrush x:Key="TextBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="TextBoxDisabledBorderBrush" Color="#2E3238" />
|
||||
|
||||
<SolidColorBrush x:Key="TextBoxBorderlessDefaultBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="TextBoxBorderlessDefaultBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TextBoxBorderlessPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="TextBoxBorderlessPointeroverBorderBrush" Color="Transparent" />
|
||||
|
||||
<sys:Double x:Key="TextBoxDefaultHeight">30</sys:Double>
|
||||
<sys:Double x:Key="TextBoxSmallHeight">22</sys:Double>
|
||||
<sys:Double x:Key="TextBoxLargeHeight">38</sys:Double>
|
||||
<sys:Double x:Key="TextBoxWrapperDefaultHeight">32</sys:Double>
|
||||
<sys:Double x:Key="TextBoxWrapperSmallHeight">24</sys:Double>
|
||||
<sys:Double x:Key="TextBoxWrapperLargeHeight">40</sys:Double>
|
||||
|
||||
<CornerRadius x:Key="TextBoxDefaultCornerRadius">3</CornerRadius>
|
||||
|
||||
<CornerRadius x:Key="TextBoxPrefixCornerRadius">3 0 0 3</CornerRadius>
|
||||
<CornerRadius x:Key="TextBoxSuffixCornerRadius">0 3 3 0</CornerRadius>
|
||||
<CornerRadius x:Key="TextBoxSuffixContentCornerRadius">3 0 0 3</CornerRadius>
|
||||
<CornerRadius x:Key="TextBoxPrefixContentCornerRadius">0 3 3 0</CornerRadius>
|
||||
<CornerRadius x:Key="TextBoxBothContentCornerRadius">0 0 0 0</CornerRadius>
|
||||
|
||||
<Thickness x:Key="TextBoxInnerLeftContentPadding">0 0 8 0</Thickness>
|
||||
<Thickness x:Key="TextBoxInnerRightContentPadding">8 0 0 0</Thickness>
|
||||
<Thickness x:Key="TextBoxContentPadding">8 0</Thickness>
|
||||
<Thickness x:Key="TextBoxBorderThickness">1</Thickness>
|
||||
|
||||
<SolidColorBrush x:Key="TextBoxSelectionBackground" Color="#0059D6" />
|
||||
<SolidColorBrush x:Key="TextBoxSelectionForeground" Color="White" />
|
||||
|
||||
<StreamGeometry x:Key="TextBoxClearButtonData">M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.0352 16.8626C16.4597 17.4585 15.5101 17.4751 14.9142 16.8996L12.0368 14.121L9.25822 16.9984C8.68274 17.5943 7.73314 17.6109 7.13722 17.0354C6.5413 16.4599 6.52472 15.5103 7.1002 14.9144L9.87883 12.037L7.00147 9.2584C6.40555 8.68293 6.38897 7.73332 6.96445 7.1374C7.53992 6.54148 8.48953 6.52491 9.08545 7.10038L11.9628 9.87901L14.7414 7.00165C15.3169 6.40573 16.2665 6.38916 16.8624 6.96463C17.4584 7.54011 17.4749 8.48971 16.8995 9.08563L14.1208 11.963L16.9982 14.7416C17.5941 15.3171 17.6107 16.2667 17.0352 16.8626Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="PasswordBoxRevealButtonData">M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="PasswordBoxHideButtonData">M2.02949 4.67856C2.7593 4.28654 3.66871 4.56038 4.06073 5.29018C6.21313 9.29726 8.83179 11.5 12.0001 11.5C15.1685 11.5 17.7871 9.29726 19.9395 5.29018C20.3315 4.56038 21.241 4.28655 21.9708 4.67856C22.7006 5.07058 22.9744 5.97999 22.5824 6.7098C21.9049 7.97104 21.1385 9.15419 20.2743 10.199L23.2001 14.1C23.6971 14.7627 23.5628 15.7029 22.9001 16.2C22.2373 16.697 21.2971 16.5627 20.8001 15.9L18.1186 12.3246C17.448 12.8501 16.7322 13.2957 15.9687 13.6441L17.4046 17.4733C17.6955 18.249 17.3025 19.1136 16.5268 19.4045C15.7511 19.6954 14.8865 19.3024 14.5956 18.5267L13.0956 14.5267C13.0852 14.4988 13.0756 14.4709 13.0669 14.4428C12.7193 14.4806 12.3638 14.5 12.0001 14.5C11.6365 14.5 11.281 14.4806 10.9333 14.4428C10.9246 14.4709 10.9151 14.4988 10.9046 14.5267L9.40463 18.5267C9.11375 19.3024 8.24913 19.6954 7.47345 19.4045C6.69777 19.1136 6.30476 18.249 6.59564 17.4733L8.03159 13.6441C7.26806 13.2957 6.55223 12.8501 5.88163 12.3246L3.20009 15.9C2.70303 16.5627 1.76283 16.697 1.10009 16.2C0.437347 15.7029 0.303032 14.7627 0.800088 14.1L3.72589 10.1989C2.86177 9.15415 2.09533 7.97101 1.41787 6.70979C1.02585 5.97999 1.29969 5.07057 2.02949 4.67856Z</StreamGeometry>
|
||||
|
||||
</ResourceDictionary>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user