mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-23 09:56:35 +08:00
Compare commits
17 Commits
12.0.0-pre
...
v12.0.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35b62fe3af | ||
|
|
c48d96e40f | ||
|
|
c128feb4ff | ||
|
|
48c3837d81 | ||
|
|
f22709fcb1 | ||
|
|
0fbcf43309 | ||
|
|
a1bda0d2d9 | ||
|
|
52cc3887b1 | ||
|
|
9cf27b3906 | ||
|
|
bfb3dd671b | ||
|
|
665dca3bd3 | ||
|
|
f5e56511ac | ||
|
|
b3b7459088 | ||
|
|
96f7f3d1e1 | ||
|
|
64e2b50a1d | ||
|
|
fbfe5b0b6a | ||
|
|
bd4d4e2096 |
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v5
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
run: touch $OUTPUT_PATH/.nojekyll
|
||||
|
||||
- name: Commit wwwroot to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
|
||||
4
.github/workflows/pack-nightly.yml
vendored
4
.github/workflows/pack-nightly.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.IRIHI_NUGET_API_KEY }} --source irihi.tech --skip-duplicate
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: nugets
|
||||
path: nugets
|
||||
|
||||
4
.github/workflows/pack.yml
vendored
4
.github/workflows/pack.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Pack Semi.Avalonia
|
||||
if: ${{ inputs.Semi_Avalonia }}
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: nugets
|
||||
path: nugets
|
||||
|
||||
36
.github/workflows/publish.yml
vendored
36
.github/workflows/publish.yml
vendored
@@ -75,11 +75,11 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Publish win-x64
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.win-x64
|
||||
path: |
|
||||
@@ -91,13 +91,13 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Enable Native AOT in .csproj
|
||||
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||
- name: Publish win-x64 AOT
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT
|
||||
path: |
|
||||
@@ -109,11 +109,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Publish linux-x64
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.linux-x64
|
||||
path: |
|
||||
@@ -125,13 +125,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Enable Native AOT in .csproj
|
||||
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||
- name: Publish linux-x64 AOT
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT
|
||||
path: |
|
||||
@@ -143,11 +143,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Publish linux-x64 DRM
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Drm.linux-x64
|
||||
path: |
|
||||
@@ -159,13 +159,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Enable Native AOT in .csproj
|
||||
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
|
||||
- name: Publish linux-x64 AOT
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT
|
||||
path: |
|
||||
@@ -177,11 +177,11 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Publish osx-arm64
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-arm64
|
||||
path: |
|
||||
@@ -193,13 +193,13 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Enable Native AOT in .csproj
|
||||
run: sed -i '' 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||
- name: Publish osx-arm64 AOT
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
|
||||
path: |
|
||||
@@ -211,7 +211,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Install Android workload
|
||||
run: dotnet workload install android
|
||||
- name: Restore Dependencies
|
||||
@@ -219,7 +219,7 @@ jobs:
|
||||
- name: Publish Android
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net10.0-android --no-restore -o publish /p:RuntimeIdentifier=android-arm64
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: android-arm64
|
||||
path: publish/*Signed.apk
|
||||
|
||||
4
.github/workflows/release-tag.yml
vendored
4
.github/workflows/release-tag.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
needs: [ nuget,publish ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4.3.0
|
||||
- uses: actions/download-artifact@v8
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
run: ls -R
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
||||
with:
|
||||
generate_release_notes: true
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0-preview2-2</DataGridVersion>
|
||||
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
|
||||
<AvaloniaVersion>12.0.0-rc2</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0-rc2</DataGridVersion>
|
||||
<SkiaSharpVersion>3.119.3-preview.1.1</SkiaSharpVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.0-beta3"/>
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
|
||||
@@ -15,13 +14,13 @@
|
||||
<PackageVersion Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
|
||||
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.0-beta3"/>
|
||||
|
||||
<PackageVersion Include="SkiaSharp" Version="$(SkiaSharpVersion)"/>
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.WebAssembly" Version="$(SkiaSharpVersion)"/>
|
||||
|
||||
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0"/>
|
||||
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0.2"/>
|
||||
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
|
||||
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.3.1"/>
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -35,5 +35,30 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="A.S.I.A" />
|
||||
</ButtonSpinner>
|
||||
<ButtonSpinner
|
||||
Height="30"
|
||||
AllowSpin="{Binding #allowSpinCheck.IsChecked}"
|
||||
BorderThickness="1"
|
||||
ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}"
|
||||
Spin="OnSpin"
|
||||
Theme="{StaticResource SplitButtonSpinner}">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="A.S.I.A" />
|
||||
</ButtonSpinner>
|
||||
<ButtonSpinner
|
||||
Height="30"
|
||||
AllowSpin="{Binding #allowSpinCheck.IsChecked}"
|
||||
ButtonSpinnerLocation="Left"
|
||||
BorderThickness="1"
|
||||
ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}"
|
||||
Spin="OnSpin"
|
||||
Theme="{StaticResource SplitButtonSpinner}">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="A.S.I.A" />
|
||||
</ButtonSpinner>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
69
demo/Semi.Avalonia.Demo/Pages/CarouselPageDemo.axaml
Normal file
69
demo/Semi.Avalonia.Demo/Pages/CarouselPageDemo.axaml
Normal file
@@ -0,0 +1,69 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.CarouselPageDemo">
|
||||
<DockPanel>
|
||||
<ScrollViewer DockPanel.Dock="Right" Width="220">
|
||||
<StackPanel Margin="12" Spacing="8">
|
||||
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16"
|
||||
Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
|
||||
|
||||
<TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="13" />
|
||||
<StackPanel Spacing="6">
|
||||
<Button Content="Previous" Click="OnPrevious" HorizontalAlignment="Stretch" />
|
||||
<Button Content="Next" Click="OnNext" HorizontalAlignment="Stretch" />
|
||||
</StackPanel>
|
||||
|
||||
<Separator />
|
||||
|
||||
<TextBlock Text="Status" FontWeight="SemiBold" FontSize="13" />
|
||||
<TextBlock Name="StatusText" Text="Page 1 of 3" Opacity="0.7" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border DockPanel.Dock="Right" Width="1"
|
||||
Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
|
||||
|
||||
<Border Margin="12"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
||||
BorderThickness="1" CornerRadius="6" ClipToBounds="True">
|
||||
<Panel>
|
||||
<CarouselPage Name="DemoCarousel"
|
||||
SelectionChanged="OnSelectionChanged">
|
||||
<ContentPage Header="Welcome">
|
||||
<StackPanel Margin="24" Spacing="12"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Welcome" FontSize="28" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" />
|
||||
<TextBlock Text="Swipe left or use the buttons to navigate."
|
||||
TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
|
||||
</StackPanel>
|
||||
</ContentPage>
|
||||
<ContentPage Header="Explore">
|
||||
<StackPanel Margin="24" Spacing="12"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Explore" FontSize="28" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" />
|
||||
<TextBlock Text="CarouselPage supports scroll-based and transition-based navigation modes."
|
||||
TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
|
||||
</StackPanel>
|
||||
</ContentPage>
|
||||
<ContentPage Header="Get Started">
|
||||
<StackPanel Margin="24" Spacing="12"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Get Started" FontSize="28" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" />
|
||||
<TextBlock Text="Use SelectedIndex to jump to any page, or assign a PageTransition for animated switching."
|
||||
TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
|
||||
</StackPanel>
|
||||
</ContentPage>
|
||||
</CarouselPage>
|
||||
<PipsPager HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom" Margin="0,0,0,20"
|
||||
NumberOfPages="3"
|
||||
SelectedPageIndex="{Binding #DemoCarousel.SelectedIndex}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
|
||||
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
34
demo/Semi.Avalonia.Demo/Pages/CarouselPageDemo.axaml.cs
Normal file
34
demo/Semi.Avalonia.Demo/Pages/CarouselPageDemo.axaml.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class CarouselPageDemo : UserControl
|
||||
{
|
||||
public CarouselPageDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnPrevious(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DemoCarousel.SelectedIndex > 0)
|
||||
DemoCarousel.SelectedIndex--;
|
||||
}
|
||||
|
||||
private void OnNext(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var pageCount = (DemoCarousel.Pages as IList)?.Count ?? 0;
|
||||
if (DemoCarousel.SelectedIndex < pageCount - 1)
|
||||
DemoCarousel.SelectedIndex++;
|
||||
}
|
||||
|
||||
private void OnSelectionChanged(object? sender, PageSelectionChangedEventArgs e)
|
||||
{
|
||||
if (StatusText == null)
|
||||
return;
|
||||
var pageCount = (DemoCarousel.Pages as IList)?.Count ?? 0;
|
||||
StatusText.Text = $"Page {DemoCarousel.SelectedIndex + 1} of {pageCount}";
|
||||
}
|
||||
}
|
||||
@@ -58,18 +58,18 @@
|
||||
IsOpen="{Binding #isop.IsChecked}"
|
||||
IsSticky="{Binding #isst.IsChecked}"
|
||||
Width="{Binding #ws.Value}">
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<AppBarToggleButton IsChecked="True" IsEnabled="False" Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Print" Icon="{DynamicResource SemiIconPrint}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
<CommandBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<CommandBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<CommandBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<CommandBarToggleButton IsChecked="True" IsEnabled="False" Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<CommandBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<CommandBarButton Label="Print" Icon="{DynamicResource SemiIconPrint}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar>
|
||||
</GroupBox>
|
||||
|
||||
@@ -79,12 +79,12 @@
|
||||
<TextBlock Text="CommandBar — With Secondary Commands (overflow)" />
|
||||
</GroupBox.Header>
|
||||
<CommandBar>
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<CommandBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<CommandBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<CommandBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<CommandBar.SecondaryCommands>
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
<CommandBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<CommandBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar.SecondaryCommands>
|
||||
</CommandBar>
|
||||
</GroupBox>
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
<NumericUpDown Width="100" IsEnabled="False" />
|
||||
<NumericUpDown Width="100" ButtonSpinnerLocation="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock Text="Split" />
|
||||
<NumericUpDown Classes="Split" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
99
demo/Semi.Avalonia.Demo/Pages/PipsPagerDemo.axaml
Normal file
99
demo/Semi.Avalonia.Demo/Pages/PipsPagerDemo.axaml
Normal file
@@ -0,0 +1,99 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.PipsPagerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16" Margin="0,0,0,20">
|
||||
|
||||
<!-- Horizontal PipsPager -->
|
||||
<TextBlock Classes="H6" Text="Horizontal" />
|
||||
<PipsPager
|
||||
NumberOfPages="8"
|
||||
Orientation="Horizontal" />
|
||||
|
||||
<!-- Vertical PipsPager -->
|
||||
<TextBlock Classes="H6" Text="Vertical" />
|
||||
<PipsPager
|
||||
NumberOfPages="8"
|
||||
Orientation="Vertical" />
|
||||
|
||||
<!-- Linked with Carousel -->
|
||||
<TextBlock Classes="H6" Text="Linked with Carousel" />
|
||||
<Panel>
|
||||
<Carousel
|
||||
Name="DemoCarousel"
|
||||
Height="160">
|
||||
<Border Background="#EAF5FF">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#1C1F23"
|
||||
Text="Page 1" />
|
||||
</Border>
|
||||
<Border Background="#F9F9F9">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#1C1F23"
|
||||
Text="Page 2" />
|
||||
</Border>
|
||||
<Border Background="#FFF8EA">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#1C1F23"
|
||||
Text="Page 3" />
|
||||
</Border>
|
||||
<Border Background="#FEF2ED">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#1C1F23"
|
||||
Text="Page 4" />
|
||||
</Border>
|
||||
<Border Background="#F0F5FF">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#1C1F23"
|
||||
Text="Page 5" />
|
||||
</Border>
|
||||
</Carousel>
|
||||
<ThemeVariantScope RequestedThemeVariant="Light">
|
||||
<PipsPager
|
||||
Name="LinkedPager"
|
||||
NumberOfPages="5"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0,0,0,8"
|
||||
SelectedPageIndex="{Binding #DemoCarousel.SelectedIndex}" />
|
||||
</ThemeVariantScope>
|
||||
</Panel>
|
||||
|
||||
<!-- Various page counts -->
|
||||
<TextBlock Classes="H6" Text="Various Page Counts" />
|
||||
<StackPanel Spacing="12">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock VerticalAlignment="Center" Width="80" Text="3 pages" />
|
||||
<PipsPager NumberOfPages="3" Orientation="Horizontal" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock VerticalAlignment="Center" Width="80" Text="5 pages" />
|
||||
<PipsPager NumberOfPages="5" Orientation="Horizontal" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock VerticalAlignment="Center" Width="80" Text="10 pages" />
|
||||
<PipsPager NumberOfPages="10" Orientation="Horizontal" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
12
demo/Semi.Avalonia.Demo/Pages/PipsPagerDemo.axaml.cs
Normal file
12
demo/Semi.Avalonia.Demo/Pages/PipsPagerDemo.axaml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class PipsPagerDemo : UserControl
|
||||
{
|
||||
public PipsPagerDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,14 +34,10 @@
|
||||
</StackPanel>
|
||||
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
|
||||
<TabControl Classes.ReverseSeparator="{Binding #reverse.IsChecked}" TabStripPlacement="{Binding #place.SelectedValue}">
|
||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
<TabItem Content="Hello 1" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabItem Content="Hello 2" Header="快速起步" Icon="{StaticResource SemiIconGlobe}" />
|
||||
<TabItem Content="Hello 4" Header="无效" Icon="{StaticResource SemiIconClear}" IsEnabled="False" />
|
||||
<TabItem Content="Hello 3" Header="帮助" Icon="{StaticResource SemiIconHelpCircle}" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border Height="300" Theme="{StaticResource CardBorder}">
|
||||
@@ -57,14 +53,10 @@
|
||||
<StackPanel>
|
||||
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
|
||||
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource LineTabControl}">
|
||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
<TabItem Content="Hello 1" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabItem Content="Hello 2" Header="快速起步" Icon="{StaticResource SemiIconGlobe}" />
|
||||
<TabItem Content="Hello 4" Header="无效" Icon="{StaticResource SemiIconClear}" IsEnabled="False" />
|
||||
<TabItem Content="Hello 3" Header="帮助" Icon="{StaticResource SemiIconHelpCircle}" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border Height="300" Theme="{StaticResource CardBorder}">
|
||||
@@ -82,14 +74,10 @@
|
||||
Background="Transparent"
|
||||
Theme="{StaticResource CardBorder}">
|
||||
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource CardTabControl}">
|
||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
<TabItem Content="Hello 1" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabItem Content="Hello 2" Header="快速起步" Icon="{StaticResource SemiIconGlobe}" />
|
||||
<TabItem Content="Hello 4" Header="无效" Icon="{StaticResource SemiIconClear}" IsEnabled="False" />
|
||||
<TabItem Content="Hello 3" Header="帮助" Icon="{StaticResource SemiIconHelpCircle}" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border
|
||||
@@ -107,14 +95,10 @@
|
||||
<StackPanel>
|
||||
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
|
||||
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource ButtonTabControl}">
|
||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||
<TabItem Content="中文内容" Header="中文中文" />
|
||||
<TabItem
|
||||
Content="Hello 4"
|
||||
Header="Tab 4"
|
||||
IsEnabled="False" />
|
||||
<TabItem Content="Hello 1" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabItem Content="Hello 2" Header="快速起步" Icon="{StaticResource SemiIconGlobe}" />
|
||||
<TabItem Content="Hello 4" Header="无效" Icon="{StaticResource SemiIconClear}" IsEnabled="False" />
|
||||
<TabItem Content="Hello 3" Header="帮助" Icon="{StaticResource SemiIconHelpCircle}" />
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border Height="300" Theme="{StaticResource CardBorder}">
|
||||
|
||||
32
demo/Semi.Avalonia.Demo/Pages/WindowCustomizationsPage.axaml
Normal file
32
demo/Semi.Avalonia.Demo/Pages/WindowCustomizationsPage.axaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.WindowCustomizationsPage"
|
||||
x:CompileBindings="True">
|
||||
|
||||
<StackPanel
|
||||
Spacing="10"
|
||||
IsEnabled="{OnFormFactor False, Desktop=True}">
|
||||
<TextBlock Classes="H2" Text="Desktop properties" />
|
||||
|
||||
<CheckBox Content="Extend Client Area to Decorations"
|
||||
IsChecked="{Binding $parent[Window].ExtendClientAreaToDecorationsHint}" />
|
||||
|
||||
<Slider IsEnabled="{Binding $parent[Window].ExtendClientAreaToDecorationsHint}"
|
||||
HorizontalAlignment="Left"
|
||||
Width="201" Minimum="-1" Maximum="200"
|
||||
Value="{Binding $parent[Window].ExtendClientAreaTitleBarHeightHint}" />
|
||||
|
||||
<CheckBox Content="Can Resize"
|
||||
IsChecked="{Binding $parent[Window].CanResize}" />
|
||||
|
||||
<CheckBox Content="Can Minimize"
|
||||
IsChecked="{Binding $parent[Window].CanMinimize}" />
|
||||
|
||||
<CheckBox Content="Can Maximize"
|
||||
IsChecked="{Binding $parent[Window].CanMaximize}"
|
||||
IsEnabled="{Binding $parent[Window].CanResize}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,12 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages
|
||||
{
|
||||
public partial class WindowCustomizationsPage : UserControl
|
||||
{
|
||||
public WindowCustomizationsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid"/>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<!--Condition below is needed to remove AvaloniaUI.DiagnosticsSupport package from build output in Release configuration.-->
|
||||
<PackageReference Include="AvaloniaUI.DiagnosticsSupport">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
|
||||
@@ -200,6 +200,9 @@
|
||||
<TabItem Header="ContentPage">
|
||||
<pages:ContentPageDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="CarouselPage">
|
||||
<pages:CarouselPageDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="DrawerPage">
|
||||
<pages:DrawerPageDemo />
|
||||
</TabItem>
|
||||
@@ -222,6 +225,9 @@
|
||||
<TabItem Header="Carousel">
|
||||
<pages:CarouselDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="PipsPager">
|
||||
<pages:PipsPagerDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="Expander">
|
||||
<pages:ExpanderDemo />
|
||||
</TabItem>
|
||||
@@ -272,6 +278,9 @@
|
||||
<TabItem Header="ThemeVariantScope">
|
||||
<pages:ThemeVariantDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="WindowCustomizationsPage">
|
||||
<pages:WindowCustomizationsPage />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -9,7 +9,6 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaTitleBarHeightHint="40"
|
||||
Icon="/Assets/irihi.ico"
|
||||
mc:Ignorable="d">
|
||||
<views:MainView Margin="{Binding $parent[Window].WindowDecorationMargin}" />
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private WindowState _stateBeforeFullScreen = WindowState.Normal;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
KeyDown += FullScreenKeyDown;
|
||||
}
|
||||
|
||||
private void FullScreenKeyDown(object? sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.F11)
|
||||
{
|
||||
|
||||
ToggleFullScreen();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleFullScreen()
|
||||
{
|
||||
if (WindowState is not WindowState.FullScreen)
|
||||
{
|
||||
_stateBeforeFullScreen = WindowState;
|
||||
WindowState = WindowState.FullScreen;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowState = _stateBeforeFullScreen;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.0-preview2</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0-preview2-2</DataGridVersion>
|
||||
<AvaloniaVersion>12.0.0-rc2</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0-rc2</DataGridVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.1.1"/>
|
||||
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.4.0-preview1"/>
|
||||
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.4.0-rc1"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -6,6 +6,7 @@
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceInclude x:Key="Default" Source="Light.axaml" />
|
||||
<ResourceInclude x:Key="Light" Source="Light.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="Dark.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.0-preview2</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.0-preview2</PackageReleaseNotes>
|
||||
<Version>12.0.0-rc1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.0-rc1</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceInclude x:Key="Default" Source="Light.axaml" />
|
||||
<ResourceInclude x:Key="Light" Source="Light.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="Dark.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.0-preview2</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 12.0.0-preview2</PackageReleaseNotes>
|
||||
<Version>12.0.0-rc1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 12.0.0-rc1</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.DataGrid</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
@@ -92,7 +93,7 @@
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^[ButtonSpinnerLocation=Left] /template/ Border#ButtonGroup">
|
||||
<Style Selector="^:left /template/ Border#ButtonGroup">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Margin" Value="0 0 4 0" />
|
||||
</Style>
|
||||
@@ -100,4 +101,70 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="SplitButtonSpinner" TargetType="ButtonSpinner">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="MinWidth" Value="200" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ButtonSpinner">
|
||||
<Grid ColumnDefinitions="Auto, *, Auto">
|
||||
<RepeatButton
|
||||
Name="PART_DecreaseButton"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Stretch"
|
||||
Padding="{DynamicResource SplitButtonSpinnerButtonPadding}"
|
||||
BorderBrush="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}"
|
||||
BorderThickness="{DynamicResource ButtonSpinnerButtonGroupBorderThickness}"
|
||||
CornerRadius="{DynamicResource SplitButtonSpinnerLeftButtonCornerRadius}"
|
||||
IsVisible="{TemplateBinding ShowButtonSpinner}"
|
||||
Theme="{StaticResource ButtonSpinnerRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Small"
|
||||
Data="{DynamicResource SplitButtonSpinnerDecreaseButtonGlyph}"
|
||||
Foreground="{DynamicResource ButtonSpinnerRepeatButtonForeground}" />
|
||||
</RepeatButton>
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Margin="2 0"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</Border>
|
||||
<RepeatButton
|
||||
Name="PART_IncreaseButton"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Stretch"
|
||||
Padding="{DynamicResource SplitButtonSpinnerButtonPadding}"
|
||||
BorderBrush="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}"
|
||||
BorderThickness="{DynamicResource ButtonSpinnerButtonGroupBorderThickness}"
|
||||
CornerRadius="{DynamicResource SplitButtonSpinnerRightButtonCornerRadius}"
|
||||
IsVisible="{TemplateBinding ShowButtonSpinner}"
|
||||
Theme="{StaticResource ButtonSpinnerRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Small"
|
||||
Data="{DynamicResource SplitButtonSpinnerIncreaseButtonGlyph}"
|
||||
Foreground="{DynamicResource ButtonSpinnerRepeatButtonForeground}" />
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:left /template/ RepeatButton#PART_DecreaseButton">
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource SplitButtonSpinnerRightButtonCornerRadius}" />
|
||||
</Style>
|
||||
<Style Selector="^:left /template/ RepeatButton#PART_IncreaseButton">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource SplitButtonSpinnerLeftButtonCornerRadius}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -156,7 +156,7 @@
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Data="{DynamicResource CarouselButtonGlyph}"
|
||||
Data="{TemplateBinding Content}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
@@ -213,6 +213,7 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
Content="{StaticResource SemiIconChevronLeft}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Previous}" />
|
||||
<Button
|
||||
@@ -222,9 +223,9 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
Content="{StaticResource SemiIconChevronRight}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Next}"
|
||||
RenderTransform="rotate(180deg)" />
|
||||
Command="{Binding $parent[Carousel].Next}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
19
src/Semi.Avalonia/Controls/CarouselPage.axaml
Normal file
19
src/Semi.Avalonia/Controls/CarouselPage.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 CarouselPage}" TargetType="CarouselPage">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Carousel
|
||||
Name="PART_Carousel"
|
||||
Background="{TemplateBinding Background}"
|
||||
ItemTemplate="{TemplateBinding PageTemplate}"
|
||||
PageTransition="{TemplateBinding PageTransition}"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -28,24 +28,24 @@
|
||||
DefaultLabelPosition="{Binding #lc.SelectedValue}"
|
||||
IsDynamicOverflowEnabled="{Binding #idfe.IsChecked}"
|
||||
Width="{Binding #ws.Value}">
|
||||
<AppBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<AppBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<AppBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<AppBarToggleButton IsEnabled="False" IsChecked="True" Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<AppBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<AppBarButton Label="Print" Icon="{DynamicResource SemiIconPrint}" />
|
||||
<AppBarSeparator />
|
||||
<AppBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
<CommandBarButton Label="New" Icon="{DynamicResource SemiIconPlus}" />
|
||||
<CommandBarButton Label="Save" Icon="{DynamicResource SemiIconSave}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarToggleButton Label="Bold" Icon="{DynamicResource SemiIconBold}" />
|
||||
<CommandBarToggleButton Label="Italic" Icon="{DynamicResource SemiIconItalic}" />
|
||||
<CommandBarToggleButton IsEnabled="False" IsChecked="True" Label="Underline" Icon="{DynamicResource SemiIconUnderline}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarButton Label="Share" Icon="{DynamicResource SemiIconShare}" />
|
||||
<CommandBarButton Label="Export" Icon="{DynamicResource SemiIconExport}" />
|
||||
<CommandBarButton Label="Print" Icon="{DynamicResource SemiIconPrint}" />
|
||||
<CommandBarSeparator />
|
||||
<CommandBarButton Label="Delete" Icon="{DynamicResource SemiIconDelete}" />
|
||||
</CommandBar>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<ControlTheme x:Key="AppBarButtonBaseTheme" TargetType="Button">
|
||||
<ControlTheme x:Key="CommandBarButtonBaseTheme" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
@@ -57,7 +57,7 @@
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<StackPanel
|
||||
Name="PART_LayoutRoot"
|
||||
Spacing="{DynamicResource AppBarButtonPanelSpacing}"
|
||||
Spacing="{DynamicResource CommandBarButtonPanelSpacing}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<ContentPresenter
|
||||
@@ -73,50 +73,51 @@
|
||||
</ContentPresenter>
|
||||
<TextBlock
|
||||
Name="PART_Label"
|
||||
MaxLines="1"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{DynamicResource AppBarButtonLabelFontSize}"
|
||||
FontSize="{DynamicResource CommandBarButtonLabelFontSize}"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarButtonForeground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonPadding}" />
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CommandBarButtonPadding}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarButtonWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CommandBarButtonMinHeight}" />
|
||||
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource AppBarButtonCornerRadius}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CommandBarButtonCornerRadius}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarButtonPointeroverBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarButtonPressedBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarButtonDisabledForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarButtonDisabledForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- AppBarButton -->
|
||||
<!-- CommandBarButton -->
|
||||
<ControlTheme
|
||||
x:Key="{x:Type AppBarButton}"
|
||||
BasedOn="{StaticResource AppBarButtonBaseTheme}"
|
||||
TargetType="AppBarButton">
|
||||
x:Key="{x:Type CommandBarButton}"
|
||||
BasedOn="{StaticResource CommandBarButtonBaseTheme}"
|
||||
TargetType="CommandBarButton">
|
||||
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Text" Value="{TemplateBinding Label}" />
|
||||
@@ -127,7 +128,7 @@
|
||||
|
||||
<!-- IsCompact: hide label, use compact width -->
|
||||
<Style Selector="^[IsCompact=True]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
@@ -135,7 +136,7 @@
|
||||
|
||||
<!-- LabelPosition=Collapsed: hide label, use compact width -->
|
||||
<Style Selector="^[LabelPosition=Collapsed]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
@@ -144,7 +145,7 @@
|
||||
<!-- LabelPosition=Right: horizontal layout, auto-width -->
|
||||
<Style Selector="^[LabelPosition=Right]">
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
@@ -160,8 +161,8 @@
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonOverflowPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CommandBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CommandBarButtonOverflowPadding}" />
|
||||
<Style Selector="^ /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
@@ -174,11 +175,11 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- AppBarToggleButton -->
|
||||
<!-- CommandBarToggleButton -->
|
||||
<ControlTheme
|
||||
x:Key="{x:Type AppBarToggleButton}"
|
||||
BasedOn="{StaticResource AppBarButtonBaseTheme}"
|
||||
TargetType="AppBarToggleButton">
|
||||
x:Key="{x:Type CommandBarToggleButton}"
|
||||
BasedOn="{StaticResource CommandBarButtonBaseTheme}"
|
||||
TargetType="CommandBarToggleButton">
|
||||
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="Text" Value="{TemplateBinding Label}" />
|
||||
@@ -189,25 +190,25 @@
|
||||
|
||||
<Style Selector="^:checked">
|
||||
<Style Selector="^ /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarToggleButtonCheckedBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarToggleButtonCheckedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckedForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarToggleButtonCheckedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarToggleButtonCheckedPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarToggleButtonCheckedPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#PART_Border">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarToggleButtonCheckedPressedBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarToggleButtonCheckedPressedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckedDisabledForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CommandBarToggleButtonCheckedDisabledForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- IsCompact: hide label, use compact width -->
|
||||
<Style Selector="^[IsCompact=True]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
@@ -215,7 +216,7 @@
|
||||
|
||||
<!-- LabelPosition=Collapsed: hide label, use compact width -->
|
||||
<Style Selector="^[LabelPosition=Collapsed]">
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ TextBlock#PART_Label">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
@@ -224,7 +225,7 @@
|
||||
<!-- LabelPosition=Right: horizontal layout, auto-width -->
|
||||
<Style Selector="^[LabelPosition=Right]">
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource AppBarButtonCompactWidth}" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource CommandBarButtonCompactWidth}" />
|
||||
<Style Selector="^ /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
@@ -240,8 +241,8 @@
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource AppBarButtonOverflowPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CommandBarButtonOverflowMinHeight}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CommandBarButtonOverflowPadding}" />
|
||||
<Style Selector="^ /template/ StackPanel#PART_LayoutRoot">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
@@ -254,14 +255,14 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- AppBarSeparator -->
|
||||
<ControlTheme x:Key="{x:Type AppBarSeparator}" TargetType="AppBarSeparator">
|
||||
<Setter Property="Background" Value="{DynamicResource AppBarSeparatorBackground}" />
|
||||
<Setter Property="Width" Value="{DynamicResource AppBarSeparatorWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AppBarSeparatorMinHeight}" />
|
||||
<Setter Property="Margin" Value="{DynamicResource AppBarSeparatorMargin}" />
|
||||
<!-- CommandBarSeparator -->
|
||||
<ControlTheme x:Key="{x:Type CommandBarSeparator}" TargetType="CommandBarSeparator">
|
||||
<Setter Property="Background" Value="{DynamicResource CommandBarSeparatorBackground}" />
|
||||
<Setter Property="Width" Value="{DynamicResource CommandBarSeparatorWidth}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CommandBarSeparatorMinHeight}" />
|
||||
<Setter Property="Margin" Value="{DynamicResource CommandBarSeparatorMargin}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AppBarSeparator">
|
||||
<ControlTemplate TargetType="CommandBarSeparator">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
Width="{TemplateBinding Width}"
|
||||
@@ -273,9 +274,9 @@
|
||||
<Style Selector="^[IsInOverflow=True]">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Width" Value="{x:Static x:Double.NaN}" />
|
||||
<Setter Property="Height" Value="{DynamicResource AppBarSeparatorOverflowHeight}" />
|
||||
<Setter Property="Height" Value="{DynamicResource CommandBarSeparatorOverflowHeight}" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="Margin" Value="{DynamicResource AppBarSeparatorOverflowMargin}" />
|
||||
<Setter Property="Margin" Value="{DynamicResource CommandBarSeparatorOverflowMargin}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
@@ -299,9 +300,9 @@
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Panel>
|
||||
<DockPanel>
|
||||
<DockPanel KeyboardNavigation.TabNavigation="Cycle">
|
||||
<!-- Overflow button (docked right) -->
|
||||
<AppBarButton
|
||||
<CommandBarButton
|
||||
Name="PART_OverflowButton"
|
||||
DockPanel.Dock="Right"
|
||||
Icon="{DynamicResource CommandBarOverflowButtonGlyph}"
|
||||
@@ -351,6 +352,7 @@
|
||||
CornerRadius="{DynamicResource CommandBarOverflowCornerRadius}">
|
||||
|
||||
<ItemsControl
|
||||
Name="PART_OverflowPresenter"
|
||||
ItemsSource="{Binding OverflowItems, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
Name="PART_PaneIconPresenter"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding DrawerIcon}" />
|
||||
Content="{TemplateBinding DrawerIcon}"
|
||||
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -70,27 +71,32 @@
|
||||
Name="PART_DrawerHeader"
|
||||
DockPanel.Dock="Top"
|
||||
Background="{TemplateBinding DrawerHeaderBackground}"
|
||||
Content="{TemplateBinding DrawerHeader}" />
|
||||
Content="{TemplateBinding DrawerHeader}"
|
||||
ContentTemplate="{TemplateBinding DrawerHeaderTemplate}" />
|
||||
|
||||
<!-- Drawer footer -->
|
||||
<ContentPresenter
|
||||
Name="PART_DrawerFooter"
|
||||
DockPanel.Dock="Bottom"
|
||||
Background="{TemplateBinding DrawerFooterBackground}"
|
||||
Content="{TemplateBinding DrawerFooter}" />
|
||||
Content="{TemplateBinding DrawerFooter}"
|
||||
ContentTemplate="{TemplateBinding DrawerFooterTemplate}" />
|
||||
|
||||
<!-- Compact pane icon (compact mode) -->
|
||||
<ContentPresenter
|
||||
Name="PART_CompactPaneIconPresenter"
|
||||
DockPanel.Dock="Top"
|
||||
IsVisible="False"
|
||||
Content="{TemplateBinding DrawerIcon}" />
|
||||
Content="{TemplateBinding DrawerIcon}"
|
||||
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
|
||||
|
||||
<!-- Bottom pane icon -->
|
||||
<ContentPresenter
|
||||
Name="PART_BottomPaneIconPresenter"
|
||||
DockPanel.Dock="Bottom"
|
||||
IsVisible="False" />
|
||||
IsVisible="False"
|
||||
Content="{TemplateBinding DrawerIcon}"
|
||||
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
|
||||
|
||||
<!-- Drawer main content -->
|
||||
<ContentPresenter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Panel>
|
||||
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<VisualLayerManager>
|
||||
<VisualLayerManager Name="PART_VisualLayerManager">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
|
||||
@@ -116,5 +116,13 @@
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -54,4 +54,17 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
x:Key="HorizontalMenuFlyoutPresenter"
|
||||
TargetType="MenuFlyoutPresenter"
|
||||
BasedOn="{StaticResource {x:Type MenuFlyoutPresenter}}">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="MinWidth" Value="{DynamicResource HorizontalMenuFlyoutThemeMinWidth}" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -52,6 +52,15 @@
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownSmallHeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Split">
|
||||
<Style Selector="^ /template/ ButtonSpinner#PART_Spinner">
|
||||
<Setter Property="Theme" Value="{DynamicResource SplitButtonSpinner}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:error">
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
|
||||
130
src/Semi.Avalonia/Controls/PipsPager.axaml
Normal file
130
src/Semi.Avalonia/Controls/PipsPager.axaml
Normal file
@@ -0,0 +1,130 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" >
|
||||
<PipsPager NumberOfPages="10" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<ControlTheme x:Key="PipsPagerButton" TargetType="Button">
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerButtonForeground}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Data="{TemplateBinding Content}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover /template/ PathIcon">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerButtonPointeroverForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="PipsPagerIndicatorDotListBoxItem" TargetType="ListBoxItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerIndicatorForeground}" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Ellipse
|
||||
Name="Container"
|
||||
Width="{DynamicResource CarouselIndicatorDotWidth}"
|
||||
Height="{DynamicResource CarouselIndicatorDotHeight}"
|
||||
Fill="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerIndicatorPointeroverForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerIndicatorPressedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:selected">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PipsPagerIndicatorSelectedForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type PipsPager}" TargetType="PipsPager">
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="PreviousButtonTheme" Value="{StaticResource PipsPagerButton}" />
|
||||
<Setter Property="NextButtonTheme" Value="{StaticResource PipsPagerButton}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<StackPanel
|
||||
Name="PART_RootPanel"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
Background="{TemplateBinding Background}"
|
||||
ClipToBounds="False">
|
||||
<Button
|
||||
Name="PART_PreviousButton"
|
||||
Theme="{TemplateBinding PreviousButtonTheme}"
|
||||
IsVisible="{TemplateBinding IsPreviousButtonVisible}"
|
||||
Foreground="{DynamicResource PipsPagerButtonForeground}"
|
||||
Content="{StaticResource SemiIconSmallTriangleLeft}" />
|
||||
|
||||
<ListBox
|
||||
Name="PART_PipsPagerList"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
ItemsSource="{Binding TemplateSettings.Pips, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SelectedIndex="{TemplateBinding SelectedPageIndex, Mode=TwoWay}"
|
||||
AutoScrollToSelectedItem="False"
|
||||
ItemContainerTheme="{StaticResource PipsPagerIndicatorDotListBoxItem}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="{Binding $parent[PipsPager].Orientation}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
|
||||
<Button
|
||||
Name="PART_NextButton"
|
||||
Theme="{TemplateBinding NextButtonTheme}"
|
||||
Foreground="{DynamicResource PipsPagerButtonForeground}"
|
||||
Content="{StaticResource SemiIconSmallTriangleRight}"
|
||||
IsVisible="{TemplateBinding IsNextButtonVisible}" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:horizontal /template/ StackPanel#PART_RootPanel">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:vertical">
|
||||
|
||||
<Style Selector="^ /template/ StackPanel#PART_RootPanel">
|
||||
<Setter Property="Orientation" Value="Vertical" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Button#PART_PreviousButton">
|
||||
<Setter Property="Content" Value="{DynamicResource SemiIconSmallTriangleTop}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_NextButton">
|
||||
<Setter Property="Content" Value="{DynamicResource SemiIconSmallTriangleDown}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:first-page /template/ Button#PART_PreviousButton">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Setter Property="IsHitTestVisible" Value="False" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:last-page /template/ Button#PART_NextButton">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Setter Property="IsHitTestVisible" Value="False" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -13,7 +13,7 @@
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
<Panel>
|
||||
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
|
||||
<VisualLayerManager IsPopup="True">
|
||||
<VisualLayerManager Name="PART_VisualLayerManager">
|
||||
<LayoutTransformControl Name="PART_LayoutTransform">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
@@ -37,7 +37,7 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
<VisualLayerManager IsPopup="True">
|
||||
<VisualLayerManager Name="PART_VisualLayerManager">
|
||||
<LayoutTransformControl Name="PART_LayoutTransform">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
|
||||
@@ -4,87 +4,54 @@
|
||||
xmlns:semi="https://irihi.tech/semi"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<ProgressBar
|
||||
Width="200"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Width="200"
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Width="200"
|
||||
Classes="Left"
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Width="200"
|
||||
Classes="Left"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Width="200"
|
||||
Classes="Right"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<StackPanel
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal"
|
||||
Spacing="20">
|
||||
<ProgressBar
|
||||
Classes="Left"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Classes="Right"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
Classes="Left"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="False"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="True"
|
||||
Value="20" />
|
||||
<ProgressBar
|
||||
IsIndeterminate="True"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Orientation="Vertical"
|
||||
ShowProgressText="False"
|
||||
Value="20" />
|
||||
<StackPanel Width="400" Margin="20">
|
||||
<ProgressBar />
|
||||
<ProgressBar Value="20" />
|
||||
<ProgressBar Value="50" Classes="Success" />
|
||||
<ProgressBar Value="80" Classes="Warning" />
|
||||
<ProgressBar Value="100" Classes="Error" />
|
||||
<ProgressBar ShowProgressText="True" />
|
||||
<ProgressBar Value="20" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Error" ShowProgressText="True" />
|
||||
<ProgressBar Classes="Left" ShowProgressText="True" />
|
||||
<ProgressBar Value="20" Classes="Left" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Left Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Left Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Left Error" ShowProgressText="True" />
|
||||
<ProgressBar Classes="Right" ShowProgressText="True" />
|
||||
<ProgressBar Value="20" Classes="Right" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Right Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Right Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Right Error" ShowProgressText="True" />
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="ProgressBar">
|
||||
<Setter Property="Orientation" Value="Vertical" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<ProgressBar />
|
||||
<ProgressBar Value="20" />
|
||||
<ProgressBar Value="50" Classes="Success" />
|
||||
<ProgressBar Value="80" Classes="Warning" />
|
||||
<ProgressBar Value="100" Classes="Error" />
|
||||
<ProgressBar ShowProgressText="True" />
|
||||
<ProgressBar Value="20" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Error" ShowProgressText="True" />
|
||||
<ProgressBar Classes="Top" ShowProgressText="True" />
|
||||
<ProgressBar Value="20" Classes="Top" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Top Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Top Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Top Error" ShowProgressText="True" />
|
||||
<ProgressBar Classes="Bottom" ShowProgressText="True" />
|
||||
<ProgressBar Value="20" Classes="Bottom" ShowProgressText="True" />
|
||||
<ProgressBar Value="50" Classes="Bottom Success" ShowProgressText="True" />
|
||||
<ProgressBar Value="80" Classes="Bottom Warning" ShowProgressText="True" />
|
||||
<ProgressBar Value="100" Classes="Bottom Error" ShowProgressText="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
@@ -115,7 +82,7 @@
|
||||
<Panel Name="DeterminateRoot" Opacity="1">
|
||||
<Panel.Transitions>
|
||||
<Transitions>
|
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.197" />
|
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
|
||||
</Transitions>
|
||||
</Panel.Transitions>
|
||||
<Border
|
||||
@@ -127,7 +94,7 @@
|
||||
<Panel Name="IndeterminateRoot" Opacity="0">
|
||||
<Panel.Transitions>
|
||||
<Transitions>
|
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.197" />
|
||||
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
|
||||
</Transitions>
|
||||
</Panel.Transitions>
|
||||
<Border
|
||||
@@ -158,7 +125,7 @@
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}">
|
||||
<TemplateBinding Property="ProgressTextFormat" />
|
||||
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||
<TemplateBinding Property="Value" />
|
||||
<TemplateBinding Property="Percentage" />
|
||||
<TemplateBinding Property="Minimum" />
|
||||
<TemplateBinding Property="Maximum" />
|
||||
@@ -191,149 +158,155 @@
|
||||
<Style Selector="^.Error">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^:horizontal /template/ Border#PART_Indicator">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#PART_Indicator">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:horizontal">
|
||||
<Setter Property="MinWidth" Value="200" />
|
||||
<Setter Property="MinHeight" Value="4" />
|
||||
<Style Selector="^ /template/ Border#PART_Indicator">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Left,^.Top">
|
||||
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Margin" Value="0 0 16 0" />
|
||||
<Setter Property="MinWidth" Value="45" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinHeight" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Right,^.Bottom">
|
||||
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Margin" Value="16 0 0 0" />
|
||||
<Setter Property="MinWidth" Value="45" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinHeight" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:vertical">
|
||||
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="LayoutTransform">
|
||||
<RotateTransform Angle="90" />
|
||||
</Setter>
|
||||
</Style>
|
||||
<Setter Property="MinWidth" Value="4" />
|
||||
<Setter Property="MinHeight" Value="200" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="LayoutTransform">
|
||||
<RotateTransform Angle="90" />
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^:indeterminate /template/ Panel#DeterminateRoot">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^:indeterminate /template/ Panel#IndeterminateRoot">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^:horizontal:indeterminate /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:horizontal:indeterminate /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:vertical:indeterminate /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:vertical:indeterminate /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
|
||||
</Style>
|
||||
<Style Selector="^.Left">
|
||||
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Margin" Value="4 0" />
|
||||
<Style Selector="^ /template/ Border#PART_Indicator">
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Margin" Value="0 4" />
|
||||
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:horizontal /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinHeight" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Style Selector="^ /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinWidth" Value="4" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Style Selector="^.Left,^.Top">
|
||||
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Margin" Value="0 0 0 16" />
|
||||
<Setter Property="MinHeight" Value="45" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinWidth" Value="4" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
|
||||
<Style Selector="^.Right,^.Bottom">
|
||||
<Style Selector="^ /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="2" />
|
||||
<Setter Property="Margin" Value="0 16 0 0" />
|
||||
<Setter Property="MinHeight" Value="45" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinWidth" Value="4" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Right">
|
||||
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Margin" Value="4 0" />
|
||||
|
||||
<Style Selector="^:indeterminate">
|
||||
<Style Selector="^ /template/ Panel#DeterminateRoot">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="2" />
|
||||
<Setter Property="Margin" Value="0 4" />
|
||||
<Style Selector="^ /template/ Panel#IndeterminateRoot">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^:horizontal /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinHeight" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#ProgressBarRoot">
|
||||
<Setter Property="MinWidth" Value="4" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^ /template/ TextBlock#PART_ProgressText">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarOuterTextForeground}" />
|
||||
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:2">
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
|
||||
</KeyFrame>
|
||||
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
|
||||
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
@@ -6,16 +6,12 @@
|
||||
Width="400"
|
||||
Height="400"
|
||||
Margin="20">
|
||||
<TabItem Theme="{DynamicResource CardTabItem}" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabControl TabStripPlacement="Top" Theme="{DynamicResource LineTabControl}">
|
||||
<TabItem Header="文档">
|
||||
<TextBlock Text="Content1" />
|
||||
</TabItem>
|
||||
<TabItem Header="快速起步">
|
||||
<TextBlock Text="Content2" />
|
||||
</TabItem>
|
||||
<TabItem Header="帮助" IsSelected="True">
|
||||
<TextBlock Text="Content3" />
|
||||
</TabItem>
|
||||
<TabItem Content="Hello 1" Header="文档" Icon="{StaticResource SemiIconFile}" />
|
||||
<TabItem Content="Hello 2" Header="快速起步" Icon="{StaticResource SemiIconGlobe}" />
|
||||
<TabItem Content="Hello 4" Header="无效" Icon="{StaticResource SemiIconClear}" IsEnabled="False" />
|
||||
<TabItem Content="Hello 3" Header="帮助" Icon="{StaticResource SemiIconHelpCircle}" />
|
||||
</TabControl>
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
@@ -25,20 +21,39 @@
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemLinePipeBackground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="TabItem">
|
||||
<ContentPresenter
|
||||
Name="PART_HeaderPresenter"
|
||||
<Border
|
||||
Name="PART_RootBorder"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel HorizontalSpacing="{DynamicResource TabItemIconHeaderSpacing}">
|
||||
<ContentPresenter
|
||||
Name="PART_IconPresenter"
|
||||
DockPanel.Dock="Left"
|
||||
Content="{TemplateBinding Icon}"
|
||||
ContentTemplate="{TemplateBinding IconTemplate}"
|
||||
IsVisible="{Binding $self.Content, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<ContentPresenter.DataTemplates>
|
||||
<DataTemplate DataType="Geometry">
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ContentPresenter.DataTemplates>
|
||||
</ContentPresenter>
|
||||
<ContentPresenter
|
||||
Name="PART_HeaderPresenter"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
@@ -46,17 +61,31 @@
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderSelectedForeground}" />
|
||||
<Style Selector="^:selected">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="FontWeight" Value="{DynamicResource TabItemSelectedFontWeight}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderSelectedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemIconSelectedForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
|
||||
<Style Selector="^:pointerover">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter,^ /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderPointeroverForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter,^ /template/ ContentPresenter#PART_IconPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemHeaderDisabledForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
@@ -65,15 +94,15 @@
|
||||
TargetType="TabItem">
|
||||
<Setter Property="Padding" Value="8 4" />
|
||||
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:selected /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipeSelectedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pointerover /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipePointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pressed /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -98,27 +127,27 @@
|
||||
x:Key="LineTabItem"
|
||||
BasedOn="{StaticResource BaseTabItem}"
|
||||
TargetType="TabItem">
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:selected /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipeSelectedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:selected /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderSelectedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pointerover /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipePointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pressed /template/ Border#PART_RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabItemLinePipePressedBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pointerover /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pressed /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -150,15 +179,15 @@
|
||||
TargetType="TabItem">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TabControlSeparatorBorderBrush}" />
|
||||
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:selected /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderSelectedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pointerover /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pressed /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -207,16 +236,20 @@
|
||||
TargetType="TabItem">
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource SemiBorderRadiusSmall}" />
|
||||
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemButtonHeaderSelectedForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderSelectedBackground}" />
|
||||
<Style Selector="^:selected">
|
||||
<Style Selector="^ /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderSelectedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TabItemButtonHeaderSelectedForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:selected)">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pointerover /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Style Selector="^:pressed /template/ Border#PART_RootBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
@@ -22,6 +22,27 @@
|
||||
IsEnabled="{Binding $parent[TextBox].CanPaste}" />
|
||||
</MenuFlyout>
|
||||
|
||||
<MenuFlyout
|
||||
x:Key="HorizontalTextBoxContextFlyout"
|
||||
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
|
||||
FlyoutPresenterTheme="{StaticResource HorizontalMenuFlyoutPresenter}"
|
||||
ItemContainerTheme="{StaticResource TopLevelMenuItem}">
|
||||
<MenuItem
|
||||
Command="{Binding $parent[TextBox].Cut}"
|
||||
Header="{DynamicResource STRING_MENU_CUT}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCut}"
|
||||
IsVisible="{Binding $parent[TextBox].CanCut}" />
|
||||
<MenuItem
|
||||
Command="{Binding $parent[TextBox].Copy}"
|
||||
Header="{DynamicResource STRING_MENU_COPY}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCopy}"
|
||||
IsVisible="{Binding $parent[TextBox].CanCopy}" />
|
||||
<MenuItem
|
||||
Command="{Binding $parent[TextBox].Paste}"
|
||||
Header="{DynamicResource STRING_MENU_PASTE}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanPaste}" />
|
||||
</MenuFlyout>
|
||||
|
||||
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
@@ -133,6 +154,10 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:touch-mode">
|
||||
<Setter Property="ContextFlyout" Value="{StaticResource HorizontalTextBoxContextFlyout}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxPointeroverBorderBrush}" />
|
||||
@@ -304,7 +329,6 @@
|
||||
Name="PART_Placeholder"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Opacity="0.5"
|
||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||
Text="{TemplateBinding PlaceholderText}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
@@ -368,6 +392,10 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:touch-mode">
|
||||
<Setter Property="ContextFlyout" Value="{StaticResource HorizontalTextBoxContextFlyout}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxPointeroverBorderBrush}" />
|
||||
@@ -526,7 +554,6 @@
|
||||
Name="PART_Placeholder"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Opacity="0.5"
|
||||
Foreground="{TemplateBinding PlaceholderForeground}"
|
||||
Text="{TemplateBinding PlaceholderText}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
@@ -573,6 +600,10 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:touch-mode">
|
||||
<Setter Property="ContextFlyout" Value="{StaticResource HorizontalTextBoxContextFlyout}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBoxDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
|
||||
<Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
|
||||
<Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
|
||||
<VisualLayerManager>
|
||||
<VisualLayerManager Name="PART_VisualLayerManager">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<Setter Property="Padding" Value="{StaticResource CaptionButtonPadding}" />
|
||||
<Setter Property="Width" Value="{StaticResource CaptionButtonWidth}" />
|
||||
<Setter Property="Height" Value="{StaticResource CaptionButtonHeight}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="WindowDecorationProperties.ElementRole" Value="DecorationsElement" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
@@ -39,6 +38,10 @@
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonDisabledForeground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type WindowDrawnDecorations}" TargetType="WindowDrawnDecorations">
|
||||
@@ -50,14 +53,13 @@
|
||||
<WindowDrawnDecorationsContent>
|
||||
<WindowDrawnDecorationsContent.Underlay>
|
||||
<!-- Full-size: covers shadow area + frame + behind client area -->
|
||||
<Panel>
|
||||
<Panel Name="PART_UnderlayWrapper">
|
||||
<Border
|
||||
Name="PART_WindowBorder"
|
||||
Margin="{TemplateBinding ShadowThickness}"
|
||||
Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="{DynamicResource WindowBorderBrush}"
|
||||
BorderThickness="1"
|
||||
BoxShadow="{DynamicResource WindowBorderShadow}" />
|
||||
BorderThickness="{TemplateBinding FrameThickness}"
|
||||
IsHitTestVisible="False" />
|
||||
<!-- Titlebar: background, title text, and drag area live in underlay -->
|
||||
<Panel Name="PART_TitleBar"
|
||||
VerticalAlignment="Top"
|
||||
@@ -81,7 +83,6 @@
|
||||
<TextBlock
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Text="{TemplateBinding Title}" />
|
||||
</Panel>
|
||||
<StackPanel
|
||||
@@ -90,9 +91,7 @@
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{TemplateBinding HasTitleBar}"
|
||||
Orientation="Horizontal"
|
||||
Spacing="2"
|
||||
TextElement.FontSize="10">
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="PART_FullScreenButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
@@ -120,8 +119,9 @@
|
||||
<WindowDrawnDecorationsContent.FullscreenPopover>
|
||||
<!-- Shown on hover at top edge in fullscreen -->
|
||||
<DockPanel
|
||||
Height="{TemplateBinding TitleBarHeight}"
|
||||
Height="{TemplateBinding DefaultTitleBarHeight}"
|
||||
Background="{DynamicResource TitleBarBackground}"
|
||||
VerticalAlignment="Top"
|
||||
WindowDecorationProperties.ElementRole="TitleBar">
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<Button
|
||||
@@ -136,7 +136,7 @@
|
||||
WindowDecorationProperties.ElementRole="CloseButton" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="12,0"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{TemplateBinding Title}" />
|
||||
</DockPanel>
|
||||
@@ -187,6 +187,20 @@
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Hide caption buttons when the platform does not support the action -->
|
||||
<Style Selector="^:not(:has-minimize) /template/ Button#PART_MinimizeButton">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
</Style>
|
||||
<Style Selector="^:not(:has-maximize) /template/ Button#PART_MaximizeButton">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
</Style>
|
||||
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_FullScreenButton">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
</Style>
|
||||
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_PopoverFullScreenButton">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<!-- Fullscreen: hide overlay and titlebar (popover takes over) -->
|
||||
<Style Selector="^:fullscreen">
|
||||
<Style Selector="^ /template/ Panel#PART_TitleTextPanel">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<ResourceInclude Source="Calendar.axaml" />
|
||||
<ResourceInclude Source="CalendarDatePicker.axaml" />
|
||||
<ResourceInclude Source="Carousel.axaml" />
|
||||
<ResourceInclude Source="CarouselPage.axaml" />
|
||||
<ResourceInclude Source="CheckBox.axaml" />
|
||||
<ResourceInclude Source="ComboBox.axaml" />
|
||||
<ResourceInclude Source="CommandBar.axaml" />
|
||||
@@ -37,6 +38,7 @@
|
||||
<ResourceInclude Source="NumericUpDown.axaml" />
|
||||
<ResourceInclude Source="NavigationPage.axaml" />
|
||||
<ResourceInclude Source="PathIcon.axaml" />
|
||||
<ResourceInclude Source="PipsPager.axaml" />
|
||||
<ResourceInclude Source="Popup.axaml" />
|
||||
<ResourceInclude Source="ProgressBar.axaml" />
|
||||
<ResourceInclude Source="RadioButton.axaml" />
|
||||
|
||||
@@ -4,17 +4,18 @@
|
||||
<Styles.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceInclude x:Key="Default" Source="/Schemes/LightScheme.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="/Schemes/DarkScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="/Schemes/AquaticScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="/Schemes/DesertScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="/Schemes/DuskScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="/Schemes/NightSkyScheme.axaml" />
|
||||
<ResourceInclude x:Key="Default" Source="/Themes/Light/_index.axaml" />
|
||||
<ResourceInclude x:Key="Light" Source="/Themes/Light/_index.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="/Themes/Dark/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Controls/_index.axaml" />
|
||||
<ResourceInclude Source="/Themes/Shared/_index.axaml" />
|
||||
<ResourceInclude Source="/Tokens/Variables.axaml" />
|
||||
<ResourceInclude Source="/Tokens/_index.axaml" />
|
||||
<ResourceInclude Source="/Locale/zh-cn.axaml" />
|
||||
<semi:Icons />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
[assembly: XmlnsPrefix("https://irihi.tech/semi", "semi")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.Converters")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.Converters")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.Tokens")]
|
||||
[assembly: XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia.Tokens.Palette")]
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/HighContrast/Aquatic.axaml" />
|
||||
<ResourceInclude Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/Palette/Dark.axaml" />
|
||||
<ResourceInclude Source="/Themes/Dark/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/HighContrast/Desert.axaml" />
|
||||
<ResourceInclude Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/HighContrast/Dusk.axaml" />
|
||||
<ResourceInclude Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/Palette/Light.axaml" />
|
||||
<ResourceInclude Source="/Themes/Light/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Tokens/HighContrast/NightSky.axaml" />
|
||||
<ResourceInclude Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.0-preview2</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 12.0.0-preview2</PackageReleaseNotes>
|
||||
<Version>12.0.0-rc2</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 12.0.0-rc2</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -5,19 +5,20 @@
|
||||
<Styles.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceInclude x:Key="Default" Source="/Schemes/LightScheme.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="/Schemes/DarkScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="/Schemes/AquaticScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="/Schemes/DesertScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="/Schemes/DuskScheme.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="/Schemes/NightSkyScheme.axaml" />
|
||||
<ResourceInclude x:Key="Default" Source="/Themes/Light/_index.axaml" />
|
||||
<ResourceInclude x:Key="Light" Source="/Themes/Light/_index.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="/Themes/Dark/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="/Themes/HighContrast/_index.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="/Controls/_index.axaml" />
|
||||
<ResourceInclude Source="/Themes/Shared/_index.axaml" />
|
||||
<ResourceInclude Source="/Tokens/Variables.axaml" />
|
||||
<ResourceInclude Source="/Tokens/_index.axaml" />
|
||||
<ResourceInclude Source="/Locale/zh-cn.axaml" />
|
||||
<ResourceInclude Source="/Icons/_index.axaml" />
|
||||
<semi:Icons />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Styles.Resources>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Styling;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
using Semi.Avalonia.Locale;
|
||||
|
||||
namespace Semi.Avalonia;
|
||||
@@ -36,43 +37,27 @@ public class SemiTheme : Styles
|
||||
|
||||
private static readonly ResourceDictionary DefaultResource = new zh_cn();
|
||||
|
||||
private CultureInfo? _locale;
|
||||
|
||||
public CultureInfo? Locale
|
||||
{
|
||||
get => _locale;
|
||||
get;
|
||||
set
|
||||
{
|
||||
try
|
||||
{
|
||||
if (TryGetLocaleResource(value, out var resource) && resource is not null)
|
||||
{
|
||||
_locale = value;
|
||||
if (Resources is ResourceDictionary rd)
|
||||
{
|
||||
rd.SetItems(resource);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var kv in resource) Resources[kv.Key] = kv.Value;
|
||||
}
|
||||
field = value;
|
||||
Resources.BulkSetResources(resource);
|
||||
}
|
||||
else
|
||||
{
|
||||
_locale = new CultureInfo("zh-CN");
|
||||
if (Resources is ResourceDictionary rd)
|
||||
{
|
||||
rd.SetItems(DefaultResource);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var kv in DefaultResource) Resources[kv.Key] = kv.Value;
|
||||
}
|
||||
field = new CultureInfo("zh-CN");
|
||||
Resources.BulkSetResources(DefaultResource);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
_locale = CultureInfo.InvariantCulture;
|
||||
field = CultureInfo.InvariantCulture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,28 +90,13 @@ public class SemiTheme : Styles
|
||||
{
|
||||
if (culture is null) return;
|
||||
if (!LocaleToResource.TryGetValue(culture, out var resources)) return;
|
||||
|
||||
if (application.Resources is ResourceDictionary rd)
|
||||
{
|
||||
rd.SetItems(resources);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var kv in resources) application.Resources[kv.Key] = kv.Value;
|
||||
}
|
||||
application.Resources.BulkSetResources(resources);
|
||||
}
|
||||
|
||||
public static void OverrideLocaleResources(StyledElement element, CultureInfo? culture)
|
||||
{
|
||||
if (culture is null) return;
|
||||
if (!LocaleToResource.TryGetValue(culture, out var resources)) return;
|
||||
if (element.Resources is ResourceDictionary rd)
|
||||
{
|
||||
rd.SetItems(resources);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var kv in resources) element.Resources[kv.Key] = kv.Value;
|
||||
}
|
||||
element.Resources.BulkSetResources(resources);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,18 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryLightActive" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorPrimaryDisabled" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBarButton / CommandBarToggleButton -->
|
||||
<SolidColorBrush x:Key="CommandBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="CommandBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="CommandBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="CommandBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="CommandBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- CommandBarToggleButton checked state -->
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryLightActive" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorPrimaryDisabled" />
|
||||
<!-- CommandBarSeparator -->
|
||||
<StaticResource x:Key="CommandBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorBackground1" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorText0" />
|
||||
|
||||
9
src/Semi.Avalonia/Themes/Dark/PipsPager.axaml
Normal file
9
src/Semi.Avalonia/Themes/Dark/PipsPager.axaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="PipsPagerButtonForeground" Opacity="0.5" Color="{StaticResource SemiWhiteColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerButtonPointeroverForeground" Color="{StaticResource SemiWhiteColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorForeground" Opacity="0.5" Color="{StaticResource SemiWhiteColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorPointeroverForeground" Opacity="0.7" Color="{StaticResource SemiWhiteColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorPressedForeground" Color="{StaticResource SemiWhiteColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorSelectedForeground" Color="{StaticResource SemiWhiteColor}" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,7 +2,6 @@
|
||||
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorText0" />
|
||||
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
|
||||
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ProgressBarSecondaryForeground" ResourceKey="SemiColorSecondary" />
|
||||
|
||||
@@ -19,4 +19,7 @@
|
||||
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
|
||||
<StaticResource x:Key="TabItemIconSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="TabItemHeaderDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,5 +7,6 @@
|
||||
<StaticResource x:Key="CaptionButtonCloseForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="CaptionButtonClosePointeroverBackground" ResourceKey="SemiColorDangerPointerover" />
|
||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
</ResourceDictionary>
|
||||
@@ -29,6 +29,7 @@
|
||||
<ResourceInclude Source="NotificationCard.axaml" />
|
||||
<ResourceInclude Source="NavigationPage.axaml" />
|
||||
<ResourceInclude Source="NumericUpDown.axaml" />
|
||||
<ResourceInclude Source="PipsPager.axaml" />
|
||||
<ResourceInclude Source="ProgressBar.axaml" />
|
||||
<ResourceInclude Source="RadioButton.axaml" />
|
||||
<ResourceInclude Source="RefreshContainer.axaml" />
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorButtonText" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorButtonFace" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorWindowText" />
|
||||
<!-- CommandBarButton / CommandBarToggleButton -->
|
||||
<SolidColorBrush x:Key="CommandBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="CommandBarButtonForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="CommandBarButtonPointeroverBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="CommandBarButtonPressedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="CommandBarButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
<!-- CommandBarToggleButton checked state -->
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedForeground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedBackground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorButtonText" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorButtonFace" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
<!-- CommandBarSeparator -->
|
||||
<StaticResource x:Key="CommandBarSeparatorBackground" ResourceKey="SemiColorWindowText" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorWindow" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorWindowText" />
|
||||
|
||||
4
src/Semi.Avalonia/Themes/HighContrast/PipsPager.axaml
Normal file
4
src/Semi.Avalonia/Themes/HighContrast/PipsPager.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 -->
|
||||
</ResourceDictionary>
|
||||
@@ -2,7 +2,6 @@
|
||||
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="ProgressBarRootBorderBrush" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorHighlight" />
|
||||
</ResourceDictionary>
|
||||
@@ -19,4 +19,7 @@
|
||||
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorHighlightText" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorHighlightText" />
|
||||
|
||||
<StaticResource x:Key="TabItemIconSelectedForeground" ResourceKey="SemiColorHighlight" />
|
||||
<StaticResource x:Key="TabItemHeaderDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,4 +7,5 @@
|
||||
<StaticResource x:Key="CaptionButtonClosePointeroverBackground" ResourceKey="SemiColorHotlight" />
|
||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorHotlight" />
|
||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorWindowText" />
|
||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||
</ResourceDictionary>
|
||||
@@ -29,6 +29,7 @@
|
||||
<ResourceInclude Source="NavigationPage.axaml" />
|
||||
<ResourceInclude Source="NotificationCard.axaml" />
|
||||
<ResourceInclude Source="NumericUpDown.axaml" />
|
||||
<ResourceInclude Source="PipsPager.axaml" />
|
||||
<ResourceInclude Source="ProgressBar.axaml" />
|
||||
<ResourceInclude Source="RadioButton.axaml" />
|
||||
<ResourceInclude Source="RefreshContainer.axaml" />
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<SolidColorBrush x:Key="AppBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="AppBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AppBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="AppBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="AppBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- AppBarToggleButton checked state -->
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryLightActive" />
|
||||
<StaticResource x:Key="AppBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorPrimaryDisabled" />
|
||||
<!-- AppBarSeparator -->
|
||||
<StaticResource x:Key="AppBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBarButton / CommandBarToggleButton -->
|
||||
<SolidColorBrush x:Key="CommandBarButtonBackground" Color="Transparent" />
|
||||
<StaticResource x:Key="CommandBarButtonForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="CommandBarButtonPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="CommandBarButtonPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="CommandBarButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
<!-- CommandBarToggleButton checked state -->
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPointeroverBackground" ResourceKey="SemiColorPrimaryLightPointerover" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedPressedBackground" ResourceKey="SemiColorPrimaryLightActive" />
|
||||
<StaticResource x:Key="CommandBarToggleButtonCheckedDisabledForeground" ResourceKey="SemiColorPrimaryDisabled" />
|
||||
<!-- CommandBarSeparator -->
|
||||
<StaticResource x:Key="CommandBarSeparatorBackground" ResourceKey="SemiColorBorder" />
|
||||
<!-- CommandBar -->
|
||||
<StaticResource x:Key="CommandBarBackground" ResourceKey="SemiColorBackground1" />
|
||||
<StaticResource x:Key="CommandBarForeground" ResourceKey="SemiColorText0" />
|
||||
|
||||
9
src/Semi.Avalonia/Themes/Light/PipsPager.axaml
Normal file
9
src/Semi.Avalonia/Themes/Light/PipsPager.axaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="PipsPagerButtonForeground" Opacity="0.5" Color="{StaticResource SemiBlackColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerButtonPointeroverForeground" Color="{StaticResource SemiBlackColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorForeground" Opacity="0.5" Color="{StaticResource SemiBlackColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorPointeroverForeground" Opacity="0.7" Color="{StaticResource SemiBlackColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorPressedForeground" Color="{StaticResource SemiBlackColor}" />
|
||||
<SolidColorBrush x:Key="PipsPagerIndicatorSelectedForeground" Color="{StaticResource SemiBlackColor}" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,7 +2,6 @@
|
||||
<StaticResource x:Key="ProgressBarIndicatorBrush" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="ProgressBarTextForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="ProgressBarOuterTextForeground" ResourceKey="SemiColorText0" />
|
||||
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
|
||||
<StaticResource x:Key="ProgressBarPrimaryForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="ProgressBarSecondaryForeground" ResourceKey="SemiColorSecondary" />
|
||||
|
||||
@@ -19,4 +19,7 @@
|
||||
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||
|
||||
<StaticResource x:Key="TabItemIconSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="TabItemHeaderDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
</ResourceDictionary>
|
||||
@@ -7,5 +7,6 @@
|
||||
<StaticResource x:Key="CaptionButtonCloseForeground" ResourceKey="SemiColorWhite" />
|
||||
<StaticResource x:Key="CaptionButtonClosePointeroverBackground" ResourceKey="SemiColorDangerPointerover" />
|
||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||
</ResourceDictionary>
|
||||
@@ -29,6 +29,7 @@
|
||||
<ResourceInclude Source="NotificationCard.axaml" />
|
||||
<ResourceInclude Source="NavigationPage.axaml" />
|
||||
<ResourceInclude Source="NumericUpDown.axaml" />
|
||||
<ResourceInclude Source="PipsPager.axaml" />
|
||||
<ResourceInclude Source="ProgressBar.axaml" />
|
||||
<ResourceInclude Source="RadioButton.axaml" />
|
||||
<ResourceInclude Source="RefreshContainer.axaml" />
|
||||
|
||||
@@ -3,4 +3,10 @@
|
||||
<StaticResource x:Key="ButtonSpinnerDecreaseButtonGlyph" ResourceKey="SemiIconChevronDown" />
|
||||
<StaticResource x:Key="ButtonSpinnerButtonGroupCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="ButtonSpinnerButtonGroupBorderThickness" ResourceKey="SemiBorderThicknessControl" />
|
||||
|
||||
<StaticResource x:Key="SplitButtonSpinnerIncreaseButtonGlyph" ResourceKey="SemiIconPlus" />
|
||||
<StaticResource x:Key="SplitButtonSpinnerDecreaseButtonGlyph" ResourceKey="SemiIconMinus" />
|
||||
<CornerRadius x:Key="SplitButtonSpinnerLeftButtonCornerRadius">3 0 0 3</CornerRadius>
|
||||
<CornerRadius x:Key="SplitButtonSpinnerRightButtonCornerRadius">0 3 3 0</CornerRadius>
|
||||
<Thickness x:Key="SplitButtonSpinnerButtonPadding">8 0</Thickness>
|
||||
</ResourceDictionary>
|
||||
@@ -1,20 +1,20 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- AppBarButton / AppBarToggleButton -->
|
||||
<x:Double x:Key="AppBarButtonWidth">64</x:Double>
|
||||
<x:Double x:Key="AppBarButtonCompactWidth">40</x:Double>
|
||||
<x:Double x:Key="AppBarButtonMinHeight">40</x:Double>
|
||||
<Thickness x:Key="AppBarButtonPadding">8 4</Thickness>
|
||||
<x:Double x:Key="AppBarButtonPanelSpacing">4</x:Double>
|
||||
<StaticResource x:Key="AppBarButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="AppBarButtonLabelFontSize" ResourceKey="SemiFontSizeSmall" />
|
||||
<x:Double x:Key="AppBarButtonOverflowMinHeight">36</x:Double>
|
||||
<Thickness x:Key="AppBarButtonOverflowPadding">12 6</Thickness>
|
||||
<!-- AppBarSeparator -->
|
||||
<x:Double x:Key="AppBarSeparatorWidth">1</x:Double>
|
||||
<x:Double x:Key="AppBarSeparatorMinHeight">24</x:Double>
|
||||
<Thickness x:Key="AppBarSeparatorMargin">8 4</Thickness>
|
||||
<x:Double x:Key="AppBarSeparatorOverflowHeight">1</x:Double>
|
||||
<Thickness x:Key="AppBarSeparatorOverflowMargin">4 4</Thickness>
|
||||
<!-- CommandBarButton / CommandBarToggleButton -->
|
||||
<x:Double x:Key="CommandBarButtonWidth">64</x:Double>
|
||||
<x:Double x:Key="CommandBarButtonCompactWidth">40</x:Double>
|
||||
<x:Double x:Key="CommandBarButtonMinHeight">40</x:Double>
|
||||
<Thickness x:Key="CommandBarButtonPadding">8 4</Thickness>
|
||||
<x:Double x:Key="CommandBarButtonPanelSpacing">4</x:Double>
|
||||
<StaticResource x:Key="CommandBarButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="CommandBarButtonLabelFontSize" ResourceKey="SemiFontSizeSmall" />
|
||||
<x:Double x:Key="CommandBarButtonOverflowMinHeight">36</x:Double>
|
||||
<Thickness x:Key="CommandBarButtonOverflowPadding">12 6</Thickness>
|
||||
<!-- CommandBarSeparator -->
|
||||
<x:Double x:Key="CommandBarSeparatorWidth">1</x:Double>
|
||||
<x:Double x:Key="CommandBarSeparatorMinHeight">24</x:Double>
|
||||
<Thickness x:Key="CommandBarSeparatorMargin">8 4</Thickness>
|
||||
<x:Double x:Key="CommandBarSeparatorOverflowHeight">1</x:Double>
|
||||
<Thickness x:Key="CommandBarSeparatorOverflowMargin">4 4</Thickness>
|
||||
<!-- CommandBar -->
|
||||
<x:Double x:Key="CommandBarMinHeight">48</x:Double>
|
||||
<Thickness x:Key="CommandBarPadding">4 0</Thickness>
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
<x:Double x:Key="FlyoutMaxWidth">600</x:Double>
|
||||
<StaticResource x:Key="FlyoutCornerRadius" ResourceKey="SemiBorderRadiusMedium" />
|
||||
<StaticResource x:Key="FlyoutPadding" ResourceKey="SemiThicknessTight" />
|
||||
<StaticResource x:Key="HorizontalMenuFlyoutThemeMinWidth" ResourceKey="SemiSpacingExtraLoose" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,4 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="TabItemIconHeaderSpacing" ResourceKey="SemiSpacingTight" />
|
||||
<StaticResource x:Key="TabItemSelectedFontWeight" ResourceKey="SemiFontWeightBold" />
|
||||
<StaticResource x:Key="TabItemCardDefaultHeight" ResourceKey="SemiHeightControlDefault" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,10 +1,15 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StreamGeometry 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</StreamGeometry>
|
||||
<StreamGeometry x:Key="WindowMaximizeGlyph">M4,4H20V20H4V4M6,8V18H18V8H6Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="WindowMinimizeGlyph">M20,14H4V10H20</StreamGeometry>
|
||||
<StreamGeometry x:Key="WindowRestoreGlyph">M4,8H8V4H20V16H16V20H4V8M16,8V14H18V6H10V8H16M6,12V18H14V12H6Z</StreamGeometry>
|
||||
<StreamGeometry 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</StreamGeometry>
|
||||
<StreamGeometry 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</StreamGeometry>
|
||||
<StaticResource x:Key="WindowCloseIconGlyph" ResourceKey="SemiIconClose" />
|
||||
<StaticResource x:Key="WindowMinimizeGlyph" ResourceKey="SemiIconMinus" />
|
||||
<StaticResource x:Key="WindowExpandGlyph" ResourceKey="SemiIconExpand" />
|
||||
<StaticResource x:Key="WindowCollapseGlyph" ResourceKey="SemiIconShrink" />
|
||||
|
||||
<StreamGeometry x:Key="WindowMaximizeGlyph">
|
||||
M5 5.5A.5.5 0 015.5 5h13a.5.5 0 01.5.5v13a.5.5 0 01-.5.5H5.5A.5.5 0 015 18.5V5.5Zm-3 0v13A3.5 3.5 0 005.5 22h13A3.5 3.5 0 0022 18.5V5A3.5 3.5 0 0018.5 2H5.5A3.5 3.5 0 002 5.5Z
|
||||
</StreamGeometry>
|
||||
<StreamGeometry x:Key="WindowRestoreGlyph">
|
||||
M3 9A2 2 0 015 7H15a2 2 0 012 2V19a2 2 0 01-2 2H5A2 2 0 013 19V9Zm3 1v8h8V10H6ZM7 4c0-1.1.9-2 2-2h11a2 2 0 012 2v11a2 2 0 01-2 2h-1V5H7V4Z
|
||||
</StreamGeometry>
|
||||
|
||||
<StaticResource x:Key="CaptionButtonCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
<StaticResource x:Key="CaptionButtonWidth" ResourceKey="SemiSpacingExtraLoose" />
|
||||
|
||||
16
src/Semi.Avalonia/Tokens/_index.axaml
Normal file
16
src/Semi.Avalonia/Tokens/_index.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<semi:Light x:Key="Default" />
|
||||
<semi:Light x:Key="Light" />
|
||||
<semi:Dark x:Key="Dark" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="HighContrast/Aquatic.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="HighContrast/Desert.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="HighContrast/Dusk.axaml" />
|
||||
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="HighContrast/NightSky.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<semi:Variables />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user