mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
689fbd15b2 | ||
|
|
bf2012cc80 | ||
|
|
ddc104eb71 | ||
|
|
d11963a0af | ||
|
|
4105a38a38 | ||
|
|
e9be042a8d | ||
|
|
f9fd288046 | ||
|
|
ef57fa70f9 | ||
|
|
bb1abd972f | ||
|
|
0492f4be73 | ||
|
|
a691e9c732 | ||
|
|
7a5849ebbb | ||
|
|
ff81cd3258 | ||
|
|
ae5655595b |
11
.github/workflows/deploy.yml
vendored
11
.github/workflows/deploy.yml
vendored
@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
|
||||
|
||||
env:
|
||||
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
||||
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net10.0-browser/publish/wwwroot
|
||||
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net8.0-browser/publish/wwwroot
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -11,13 +11,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v5
|
||||
- name: Setup .NET 8
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
10.0.x
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Install wasm-tools
|
||||
run: dotnet workload install wasm-tools
|
||||
|
||||
2
.github/workflows/pack-nightly.yml
vendored
2
.github/workflows/pack-nightly.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
|
||||
2
.github/workflows/pack.yml
vendored
2
.github/workflows/pack.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Pack Semi.Avalonia
|
||||
if: ${{ inputs.Semi_Avalonia }}
|
||||
|
||||
26
.github/workflows/publish.yml
vendored
26
.github/workflows/publish.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -159,7 +159,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -177,7 +177,7 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4.2.2
|
||||
- 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
|
||||
@@ -211,13 +211,13 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
- name: Install Android workload
|
||||
run: dotnet workload install android
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: CD Android
|
||||
run: cd demo/Semi.Avalonia.Demo.Android
|
||||
- name: Restore Dependencies
|
||||
run: dotnet restore demo/Semi.Avalonia.Demo.Android
|
||||
run: dotnet restore
|
||||
- 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
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o publish /p:RuntimeIdentifier=android-arm64
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="avalonia-nightly" value="https://nuget-feed-nightly.avaloniaui.net/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
13
README.md
13
README.md
@@ -75,12 +75,13 @@ We offer limited free community support for Semi Avalonia and Ursa. If you have
|
||||
|
||||
## Version compatibility
|
||||
|
||||
| Semi Avalonia Version | Avalonia Version |
|
||||
|:----------------------|:-----------------|
|
||||
| 11.3.7 | >=11.3.7 |
|
||||
| 11.2.1 | >=11.2.1 |
|
||||
| 11.2.0 | End of Life |
|
||||
| 11.1.x | End of Life |
|
||||
| Semi Design Version | Avalonia Version |
|
||||
|:--------------------|:-----------------|
|
||||
| 11.2.1 | >=11.2.1 |
|
||||
| 11.2.0 | 11.2.0 |
|
||||
| 11.1.0 | >=11.1.0 |
|
||||
| 11.0.7 | >=11.0.7 |
|
||||
| 11.0.1 | <=11.0.6 |
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
13
README_CN.md
13
README_CN.md
@@ -75,12 +75,13 @@ dotnet add package Semi.Avalonia.AvaloniaEdit
|
||||
|
||||
## 版本兼容性
|
||||
|
||||
| Semi Avalonia Version | Avalonia Version |
|
||||
|:----------------------|:-----------------|
|
||||
| 11.3.7 | >=11.3.7 |
|
||||
| 11.2.1 | >=11.2.1 |
|
||||
| 11.2.0 | End of Life |
|
||||
| 11.1.x | End of Life |
|
||||
| Semi Design Version | Avalonia Version |
|
||||
|:--------------------|:-----------------|
|
||||
| 11.2.1 | >=11.2.1 |
|
||||
| 11.2.0 | 11.2.0 |
|
||||
| 11.1.0 | >=11.1.0 |
|
||||
| 11.0.7 | >=11.0.7 |
|
||||
| 11.0.1 | <=11.0.6 |
|
||||
|
||||
## 致谢
|
||||
|
||||
|
||||
99
Semi.Avalonia.sln
Normal file
99
Semi.Avalonia.sln
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32929.385
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia", "src\Semi.Avalonia\Semi.Avalonia.csproj", "{90D0B063-BC64-40AB-A56C-AC11909CF410}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{B1E6A7D4-0AFB-4D32-9969-5FBDAC0CFF3E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
demo\Directory.Build.props = demo\Directory.Build.props
|
||||
demo\global.json = demo\global.json
|
||||
src\Package.props = src\Package.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Action", "GitHub Action", "{318534A1-1CC3-40FB-B4AE-736F94465232}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\workflows\deploy.yml = .github\workflows\deploy.yml
|
||||
.github\workflows\pack.yml = .github\workflows\pack.yml
|
||||
.github\workflows\pack-nightly.yml = .github\workflows\pack-nightly.yml
|
||||
.github\workflows\publish.yml = .github\workflows\publish.yml
|
||||
.github\workflows\release-tag.yml = .github\workflows\release-tag.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Desktop", "demo\Semi.Avalonia.Demo.Desktop\Semi.Avalonia.Demo.Desktop.csproj", "{2ADCA724-2B6D-46EC-87F7-604D7918B89A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Web", "demo\Semi.Avalonia.Demo.Web\Semi.Avalonia.Demo.Web.csproj", "{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Android", "demo\Semi.Avalonia.Demo.Android\Semi.Avalonia.Demo.Android.csproj", "{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.Demo.Drm", "demo\Semi.Avalonia.Demo.Drm\Semi.Avalonia.Demo.Drm.csproj", "{86D93406-412A-4429-93B2-92AAD0407784}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.TreeDataGrid", "src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj", "{398D2998-0835-41F5-99A3-608CAB8051E2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{86D93406-412A-4429-93B2-92AAD0407784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{86D93406-412A-4429-93B2-92AAD0407784}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{86D93406-412A-4429-93B2-92AAD0407784}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{86D93406-412A-4429-93B2-92AAD0407784}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{398D2998-0835-41F5-99A3-608CAB8051E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{398D2998-0835-41F5-99A3-608CAB8051E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{398D2998-0835-41F5-99A3-608CAB8051E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{398D2998-0835-41F5-99A3-608CAB8051E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||
{86D93406-412A-4429-93B2-92AAD0407784} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,28 +0,0 @@
|
||||
<Solution>
|
||||
<Folder Name="/Demo/">
|
||||
<Project Path="demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj"/>
|
||||
<Project Path="demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj"/>
|
||||
<Project Path="demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj"/>
|
||||
<Project Path="demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj"/>
|
||||
<Project Path="demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj"/>
|
||||
</Folder>
|
||||
<Folder Name="/GitHub Action/">
|
||||
<File Path=".github/workflows/deploy.yml"/>
|
||||
<File Path=".github/workflows/pack-nightly.yml"/>
|
||||
<File Path=".github/workflows/pack.yml"/>
|
||||
<File Path=".github/workflows/publish.yml"/>
|
||||
<File Path=".github/workflows/release-tag.yml"/>
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/Demo/">
|
||||
<File Path="demo/Directory.Packages.props"/>
|
||||
<File Path="demo/global.json"/>
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/Package/">
|
||||
<File Path="src/Directory.Packages.props"/>
|
||||
<File Path="src/Directory.Build.props"/>
|
||||
</Folder>
|
||||
<Project Path="src/Semi.Avalonia.ColorPicker/Semi.Avalonia.ColorPicker.csproj"/>
|
||||
<Project Path="src/Semi.Avalonia.DataGrid/Semi.Avalonia.DataGrid.csproj"/>
|
||||
<Project Path="src/Semi.Avalonia.TreeDataGrid/Semi.Avalonia.TreeDataGrid.csproj"/>
|
||||
<Project Path="src/Semi.Avalonia/Semi.Avalonia.csproj"/>
|
||||
</Solution>
|
||||
7
demo/Directory.Build.props
Normal file
7
demo/Directory.Build.props
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AvaloniaVersion>12.0.999-cibuild0058575-alpha</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.0</DataGridVersion>
|
||||
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.999-cibuild0061987-alpha</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.10</DataGridVersion>
|
||||
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<!-- <PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />-->
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
|
||||
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
|
||||
|
||||
<PackageVersion Include="SkiaSharp" Version="$(SkiaSharpVersion)"/>
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.WebAssembly" Version="$(SkiaSharpVersion)"/>
|
||||
|
||||
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0"/>
|
||||
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
|
||||
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.3.1"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,16 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Android;
|
||||
|
||||
public static class AvaloniaAppBuilderExtensions
|
||||
{
|
||||
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Android/Assets#Source Han Sans CN";
|
||||
|
||||
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
|
||||
builder.With(new FontManagerOptions
|
||||
{
|
||||
DefaultFamilyName = DefaultFontFamily,
|
||||
FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }]
|
||||
});
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 7.1 KiB |
@@ -1,6 +1,5 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Avalonia;
|
||||
using Avalonia.Android;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Android;
|
||||
@@ -12,11 +11,6 @@ namespace Semi.Avalonia.Demo.Android;
|
||||
MainLauncher = true,
|
||||
LaunchMode = LaunchMode.SingleTop,
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
|
||||
public class MainActivity : AvaloniaMainActivity
|
||||
public class MainActivity : AvaloniaMainActivity<App>
|
||||
{
|
||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||
{
|
||||
return base.CustomizeAppBuilder(builder)
|
||||
.WithSourceHanSansCNFont();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0-android</TargetFramework>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
||||
@@ -14,13 +14,14 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Icon.png" Link="Resources\drawable\Icon.png"/>
|
||||
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
|
||||
<AndroidResource Include="Icon.png">
|
||||
<Link>Resources\drawable\Icon.png</Link>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Android"/>
|
||||
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen"/>
|
||||
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.1"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||
<!-- Uncomment below to enable Native AOT compilation-->
|
||||
<!--<PublishAot>true</PublishAot>-->
|
||||
</PropertyGroup>
|
||||
@@ -23,7 +22,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||
<!-- Uncomment below to enable Native AOT compilation-->
|
||||
<!--<PublishAot>true</PublishAot>-->
|
||||
</PropertyGroup>
|
||||
@@ -23,8 +22,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
<PackageReference Include="Avalonia.LinuxFramebuffer"/>
|
||||
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0-browser</TargetFramework>
|
||||
<TargetFramework>net8.0-browser</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
|
||||
<AvaloniaResource Include="Assets\**"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Browser"/>
|
||||
<PackageReference Include="SkiaSharp"/>
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly"/>
|
||||
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Application
|
||||
Name="Semi Avalonia Demo"
|
||||
x:Class="Semi.Avalonia.Demo.App"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:ApplicationViewModel"
|
||||
xmlns:semi="https://irihi.tech/semi"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
x:DataType="vm:ApplicationViewModel">
|
||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels">
|
||||
<Application.Styles>
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:SemiPopupAnimations />
|
||||
@@ -20,30 +20,12 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
<NativeMenu.Menu>
|
||||
<NativeMenu>
|
||||
<NativeMenuItem
|
||||
Header="About Us"
|
||||
Command="{Binding JumpToCommand}"
|
||||
CommandParameter="{Binding $self.Header}" />
|
||||
</NativeMenu>
|
||||
</NativeMenu.Menu>
|
||||
<TrayIcon.Icons>
|
||||
<TrayIcons>
|
||||
<TrayIcon
|
||||
Icon="{OnPlatform Default=/Assets/irihi.ico, macOS=/Assets/irihi2.ico}"
|
||||
MacOSProperties.IsTemplateIcon="true"
|
||||
Command="{Binding ActivateCommand}"
|
||||
ToolTipText="Semi Avalonia Demo">
|
||||
<TrayIcon Icon="/Assets/irihi.ico" MacOSProperties.IsTemplateIcon="true" ToolTipText="Semi Avalonia Demo">
|
||||
<TrayIcon.Menu>
|
||||
<NativeMenu>
|
||||
<NativeMenuItem
|
||||
Header="About Us"
|
||||
Command="{Binding JumpToCommand}"
|
||||
CommandParameter="{Binding $self.Header}" />
|
||||
<NativeMenuItem
|
||||
Header="Exit"
|
||||
Command="{Binding ExitCommand}" />
|
||||
<NativeMenuItem Header="Exit" Command="{Binding ExitCommand}" />
|
||||
</NativeMenu>
|
||||
</TrayIcon.Menu>
|
||||
</TrayIcon>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 948 B |
@@ -79,32 +79,6 @@ public static class ColorTokens
|
||||
new("SemiColorDangerLightActive", "Danger Light Active")
|
||||
];
|
||||
|
||||
public static IReadOnlyList<Tuple<string, string>> AIGeneralTokens { get; } =
|
||||
[
|
||||
new("SemiColorAIGeneral", "AI General"),
|
||||
new("SemiColorAIGeneralPointerover", "AI General Pointerover"),
|
||||
new("SemiColorAIGeneralActive", "AI General Active"),
|
||||
new("SemiColorAIGeneralDisabled", "AI General Disabled")
|
||||
];
|
||||
|
||||
public static IReadOnlyList<Tuple<string, string>> AIPurpleTokens { get; } =
|
||||
[
|
||||
new("SemiColorAIPurple", "AI Purple"),
|
||||
new("SemiColorAIPurplePointerover", "AI Purple Pointerover"),
|
||||
new("SemiColorAIPurpleActive", "AI Purple Active"),
|
||||
new("SemiColorAIPurpleDisabled", "AI Purple Disabled")
|
||||
];
|
||||
|
||||
public static IReadOnlyList<Tuple<string, string>> AIBackgroundTokens { get; } =
|
||||
[
|
||||
new("SemiColorAIBackgroundBottom", "AI Bottom Background"),
|
||||
new("SemiColorAIBackgroundBottomPointerover", "AI Bottom Background Pointerover"),
|
||||
new("SemiColorAIBackgroundBottomActive", "AI Bottom Background Active"),
|
||||
new("SemiColorAIBackgroundTop", "AI Top Background"),
|
||||
new("SemiColorAIBackgroundTopPointerover", "AI Top Background Pointerover"),
|
||||
new("SemiColorAIBackgroundTopActive", "AI Top Background Active"),
|
||||
];
|
||||
|
||||
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } =
|
||||
[
|
||||
new("SemiColorText0", "Text 0"),
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Threading.Tasks;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Media;
|
||||
using Semi.Avalonia.Demo.Converters;
|
||||
|
||||
@@ -93,12 +92,6 @@ public class ColorDetailControl : TemplatedControl
|
||||
Hex2 = hex2 as string;
|
||||
OpacityNumber = brush.Opacity.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
Hex = null;
|
||||
Hex2 = null;
|
||||
OpacityNumber = null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task Copy(object o)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
x:DataType="vm:AboutUsViewModel"
|
||||
x:CompileBindings="True"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="False"
|
||||
x:DataType="vm:AutoCompleteBoxDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
@@ -28,59 +29,59 @@
|
||||
</StackPanel.Styles>
|
||||
|
||||
<AutoCompleteBox
|
||||
PlaceholderText="Please select a State"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Please select a State"
|
||||
ValueMemberBinding="{Binding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Large"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Small"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Bordered"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Disabled"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
InnerLeftContent="https://"
|
||||
InnerRightContent=".com"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Large"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
PlaceholderText="Default"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Default"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Small"
|
||||
PlaceholderText="Small"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Small"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Disabled"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
PlaceholderText="Bordered"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
Watermark="Bordered"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
IsEnabled="False"
|
||||
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -6,369 +6,174 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="8">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="SplitButton,DropDownButton,ToggleSplitButton">
|
||||
<Setter Property="Button.Flyout">
|
||||
<MenuFlyout>
|
||||
<Style Selector="SplitButton">
|
||||
<Setter Property="Flyout">
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="DropDownButton">
|
||||
<Setter Property="Flyout">
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="ToggleSplitButton">
|
||||
<Setter Property="Flyout">
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuItem Header="Submit All" />
|
||||
<MenuItem Header="Submit Updated" />
|
||||
</MenuFlyout>
|
||||
</Setter>
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Button/RepeatButton Theme" />
|
||||
<WrapPanel ItemSpacing="4">
|
||||
<TextBlock Text="Theme:" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Light" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Solid" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Outline" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Borderless" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="4">
|
||||
<TextBlock Text="Classes:" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Primary" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Secondary" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Tertiary" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Success" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Warning" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Danger" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl.Header>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Default" />
|
||||
<Button Content="Primary" Classes="Primary" />
|
||||
<Button Content="Secondary" Classes="Secondary" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" />
|
||||
<Button Content="Success" Classes="Success" />
|
||||
<Button Content="Warning" Classes="Warning" />
|
||||
<Button Content="Danger" Classes="Danger" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Default" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{StaticResource SolidButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Default" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{StaticResource OutlineButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Default" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessButton}" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}"
|
||||
Header="Prohibited Status">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Light" IsEnabled="False" />
|
||||
<Button Content="Solid" IsEnabled="False" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessButton}" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>Light (Default)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary">Primary</Button>
|
||||
<Button Classes="Secondary">Secondary</Button>
|
||||
<Button Classes="Tertiary">Tertiary</Button>
|
||||
<Button Classes="Success">Success</Button>
|
||||
<Button Classes="Warning">Warning</Button>
|
||||
<Button Classes="Danger">Danger</Button>
|
||||
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Solid</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
||||
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
|
||||
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
|
||||
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
|
||||
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
||||
<Button
|
||||
Classes="Danger"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource SolidButton}">
|
||||
Disabled
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Outline</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary" Theme="{DynamicResource OutlineButton}">Primary</Button>
|
||||
<Button Classes="Secondary" Theme="{DynamicResource OutlineButton}">Secondary</Button>
|
||||
<Button Classes="Tertiary" Theme="{DynamicResource OutlineButton}">Tertiary</Button>
|
||||
<Button Classes="Success" Theme="{DynamicResource OutlineButton}">Success</Button>
|
||||
<Button Classes="Warning" Theme="{DynamicResource OutlineButton}">Warning</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}">Danger</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}" IsEnabled="False">Disabled</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Borderless</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
||||
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button>
|
||||
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
|
||||
<Button Classes="Success" Theme="{DynamicResource BorderlessButton}">Success</Button>
|
||||
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
||||
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
||||
<Button
|
||||
Classes="Danger"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Disabled
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Disabled</TextBlock>
|
||||
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||
<Button IsEnabled="False">Light</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Size Classes</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<Button Classes="Primary Small">Small</Button>
|
||||
<Button Classes="Primary">Default</Button>
|
||||
<Button Classes="Primary Large">Large</Button>
|
||||
</StackPanel>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<StackPanel Spacing="8">
|
||||
<WrapPanel ItemSpacing="4">
|
||||
<TextBlock Text="Size Classes:" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Large" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl.Header>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Large" Classes="Large" />
|
||||
<Button Content="Default" />
|
||||
<Button Content="Small" Classes="Small" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>DropDownButton</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<DropDownButton Content="Primary" />
|
||||
<DropDownButton Classes="Secondary" Content="Secondary" />
|
||||
<DropDownButton Classes="Tertiary" Content="Tertiary" />
|
||||
<DropDownButton Classes="Success" Content="Success" />
|
||||
<DropDownButton Classes="Warning" Content="Warning" />
|
||||
<DropDownButton Classes="Danger" Content="Danger" />
|
||||
<DropDownButton
|
||||
Classes="Danger"
|
||||
Content="Disabled"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<DropDownButton Content="Default" Classes="Success" />
|
||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" />
|
||||
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" />
|
||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" />
|
||||
<DropDownButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False" />
|
||||
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False" />
|
||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<DropDownButton Classes="Small" Content="Small" />
|
||||
<DropDownButton Content="Default" />
|
||||
<DropDownButton Classes="Large" Content="Large" />
|
||||
</StackPanel>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}">
|
||||
<HeaderedContentControl.Header>
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="AI style - Colorful Button" />
|
||||
<WrapPanel ItemSpacing="4">
|
||||
<TextBlock Text="Theme:" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Light" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Solid" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Outline" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Borderless" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="4">
|
||||
<TextBlock Text="Classes:" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient" Content="Colorful Primary" />
|
||||
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient" Content="Colorful Tertiary" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl.Header>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Primary" Classes="Colorful Primary" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource SolidButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource SolidButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource OutlineButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource OutlineButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource BorderlessButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource BorderlessButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>SplitButton</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<SplitButton Content="Primary" />
|
||||
<SplitButton Classes="Secondary" Content="Secondary" />
|
||||
<SplitButton Classes="Tertiary" Content="Tertiary" />
|
||||
<SplitButton Classes="Success" Content="Success" />
|
||||
<SplitButton Classes="Warning" Content="Warning" />
|
||||
<SplitButton Classes="Danger" Content="Danger" />
|
||||
<SplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<SplitButton Content="Default" Classes="Success" />
|
||||
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
|
||||
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
|
||||
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
|
||||
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" IsEnabled="False" />
|
||||
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" IsEnabled="False" />
|
||||
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<SplitButton Classes="Small" Content="Small" />
|
||||
<SplitButton Content="Default" />
|
||||
<SplitButton Classes="Large" Content="Large" />
|
||||
</StackPanel>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}" Header="DropDownButton">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Default" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" />
|
||||
<DropDownButton Content="Success" Classes="Success" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource SolidDropDownButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Light" IsEnabled="False" />
|
||||
<DropDownButton Content="Solid" IsEnabled="False" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Large" Classes="Large" />
|
||||
<DropDownButton Content="Default" />
|
||||
<DropDownButton Content="Small" Classes="Small" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource SolidDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource OutlineDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource BorderlessDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}" Header="SplitButton">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Default" />
|
||||
<SplitButton Content="Primary" Classes="Primary" />
|
||||
<SplitButton Content="Secondary" Classes="Secondary" />
|
||||
<SplitButton Content="Tertiary" Classes="Tertiary" />
|
||||
<SplitButton Content="Success" Classes="Success" />
|
||||
<SplitButton Content="Warning" Classes="Warning" />
|
||||
<SplitButton Content="Danger" Classes="Danger" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Default" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource SolidSplitButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Default" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource OutlineSplitButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Default" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Light" IsEnabled="False" />
|
||||
<SplitButton Content="Solid" IsEnabled="False" Theme="{StaticResource SolidSplitButton}" />
|
||||
<SplitButton Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineSplitButton}" />
|
||||
<SplitButton Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessSplitButton}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<SplitButton Content="Large" Classes="Large" />
|
||||
<SplitButton Content="Default" />
|
||||
<SplitButton Content="Small" Classes="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}"
|
||||
Header="ToggleSplitButton">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="24">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleSplitButton Content="Default" />
|
||||
<ToggleSplitButton Classes="Primary" Content="Primary" />
|
||||
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
|
||||
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
|
||||
<ToggleSplitButton Classes="Success" Content="Success" />
|
||||
<ToggleSplitButton Classes="Warning" Content="Warning" />
|
||||
<ToggleSplitButton Classes="Danger" Content="Danger" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleSplitButton Content="Default" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Primary" Content="Primary" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Secondary" Content="Secondary" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Success" Content="Success" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Warning" Content="Warning" IsChecked="True" />
|
||||
<ToggleSplitButton Classes="Danger" Content="Danger" IsChecked="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleSplitButton Content="Unchecked" Classes="Success" IsEnabled="False" />
|
||||
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleSplitButton Content="Large" Classes="Large" />
|
||||
<ToggleSplitButton Content="Default" />
|
||||
<ToggleSplitButton Content="Small" Classes="Small" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl
|
||||
Theme="{StaticResource GroupBox}" Header="ToggleButton">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Default" />
|
||||
<ToggleButton Content="Primary" Classes="Primary" />
|
||||
<ToggleButton Content="Secondary" Classes="Secondary" />
|
||||
<ToggleButton Content="Tertiary" Classes="Tertiary" />
|
||||
<ToggleButton Content="Success" Classes="Success" />
|
||||
<ToggleButton Content="Warning" Classes="Warning" />
|
||||
<ToggleButton Content="Danger" Classes="Danger" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Default" IsChecked="True" />
|
||||
<ToggleButton Content="Primary" Classes="Primary" IsChecked="True" />
|
||||
<ToggleButton Content="Secondary" Classes="Secondary" IsChecked="True" />
|
||||
<ToggleButton Content="Tertiary" Classes="Tertiary" IsChecked="True" />
|
||||
<ToggleButton Content="Success" Classes="Success" IsChecked="True" />
|
||||
<ToggleButton Content="Warning" Classes="Warning" IsChecked="True" />
|
||||
<ToggleButton Content="Danger" Classes="Danger" IsChecked="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Default" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Primary" Classes="Primary" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Secondary" Classes="Secondary" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Tertiary" Classes="Tertiary" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Success" Classes="Success" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Warning" Classes="Warning" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Danger" Classes="Danger" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Unchecked" IsEnabled="False" />
|
||||
<ToggleButton Content="Checked" IsEnabled="False" IsChecked="True" />
|
||||
<ToggleButton Content="Indeterminate" IsEnabled="False" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Large" Classes="Large" />
|
||||
<ToggleButton Content="Default" />
|
||||
<ToggleButton Content="Small" Classes="Small" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Primary" Classes="Colorful Primary" />
|
||||
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" />
|
||||
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Primary" Classes="Colorful Primary" IsChecked="True" />
|
||||
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" IsChecked="True" />
|
||||
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsChecked="True" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16" LineSpacing="16">
|
||||
<ToggleButton Content="Primary" Classes="Colorful Primary" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" IsChecked="{x:Null}" IsThreeState="True" />
|
||||
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsChecked="{x:Null}" IsThreeState="True" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>ToggleSplitButton</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ToggleSplitButton Content="Primary" />
|
||||
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
|
||||
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
|
||||
<ToggleSplitButton Classes="Success" Content="Success" />
|
||||
<ToggleSplitButton Classes="Warning" Content="Warning" />
|
||||
<ToggleSplitButton Classes="Danger" Content="Danger" />
|
||||
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ToggleSplitButton Content="Default" Classes="Success" />
|
||||
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
|
||||
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<ToggleSplitButton Classes="Small" Content="Small" />
|
||||
<ToggleSplitButton Content="Default" />
|
||||
<ToggleSplitButton Classes="Large" Content="Large" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -8,10 +8,6 @@
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ToggleSwitch Name="showSpinCheck" IsChecked="True" Content="Show Button Spinner" />
|
||||
<ToggleSwitch Name="allowSpinCheck" IsChecked="True" Content="Allow Spin" />
|
||||
</StackPanel>
|
||||
<ButtonSpinner
|
||||
Height="30"
|
||||
AllowSpin="{Binding #allowSpinCheck.IsChecked}"
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:DataType="vm:ComboBoxDemoViewModel">
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
<vm:ComboBoxDemoViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
22
demo/Semi.Avalonia.Demo/Pages/GroupBoxDemo.axaml
Normal file
22
demo/Semi.Avalonia.Demo/Pages/GroupBoxDemo.axaml
Normal file
@@ -0,0 +1,22 @@
|
||||
<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="1450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.GroupBoxDemo">
|
||||
<ScrollViewer>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<GroupBox
|
||||
HorizontalAlignment="Left"
|
||||
MaxWidth="360">
|
||||
<HeaderedContentControl.Header>
|
||||
<Panel>
|
||||
<SelectableTextBlock Text="Semi Design" />
|
||||
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
|
||||
</Panel>
|
||||
</HeaderedContentControl.Header>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
11
demo/Semi.Avalonia.Demo/Pages/GroupBoxDemo.axaml.cs
Normal file
11
demo/Semi.Avalonia.Demo/Pages/GroupBoxDemo.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class GroupBoxDemo : UserControl
|
||||
{
|
||||
public GroupBoxDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -38,18 +38,6 @@
|
||||
</HeaderedContentControl.Header>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
</HeaderedContentControl>
|
||||
<TextBlock>Real GroupBox</TextBlock>
|
||||
<GroupBox
|
||||
HorizontalAlignment="Left"
|
||||
MaxWidth="360">
|
||||
<HeaderedContentControl.Header>
|
||||
<Panel>
|
||||
<SelectableTextBlock Text="Semi Design" />
|
||||
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
|
||||
</Panel>
|
||||
</HeaderedContentControl.Header>
|
||||
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -18,67 +18,78 @@
|
||||
Text="{Binding SearchText}"
|
||||
Watermark="Input Icon Name" />
|
||||
|
||||
<TabControl
|
||||
Grid.Row="1"
|
||||
Theme="{StaticResource LineTabControl}"
|
||||
ItemsSource="{Binding IconTabs}">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<WrapPanel ItemSpacing="5">
|
||||
<TextBlock Text="{Binding Header}" />
|
||||
<Label
|
||||
Theme="{StaticResource TagLabel}"
|
||||
Classes="Purple"
|
||||
IsVisible="{Binding Header,
|
||||
Converter={x:Static ObjectConverters.Equal},
|
||||
ConverterParameter='AI Icons'}"
|
||||
Content="New" />
|
||||
</WrapPanel>
|
||||
</DataTemplate>
|
||||
</TabControl.ItemTemplate>
|
||||
<TabControl Grid.Row="1">
|
||||
<TabItem Header="Filled Icons">
|
||||
<ScrollViewer>
|
||||
<ItemsControl ItemsSource="{Binding FilteredFilledIcons}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button Theme="{DynamicResource OutlineButton}"
|
||||
Classes="Tertiary"
|
||||
Padding="0"
|
||||
Margin="10"
|
||||
Width="200"
|
||||
Height="120"
|
||||
Click="Button_Clicked">
|
||||
<StackPanel Spacing="8">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
HorizontalAlignment="Center"
|
||||
Classes="ExtraLarge"
|
||||
Data="{Binding Geometry}" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="12"
|
||||
FontWeight="Normal"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabControl.ContentTemplate>
|
||||
<DataTemplate DataType="vm:IconTab">
|
||||
<ScrollViewer>
|
||||
<ItemsControl
|
||||
Margin="0 10"
|
||||
ItemsSource="{Binding IconItems}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel
|
||||
ItemWidth="200"
|
||||
ItemHeight="120"
|
||||
ItemSpacing="10"
|
||||
LineSpacing="10" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button Theme="{DynamicResource OutlineButton}"
|
||||
Classes="Tertiary"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Click="Button_Clicked">
|
||||
<StackPanel Spacing="8">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
HorizontalAlignment="Center"
|
||||
Classes="ExtraLarge"
|
||||
Data="{Binding Geometry}" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="12"
|
||||
FontWeight="Normal"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</DataTemplate>
|
||||
</TabControl.ContentTemplate>
|
||||
<TabItem Header="Stroked Icons">
|
||||
<ScrollViewer>
|
||||
<ItemsControl ItemsSource="{Binding FilteredStrokedIcons}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button Theme="{DynamicResource OutlineButton}"
|
||||
Classes="Tertiary"
|
||||
Padding="0"
|
||||
Margin="10"
|
||||
Width="200"
|
||||
Height="120"
|
||||
Click="Button_Clicked">
|
||||
<StackPanel Spacing="8">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
HorizontalAlignment="Center"
|
||||
Classes="ExtraLarge"
|
||||
Data="{Binding Geometry}" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="12"
|
||||
FontWeight="Normal"
|
||||
Text="{Binding ResourceKey}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -8,11 +8,14 @@
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="Grid > TextBlock,Grid > Label">
|
||||
<Setter Property="Layoutable.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Layoutable.Margin" Value="4" />
|
||||
<Style Selector="Label">
|
||||
<Setter Property="Margin" Value="4" />
|
||||
</Style>
|
||||
<Style Selector="Grid > TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
@@ -153,89 +156,69 @@
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<HeaderedContentControl
|
||||
Margin="16"
|
||||
Header="Theme: TagLabel"
|
||||
Theme="{DynamicResource GroupBox}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<StackPanel Spacing="4">
|
||||
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<Label Classes="Colorful Gradient" Theme="{DynamicResource TagLabel}">Light</Label>
|
||||
<Label Classes="Colorful Gradient Ghost" Theme="{DynamicResource TagLabel}">Ghost</Label>
|
||||
<Label Classes="Colorful Gradient Solid" Theme="{DynamicResource TagLabel}">Solid</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<Label Classes="Colorful" Theme="{DynamicResource TagLabel}">Light</Label>
|
||||
<Label Classes="Colorful Ghost" Theme="{DynamicResource TagLabel}">Ghost</Label>
|
||||
<Label Classes="Colorful Solid" Theme="{DynamicResource TagLabel}">Solid</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<Label Theme="{StaticResource TagLabel}">Label</Label>
|
||||
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
|
||||
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
|
||||
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</HeaderedContentControl>
|
||||
<WrapPanel>
|
||||
<Label Theme="{StaticResource TagLabel}">Label</Label>
|
||||
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
|
||||
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
|
||||
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
|
||||
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
|
||||
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
|
||||
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
|
||||
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
|
||||
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
|
||||
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
|
||||
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
|
||||
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
|
||||
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
|
||||
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
|
||||
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
|
||||
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
|
||||
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
|
||||
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
|
||||
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -27,8 +27,7 @@ public partial class NotificationDemo : UserControl
|
||||
if (sender is RadioButton b && b.Content is string s)
|
||||
{
|
||||
Enum.TryParse<NotificationPosition>(s, out var t);
|
||||
if (_manager is not null)
|
||||
_manager.Position = t;
|
||||
_manager.Position = t;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large"
|
||||
Watermark="Large"
|
||||
ButtonSpinnerLocation="Left" />
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
PlaceholderText="Default"
|
||||
Watermark="Default"
|
||||
ShowButtonSpinner="False" />
|
||||
<NumericUpDown
|
||||
Width="100"
|
||||
PlaceholderText="Small"
|
||||
Watermark="Small"
|
||||
Classes="Small" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class Overview : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia";
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.9";
|
||||
|
||||
public string MainStyle { get; set; } =
|
||||
"""
|
||||
@@ -18,7 +18,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker";
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.9";
|
||||
|
||||
public string ColorPickerStyle { get; set; } =
|
||||
"""
|
||||
@@ -27,7 +27,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid";
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.9";
|
||||
|
||||
public string DataGridStyle { get; set; } =
|
||||
"""
|
||||
@@ -36,7 +36,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid";
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.4";
|
||||
|
||||
public string TreeDataGridStyle { get; set; } =
|
||||
"""
|
||||
@@ -45,7 +45,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string DockInstall { get; set; } = "dotnet add package Semi.Avalonia.Dock";
|
||||
public string DockInstall { get; set; } = "dotnet add package Semi.Avalonia.Dock --version 11.3.0";
|
||||
|
||||
public string DockStyle { get; set; } =
|
||||
"""
|
||||
@@ -54,7 +54,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string TabaloniaInstall { get; set; } = "dotnet add package Semi.Avalonia.Tabalonia";
|
||||
public string TabaloniaInstall { get; set; } = "dotnet add package Semi.Avalonia.Tabalonia --version 11.0.0-beta1";
|
||||
|
||||
public string TabaloniaStyle { get; set; } =
|
||||
"""
|
||||
@@ -63,7 +63,7 @@ public partial class Overview : UserControl
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string AvaloniaEditInstall { get; set; } = "dotnet add package Semi.Avalonia.AvaloniaEdit";
|
||||
public string AvaloniaEditInstall { get; set; } = "dotnet add package Semi.Avalonia.AvaloniaEdit --version 11.2.0";
|
||||
|
||||
public string AvaloniaEditStyle { get; set; } =
|
||||
"""
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:PaletteDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Threading;
|
||||
using Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:DataType="vm:RefreshContainerDemoViewModel"
|
||||
x:CompileBindings="True"
|
||||
mc:Ignorable="d">
|
||||
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||
<Label DockPanel.Dock="Top">A control that supports pull to refresh</Label>
|
||||
|
||||
80
demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml
Normal file
80
demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml
Normal file
@@ -0,0 +1,80 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.RepeatButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<TextBlock>Light (Default)</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<RepeatButton Classes="Primary">Primary</RepeatButton>
|
||||
<RepeatButton Classes="Secondary">Secondary</RepeatButton>
|
||||
<RepeatButton Classes="Tertiary">Tertiary</RepeatButton>
|
||||
<RepeatButton Classes="Success">Success</RepeatButton>
|
||||
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
||||
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
||||
<RepeatButton Classes="Danger" IsEnabled="False">Disabled</RepeatButton>
|
||||
</StackPanel>
|
||||
<TextBlock>Solid</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton>
|
||||
<RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton>
|
||||
<RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton>
|
||||
<RepeatButton Classes="Success" Theme="{DynamicResource SolidRepeatButton}">Success</RepeatButton>
|
||||
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
||||
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
||||
<RepeatButton
|
||||
Classes="Danger"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource SolidRepeatButton}">
|
||||
Disabled
|
||||
</RepeatButton>
|
||||
</StackPanel>
|
||||
<TextBlock>Outline</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<RepeatButton Classes="Primary" Theme="{DynamicResource OutlineRepeatButton}">Primary</RepeatButton>
|
||||
<RepeatButton Classes="Secondary" Theme="{DynamicResource OutlineRepeatButton}">Secondary</RepeatButton>
|
||||
<RepeatButton Classes="Tertiary" Theme="{DynamicResource OutlineRepeatButton}">Tertiary</RepeatButton>
|
||||
<RepeatButton Classes="Success" Theme="{DynamicResource OutlineRepeatButton}">Success</RepeatButton>
|
||||
<RepeatButton Classes="Warning" Theme="{DynamicResource OutlineRepeatButton}">Warning</RepeatButton>
|
||||
<RepeatButton Classes="Danger" Theme="{DynamicResource OutlineRepeatButton}">Danger</RepeatButton>
|
||||
<RepeatButton
|
||||
Classes="Danger"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource OutlineRepeatButton}">
|
||||
Disabled
|
||||
</RepeatButton>
|
||||
</StackPanel>
|
||||
<TextBlock>Borderless</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
|
||||
<RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton>
|
||||
<RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton>
|
||||
<RepeatButton Classes="Success" Theme="{DynamicResource BorderlessRepeatButton}">Success</RepeatButton>
|
||||
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
||||
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
||||
<RepeatButton
|
||||
Classes="Danger"
|
||||
IsEnabled="False"
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
Disabled
|
||||
</RepeatButton>
|
||||
</StackPanel>
|
||||
<TextBlock>Disabled</TextBlock>
|
||||
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||
<Button IsEnabled="False">Light</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
|
||||
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
|
||||
</StackPanel>
|
||||
<TextBlock>Size Classes</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<RepeatButton Classes="Small">Small</RepeatButton>
|
||||
<RepeatButton>Default</RepeatButton>
|
||||
<RepeatButton Classes="Large">Large</RepeatButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
11
demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs
Normal file
11
demo/Semi.Avalonia.Demo/Pages/RepeatButtonDemo.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class RepeatButtonDemo : UserControl
|
||||
{
|
||||
public RepeatButtonDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -22,15 +22,6 @@
|
||||
TickFrequency="10"
|
||||
TickPlacement="Outside"
|
||||
Value="0" />
|
||||
<Slider
|
||||
Value="0"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
TickPlacement="BottomRight"
|
||||
IsSnapToTickEnabled="True"
|
||||
IsDirectionReversed="True"
|
||||
Ticks="0,20,25,40,75,100"
|
||||
Width="300" />
|
||||
<Slider
|
||||
Width="300"
|
||||
Classes="ToolTip"
|
||||
|
||||
@@ -7,187 +7,276 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
d:DesignHeight="1000"
|
||||
d:DesignWidth="800"
|
||||
x:DataType="vm:SplitViewDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
<vm:SplitViewDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<Border>
|
||||
<Grid ColumnDefinitions="*,400">
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Top">
|
||||
<Grid ColumnDefinitions="Auto, *" RowDefinitions="*, *, *, *, *, *">
|
||||
<Border Grid.Column="1" VerticalAlignment="Top" Margin="10 0 0 0">
|
||||
<Grid RowDefinitions="*, *, *, *, *, *" ColumnDefinitions="Auto, *">
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="IsPaneOpen" />
|
||||
<ToggleSwitch
|
||||
Name="PaneOpenButton"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1" />
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Name="PaneOpenButton" />
|
||||
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="UseLightDismissOverlayMode" />
|
||||
<ToggleSwitch
|
||||
Name="UseLightDismissOverlayModeButton"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1" />
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Name="UseLightDismissOverlayModeButton" />
|
||||
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.Row="2" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Placement" />
|
||||
<ComboBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Name="PanelPlacementSelector"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{x:Static vm:SplitViewDemoViewModel.Placements}"
|
||||
SelectedItem="{x:Static SplitViewPanePlacement.Left}"
|
||||
/>
|
||||
<ToggleSwitch
|
||||
Grid.Row="2" Grid.Column="1"
|
||||
Name="PanePlacementButton"
|
||||
OffContent="Left"
|
||||
OnContent="Right" />
|
||||
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.Row="3" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="DisplayMode" />
|
||||
<ComboBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
Name="DisplayModeSelector"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{x:Static vm:SplitViewDemoViewModel.DisplayModes}"
|
||||
SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" />
|
||||
|
||||
<Label
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Grid.Row="4" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" />
|
||||
<Slider
|
||||
Grid.Row="4" Grid.Column="1"
|
||||
Name="CompactPaneLengthSlider"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="128"
|
||||
Minimum="0"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Value="48" />
|
||||
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Grid.Row="5" Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Content="{Binding #OpenPaneLengthSlider.Value, StringFormat='{}OpenPaneLength: {0}'}" />
|
||||
Content="{Binding #OpenPaneLengthSlider.Value,StringFormat='{}OpenPaneLength: {0}'}" />
|
||||
<Slider
|
||||
Grid.Row="5" Grid.Column="1"
|
||||
Name="OpenPaneLengthSlider"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="500"
|
||||
Minimum="128"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Value="256" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<SplitView
|
||||
Grid.Column="0"
|
||||
Name="SplitView"
|
||||
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
|
||||
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
|
||||
IsPaneOpen="{Binding #PaneOpenButton.IsChecked, Mode=TwoWay}"
|
||||
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}"
|
||||
PanePlacement="{Binding #PanelPlacementSelector.SelectedItem}"
|
||||
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}">
|
||||
<SplitView.Background>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
|
||||
<GradientStop Offset="0" Color="#6b4c1b" />
|
||||
<GradientStop Offset="1" Color="#291e10" />
|
||||
</LinearGradientBrush>
|
||||
</SplitView.Background>
|
||||
<SplitView.Pane>
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="8 12">
|
||||
<ToggleSwitch
|
||||
Content="{StaticResource SemiIconSidebar}"
|
||||
IsChecked="{Binding #SplitView.IsPaneOpen}"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}" />
|
||||
<TextBlock
|
||||
Name="PaneHeader"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8 0"
|
||||
FontWeight="Bold"
|
||||
Text="Playlist" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Songs}" />
|
||||
|
||||
</Grid>
|
||||
</SplitView.Pane>
|
||||
<TabControl Grid.Column="0">
|
||||
<TabItem Header="Default">
|
||||
<Border
|
||||
BorderBrush="{DynamicResource SemiGrey1}"
|
||||
BorderThickness="1">
|
||||
<SplitView
|
||||
Name="SplitView"
|
||||
IsPaneOpen="{Binding #PaneOpenButton.IsChecked,Mode=TwoWay}"
|
||||
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}"
|
||||
PanePlacement="{Binding #PanePlacementButton.IsChecked}"
|
||||
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
|
||||
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
|
||||
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}">
|
||||
<SplitView.Background>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
|
||||
<GradientStop Color="#6b4c1b" Offset="0" />
|
||||
<GradientStop Color="#291e10" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</SplitView.Background>
|
||||
<SplitView.Pane>
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Name="PaneHeader"
|
||||
Margin="8,12"
|
||||
FontWeight="Bold"
|
||||
Text="Playlist" />
|
||||
<ListBox
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding Songs}" />
|
||||
<ToggleSwitch
|
||||
Grid.Row="2"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||
Content="{StaticResource SemiIconSidebar}"
|
||||
HorizontalAlignment="Left"
|
||||
IsChecked="{Binding #SplitView.IsPaneOpen}" />
|
||||
</Grid>
|
||||
</SplitView.Pane>
|
||||
|
||||
<Panel>
|
||||
<Panel.Styles>
|
||||
<Style Selector="Image#AlbumCover">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:40">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="RotateTransform.Angle" Value="0" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="RotateTransform.Angle" Value="360" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</Panel.Styles>
|
||||
<Image
|
||||
Name="AlbumCover"
|
||||
Width="200"
|
||||
Height="200"
|
||||
Source="/Assets/WORLD.png" />
|
||||
<Arc
|
||||
Width="290"
|
||||
Height="290"
|
||||
StartAngle="0"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="45"
|
||||
SweepAngle="360">
|
||||
<Arc.Stroke>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
|
||||
<GradientStop Offset="0" Color="#010101" />
|
||||
<GradientStop Offset="0.5" Color="#363636" />
|
||||
<GradientStop Offset="1" Color="#010101" />
|
||||
</LinearGradientBrush>
|
||||
</Arc.Stroke>
|
||||
</Arc>
|
||||
<Arc
|
||||
Width="294"
|
||||
Height="294"
|
||||
StartAngle="0"
|
||||
Stroke="Black"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="4"
|
||||
SweepAngle="360" />
|
||||
<Arc
|
||||
Width="310"
|
||||
Height="310"
|
||||
Opacity="0.1"
|
||||
StartAngle="0"
|
||||
Stroke="#C6CACD"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="10"
|
||||
SweepAngle="360" />
|
||||
</Panel>
|
||||
</SplitView>
|
||||
<Panel>
|
||||
<Panel.Styles>
|
||||
<Style Selector="Image#AlbumCover">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:40">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="RotateTransform.Angle" Value="0" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="RotateTransform.Angle" Value="360" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</Panel.Styles>
|
||||
<Image
|
||||
Source="/Assets/WORLD.png"
|
||||
Name="AlbumCover"
|
||||
Width="200"
|
||||
Height="200" />
|
||||
<Arc
|
||||
Width="290"
|
||||
Height="290"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="45">
|
||||
<Arc.Stroke>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
|
||||
<GradientStop Color="#010101" Offset="0" />
|
||||
<GradientStop Color="#363636" Offset="0.5" />
|
||||
<GradientStop Color="#010101" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Arc.Stroke>
|
||||
</Arc>
|
||||
<Arc
|
||||
Width="294"
|
||||
Height="294"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="4"
|
||||
Stroke="Black" />
|
||||
<Arc
|
||||
Width="310"
|
||||
Height="310"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="10"
|
||||
Stroke="#C6CACD"
|
||||
Opacity="0.1" />
|
||||
</Panel>
|
||||
|
||||
</SplitView>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="VerticalSplitView">
|
||||
<Border
|
||||
BorderBrush="{DynamicResource SemiGrey1}"
|
||||
BorderThickness="1">
|
||||
<SplitView
|
||||
Name="SplitView2"
|
||||
Theme="{DynamicResource VerticalSplitView}"
|
||||
IsPaneOpen="{Binding #PaneOpenButton.IsChecked,Mode=TwoWay}"
|
||||
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}"
|
||||
PanePlacement="{Binding #PanePlacementButton.IsChecked}"
|
||||
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
|
||||
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
|
||||
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}">
|
||||
<SplitView.Background>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
|
||||
<GradientStop Color="#6b4c1b" Offset="0" />
|
||||
<GradientStop Color="#291e10" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</SplitView.Background>
|
||||
<SplitView.Pane>
|
||||
<Grid RowDefinitions="Auto,Auto,*">
|
||||
<ToggleSwitch
|
||||
Grid.Row="0"
|
||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||
Content="{StaticResource SemiIconSidebar}"
|
||||
HorizontalAlignment="Left"
|
||||
IsChecked="{Binding #SplitView2.IsPaneOpen}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Margin="8,12"
|
||||
FontWeight="Bold"
|
||||
Text="Playlist" />
|
||||
<ListBox
|
||||
Grid.Row="2"
|
||||
ItemsSource="{Binding Songs}" />
|
||||
</Grid>
|
||||
</SplitView.Pane>
|
||||
|
||||
<Panel>
|
||||
<Panel.Styles>
|
||||
<Style Selector="Image#AlbumCover2">
|
||||
<Style.Animations>
|
||||
<Animation IterationCount="Infinite" Duration="0:0:40">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="RotateTransform.Angle" Value="0" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="RotateTransform.Angle" Value="360" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</Panel.Styles>
|
||||
<Image
|
||||
Source="/Assets/WORLD.png"
|
||||
Name="AlbumCover2"
|
||||
Width="200"
|
||||
Height="200" />
|
||||
<Arc
|
||||
Width="290"
|
||||
Height="290"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="45">
|
||||
<Arc.Stroke>
|
||||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
|
||||
<GradientStop Color="#010101" Offset="0" />
|
||||
<GradientStop Color="#363636" Offset="0.5" />
|
||||
<GradientStop Color="#010101" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Arc.Stroke>
|
||||
</Arc>
|
||||
<Arc
|
||||
Width="294"
|
||||
Height="294"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="4"
|
||||
Stroke="Black" />
|
||||
<Arc
|
||||
Width="310"
|
||||
Height="310"
|
||||
StartAngle="0"
|
||||
SweepAngle="360"
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="10"
|
||||
Stroke="#C6CACD"
|
||||
Opacity="0.1" />
|
||||
</Panel>
|
||||
|
||||
</SplitView>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:TabControlDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Semi.Avalonia.Demo.Pages.TabStripDemo"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:TabStripDemoViewModel">
|
||||
<Design.DataContext>
|
||||
<vm:TabStripDemoViewModel />
|
||||
|
||||
@@ -23,36 +23,36 @@
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Large"
|
||||
PlaceholderText="Large" />
|
||||
Watermark="Large" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
PlaceholderText="Default" />
|
||||
Watermark="Default" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Small"
|
||||
PlaceholderText="Small" />
|
||||
Watermark="Small" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox
|
||||
Width="100"
|
||||
IsEnabled="False"
|
||||
PlaceholderText="Disabled" />
|
||||
Watermark="Disabled" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
PlaceholderText="Bordered" />
|
||||
Watermark="Bordered" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
Classes="Bordered"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<TextBox Width="300" Classes="TextArea" PlaceholderText="TextArea TextBox" />
|
||||
<TextBox Width="300" Classes="TextArea" Watermark="TextArea TextBox" />
|
||||
<TextBox Width="300" Classes="TextArea ClearButton" Text="TextArea with ClearButton - text should be clearable" />
|
||||
<TextBox
|
||||
Width="300"
|
||||
Theme="{StaticResource LooklessTextBox}"
|
||||
PlaceholderText="Lookless TextBox"
|
||||
Watermark="Lookless TextBox"
|
||||
InnerLeftContent="https://"
|
||||
InnerRightContent=".com" />
|
||||
</StackPanel>
|
||||
|
||||
98
demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml
Normal file
98
demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml
Normal file
@@ -0,0 +1,98 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.ToggleButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Spacing="20">
|
||||
<TextBlock Text="Toggle Button (Default)" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton>Default</ToggleButton>
|
||||
<ToggleButton Classes="Primary">Primary</ToggleButton>
|
||||
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
||||
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
|
||||
<ToggleButton Classes="Success">Success</ToggleButton>
|
||||
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
||||
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
||||
<ToggleButton Classes="Danger" IsEnabled="False">Disabled</ToggleButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Toggle Button Checked State" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton IsChecked="True">Default</ToggleButton>
|
||||
<ToggleButton Classes="Primary" IsChecked="True">Primary</ToggleButton>
|
||||
<ToggleButton Classes="Secondary" IsChecked="True">Secondary</ToggleButton>
|
||||
<ToggleButton Classes="Tertiary" IsChecked="True">Tertiary</ToggleButton>
|
||||
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
|
||||
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
||||
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Danger"
|
||||
IsChecked="True"
|
||||
IsEnabled="False">
|
||||
Disabled
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Toggle Button Three State" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton IsChecked="{x:Null}" IsThreeState="True">Default</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Primary"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Primary
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Secondary"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Secondary
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Tertiary"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Tertiary
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Success"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Success
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Warning"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Warning
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Danger"
|
||||
IsChecked="{x:Null}"
|
||||
IsThreeState="True">
|
||||
Danger
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
Classes="Danger"
|
||||
IsChecked="{x:Null}"
|
||||
IsEnabled="False"
|
||||
IsThreeState="True">
|
||||
Disabled
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Toggle Button Disabled State" />
|
||||
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False">Default</ToggleButton>
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="True">Checked</ToggleButton>
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="{x:Null}">Indeterminate</ToggleButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Toggle Button Size" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
|
||||
<ToggleButton IsThreeState="True">Default</ToggleButton>
|
||||
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
11
demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs
Normal file
11
demo/Semi.Avalonia.Demo/Pages/ToggleButtonDemo.axaml.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class ToggleButtonDemo : UserControl
|
||||
{
|
||||
public ToggleButtonDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="vm:TreeViewVm"
|
||||
mc:Ignorable="d">
|
||||
|
||||
|
||||
@@ -21,40 +21,33 @@ public class TreeViewVm : ObservableObject
|
||||
|
||||
public TreeViewVm()
|
||||
{
|
||||
Items =
|
||||
[
|
||||
new TreeViewItemVm { Name = "Item 1", Id = "1" },
|
||||
new TreeViewItemVm { Name = "Item 2", Id = "2" },
|
||||
new TreeViewItemVm
|
||||
{
|
||||
Name = "Item 3", Id = "3", Items =
|
||||
[
|
||||
new TreeViewItemVm { Name = "Item 3.1", Id = "3.1" },
|
||||
new TreeViewItemVm { Name = "Item 3.2", Id = "3.2" },
|
||||
new TreeViewItemVm { Name = "Item 3.3", Id = "3.3" }
|
||||
],
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
MultipleLevelItems = [];
|
||||
for (var i = 1; i < 6; i++)
|
||||
Items = new ObservableCollection<TreeViewItemVm>()
|
||||
{
|
||||
var firstItem = new FirstItem
|
||||
new TreeViewItemVm() { Name = "Item 1", Id = "1" },
|
||||
new TreeViewItemVm() { Name = "Item 2", Id = "2" },
|
||||
new TreeViewItemVm()
|
||||
{
|
||||
Id = i, Name = $"FirstItem {i}",
|
||||
SecondItems = []
|
||||
};
|
||||
for (var j = 1; j < 6; j++)
|
||||
Name = "Item 3", Id = "3", Items = new ObservableCollection<TreeViewItemVm>()
|
||||
{
|
||||
new TreeViewItemVm() { Name = "Item 3.1", Id = "3.1" },
|
||||
new TreeViewItemVm() { Name = "Item 3.2", Id = "3.2" },
|
||||
new TreeViewItemVm() { Name = "Item 3.3", Id = "3.3" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
MultipleLevelItems = new();
|
||||
for (int i = 1; i < 6; i++)
|
||||
{
|
||||
FirstItem firstItem = new FirstItem { Id = i, Name = $"FirstItem {i}" };
|
||||
firstItem.SecondItems = new();
|
||||
for (int j = 1; j < 6; j++)
|
||||
{
|
||||
var secondItem = new SecondItem
|
||||
SecondItem secondItem = new SecondItem { Id = j, Name = $"SecondItem {j}" };
|
||||
secondItem.ThirdItemItems = new();
|
||||
for (int k = 1; k < 6; k++)
|
||||
{
|
||||
Id = j, Name = $"SecondItem {j}",
|
||||
ThirdItemItems = []
|
||||
};
|
||||
for (var k = 1; k < 6; k++)
|
||||
{
|
||||
var thirdItem = new ThirdItem { Id = k, Name = $"ThirdItem {k}" };
|
||||
ThirdItem thirdItem = new ThirdItem { Id = k, Name = $"ThirdItem {k}" };
|
||||
secondItem.ThirdItemItems.Add(thirdItem);
|
||||
}
|
||||
|
||||
@@ -68,9 +61,9 @@ public class TreeViewVm : ObservableObject
|
||||
|
||||
public partial class TreeViewItemVm : ObservableObject
|
||||
{
|
||||
public ObservableCollection<TreeViewItemVm> Items { get; set; } = [];
|
||||
public string? Name { get; set; }
|
||||
public string? Id { get; set; }
|
||||
public ObservableCollection<TreeViewItemVm> Items { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class ItemBase
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -11,15 +10,15 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
|
||||
<!-- <PackageReference Include="Avalonia.Controls.DataGrid"/>-->
|
||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<!-- <PackageReference Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>-->
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<!-- <PackageReference Include="Avalonia.Diagnostics">-->
|
||||
<!-- <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>-->
|
||||
<!-- <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>-->
|
||||
<!-- </PackageReference>-->
|
||||
<PackageReference Include="CommunityToolkit.Mvvm"/>
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -28,8 +27,4 @@
|
||||
<!-- <ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj"/>-->
|
||||
<!-- <ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj"/>-->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaXaml Remove="Pages\VariablesDemo.axaml" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls">
|
||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||
x:CompileBindings="True">
|
||||
<ControlTheme x:Key="{x:Type controls:ColorDetailControl}" TargetType="controls:ColorDetailControl">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="controls:ColorDetailControl">
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Semi.Avalonia.Demo.Controls">
|
||||
xmlns:controls="using:Semi.Avalonia.Demo.Controls"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<controls:ColorItemControl />
|
||||
</Design.PreviewWith>
|
||||
|
||||
@@ -1,37 +1,12 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public partial class ApplicationViewModel : ObservableObject
|
||||
{
|
||||
[RelayCommand]
|
||||
private void Activate()
|
||||
{
|
||||
if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop) return;
|
||||
var mainWindow = desktop.MainWindow;
|
||||
if (mainWindow is not null && !mainWindow.IsActive)
|
||||
{
|
||||
if (mainWindow.WindowState is WindowState.Minimized)
|
||||
{
|
||||
mainWindow.WindowState = WindowState.Normal;
|
||||
}
|
||||
|
||||
mainWindow.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void JumpTo(string header)
|
||||
{
|
||||
Activate();
|
||||
WeakReferenceMessenger.Default.Send(header, "JumpTo");
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void Exit()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
@@ -10,21 +9,20 @@ namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public partial class IconDemoViewModel : ObservableObject
|
||||
{
|
||||
private readonly Icons _resources = new();
|
||||
private readonly IResourceDictionary? _resources = new Icons();
|
||||
|
||||
private readonly Dictionary<string, IconItem> _fillIcons = new();
|
||||
private readonly Dictionary<string, IconItem> _filledIcons = new();
|
||||
private readonly Dictionary<string, IconItem> _strokedIcons = new();
|
||||
private readonly Dictionary<string, IconItem> _aiIcons = new();
|
||||
|
||||
[ObservableProperty] private string? _searchText;
|
||||
|
||||
public ObservableCollection<IconTab> IconTabs { get; } = [];
|
||||
public ObservableCollection<IconItem> FilteredFillIcons { get; set; } = [];
|
||||
public ObservableCollection<IconItem> FilteredFilledIcons { get; set; } = [];
|
||||
public ObservableCollection<IconItem> FilteredStrokedIcons { get; set; } = [];
|
||||
public ObservableCollection<IconItem> FilteredAIIcons { get; set; } = [];
|
||||
|
||||
public void InitializeResources()
|
||||
{
|
||||
if (_resources is null) return;
|
||||
|
||||
foreach (var provider in _resources.MergedDictionaries)
|
||||
{
|
||||
if (provider is not ResourceDictionary dic) continue;
|
||||
@@ -32,60 +30,40 @@ public partial class IconDemoViewModel : ObservableObject
|
||||
foreach (var key in dic.Keys)
|
||||
{
|
||||
if (dic[key] is not Geometry geometry) continue;
|
||||
var resourceKey = key.ToString() ?? string.Empty;
|
||||
var icon = new IconItem
|
||||
{
|
||||
ResourceKey = resourceKey,
|
||||
ResourceKey = key.ToString(),
|
||||
Geometry = geometry
|
||||
};
|
||||
|
||||
if (resourceKey.StartsWith("SemiIconAI"))
|
||||
_aiIcons[resourceKey] = icon;
|
||||
else if (resourceKey.EndsWith("Stroked", StringComparison.InvariantCultureIgnoreCase))
|
||||
_strokedIcons[resourceKey] = icon;
|
||||
if (key.ToString().EndsWith("Stroked"))
|
||||
_strokedIcons[key.ToString().ToLowerInvariant()] = icon;
|
||||
else
|
||||
_fillIcons[resourceKey] = icon;
|
||||
_filledIcons[key.ToString().ToLowerInvariant()] = icon;
|
||||
}
|
||||
}
|
||||
|
||||
OnSearchTextChanged(string.Empty);
|
||||
|
||||
IconTabs.Clear();
|
||||
IconTabs.Add(new IconTab("Fill Icons", FilteredFillIcons));
|
||||
IconTabs.Add(new IconTab("Stroked Icons", FilteredStrokedIcons));
|
||||
IconTabs.Add(new IconTab("AI Icons", FilteredAIIcons));
|
||||
}
|
||||
|
||||
partial void OnSearchTextChanged(string? value)
|
||||
{
|
||||
var search = string.IsNullOrWhiteSpace(value) ? string.Empty : value.Trim();
|
||||
var search = value?.ToLowerInvariant() ?? string.Empty;
|
||||
|
||||
FilteredFillIcons.Clear();
|
||||
foreach (var pair in _fillIcons.Where(kv => kv.Key.Contains(search, StringComparison.InvariantCultureIgnoreCase)))
|
||||
FilteredFilledIcons.Clear();
|
||||
foreach (var pair in _filledIcons.Where(i => i.Key.Contains(search)))
|
||||
{
|
||||
FilteredFillIcons.Add(pair.Value);
|
||||
FilteredFilledIcons.Add(pair.Value);
|
||||
}
|
||||
|
||||
FilteredStrokedIcons.Clear();
|
||||
foreach (var pair in _strokedIcons.Where(kv => kv.Key.Contains(search, StringComparison.InvariantCultureIgnoreCase)))
|
||||
foreach (var pair in _strokedIcons.Where(i => i.Key.Contains(search)))
|
||||
{
|
||||
FilteredStrokedIcons.Add(pair.Value);
|
||||
}
|
||||
|
||||
FilteredAIIcons.Clear();
|
||||
foreach (var pair in _aiIcons.Where(kv => kv.Key.Contains(search, StringComparison.InvariantCultureIgnoreCase)))
|
||||
{
|
||||
FilteredAIIcons.Add(pair.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class IconTab(string header, ObservableCollection<IconItem> iconItems)
|
||||
{
|
||||
public string Header { get; set; } = header;
|
||||
public ObservableCollection<IconItem> IconItems { get; set; } = iconItems;
|
||||
}
|
||||
|
||||
public class IconItem
|
||||
{
|
||||
public string? ResourceKey { get; set; }
|
||||
|
||||
@@ -19,7 +19,7 @@ public partial class PaletteDemoViewModel : ObservableObject
|
||||
"Red", "Pink", "Purple", "Violet", "Indigo",
|
||||
"Blue", "LightBlue", "Cyan", "Teal", "Green",
|
||||
"LightGreen", "Lime", "Yellow", "Amber", "Orange",
|
||||
"Grey", "AIPurple"
|
||||
"Grey"
|
||||
];
|
||||
|
||||
private readonly IResourceDictionary? _lightResourceDictionary;
|
||||
@@ -61,38 +61,6 @@ public partial class PaletteDemoViewModel : ObservableObject
|
||||
s.Initialize(_darkResourceDictionary, color, false);
|
||||
DarkLists.Add(s);
|
||||
}
|
||||
|
||||
InitializeAIGeneralGradients();
|
||||
}
|
||||
|
||||
private void InitializeAIGeneralGradients()
|
||||
{
|
||||
if (_lightResourceDictionary is null || _darkResourceDictionary is null) return;
|
||||
|
||||
ColorListViewModel lightGradients = new ColorListViewModel { SeriesName = "AI General" };
|
||||
ColorListViewModel darkGradients = new ColorListViewModel { SeriesName = "AI General" };
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
var key = $"SemiAIGeneral{i}";
|
||||
|
||||
if (_lightResourceDictionary.TryGetValue(key, out var lightValue) && lightValue is IBrush lightBrush)
|
||||
{
|
||||
var name = $"AI General {i}";
|
||||
var item = new ColorItemViewModel(name, lightBrush, key, true, i);
|
||||
lightGradients.Color.Add(item);
|
||||
}
|
||||
|
||||
if (_darkResourceDictionary.TryGetValue(key, out var darkValue) && darkValue is IBrush darkBrush)
|
||||
{
|
||||
var name = $"AI General {i}";
|
||||
var item = new ColorItemViewModel(name, darkBrush, key, false, i);
|
||||
darkGradients.Color.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
LightLists.Add(lightGradients);
|
||||
DarkLists.Add(darkGradients);
|
||||
}
|
||||
|
||||
private void InitializeFunctionalColors()
|
||||
@@ -111,12 +79,6 @@ public partial class PaletteDemoViewModel : ObservableObject
|
||||
"Warning", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.WarningTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
"Danger", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.DangerTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
"AI General", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.AIGeneralTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
"AI Purple", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.AIPurpleTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
"AI Background", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.AIBackgroundTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
"Text", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.TextTokens));
|
||||
FunctionalColors.Add(new FunctionalColorGroupViewModel(
|
||||
@@ -180,24 +142,14 @@ public partial class ColorItemViewModel : ObservableObject
|
||||
<StaticResource x:Key="" ResourceKey="{ResourceKey}" />
|
||||
""";
|
||||
|
||||
public ColorItemViewModel(string colorDisplayName, IBrush brush, string resourceKey, bool light,
|
||||
public ColorItemViewModel(string colorDisplayName, ISolidColorBrush brush, string resourceKey, bool light,
|
||||
int index)
|
||||
{
|
||||
ColorDisplayName = colorDisplayName;
|
||||
Brush = brush;
|
||||
ResourceKey = resourceKey;
|
||||
|
||||
// Only calculate hex for solid color brushes
|
||||
if (brush is ISolidColorBrush solidBrush)
|
||||
{
|
||||
var hex = ColorConverter.ToHex.Convert(solidBrush.Color, typeof(string), false, CultureInfo.InvariantCulture);
|
||||
Hex = hex as string ?? string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hex = string.Empty;
|
||||
}
|
||||
|
||||
var hex = ColorConverter.ToHex.Convert(brush.Color, typeof(string), false, CultureInfo.InvariantCulture);
|
||||
Hex = hex as string ?? string.Empty;
|
||||
if ((light && index < 5) || (!light && index >= 5))
|
||||
{
|
||||
TextBrush = Brushes.Black;
|
||||
@@ -223,7 +175,7 @@ public partial class FunctionalColorGroupViewModel : ObservableObject
|
||||
{
|
||||
if (lightDictionary?.TryGetValue(key, out var lightValue) ?? false)
|
||||
{
|
||||
if (lightValue is IBrush lightBrush)
|
||||
if (lightValue is ISolidColorBrush lightBrush)
|
||||
{
|
||||
LightColors.Add(new ColorItemViewModel(name, lightBrush, key, true, 0));
|
||||
}
|
||||
@@ -231,7 +183,7 @@ public partial class FunctionalColorGroupViewModel : ObservableObject
|
||||
|
||||
if (darkDictionary?.TryGetValue(key, out var darkValue) ?? false)
|
||||
{
|
||||
if (darkValue is IBrush darkBrush)
|
||||
if (darkValue is ISolidColorBrush darkBrush)
|
||||
{
|
||||
DarkColors.Add(new ColorItemViewModel(name, darkBrush, key, true, 0));
|
||||
}
|
||||
|
||||
@@ -26,12 +26,4 @@ public class SplitViewDemoViewModel : ObservableObject
|
||||
SplitViewDisplayMode.Overlay,
|
||||
SplitViewDisplayMode.CompactOverlay,
|
||||
];
|
||||
|
||||
public static ObservableCollection<SplitViewPanePlacement> Placements { get; set; } =
|
||||
[
|
||||
SplitViewPanePlacement.Left,
|
||||
SplitViewPanePlacement.Right,
|
||||
SplitViewPanePlacement.Top,
|
||||
SplitViewPanePlacement.Bottom
|
||||
];
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:views="clr-namespace:Semi.Avalonia.Demo.Views"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="views:MainViewModel"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
@@ -161,9 +162,15 @@
|
||||
<TabItem Header="Button">
|
||||
<pages:ButtonDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="RepeatButton">
|
||||
<pages:RepeatButtonDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="HyperlinkButton">
|
||||
<pages:HyperlinkButtonDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="ToggleButton">
|
||||
<pages:ToggleButtonDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="CheckBox">
|
||||
<pages:CheckBoxDemo />
|
||||
</TabItem>
|
||||
@@ -236,6 +243,9 @@
|
||||
<TabItem Header="Flyout">
|
||||
<pages:FlyoutDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="GroupBox">
|
||||
<pages:GroupBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="HeaderedContentControl">
|
||||
<pages:HeaderedContentControlDemo />
|
||||
</TabItem>
|
||||
|
||||
@@ -9,7 +9,6 @@ using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Styling;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Views;
|
||||
|
||||
@@ -19,19 +18,6 @@ public partial class MainView : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new MainViewModel();
|
||||
WeakReferenceMessenger.Default.Register<string, string>(this, "JumpTo", MessageHandler);
|
||||
}
|
||||
|
||||
private void MessageHandler(object _, string message)
|
||||
{
|
||||
foreach (var item in tab.ItemsView)
|
||||
{
|
||||
if (item is TabItem tabItem && tabItem.Header is not null && tabItem.Header.Equals(message))
|
||||
{
|
||||
tab.SelectedItem = tabItem;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,97 +76,61 @@ public partial class MainViewModel : ObservableObject
|
||||
{
|
||||
Header = "简体中文",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("zh-CN")
|
||||
CommandParameter = new CultureInfo("zh-cn")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "English",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("en-US")
|
||||
CommandParameter = new CultureInfo("en-us")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "日本語",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("ja-JP")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "한국어",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("ko-KR")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "English (UK)",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("en-GB")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Italiano",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("it-IT")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Italiano (Switzerland)",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("it-CH")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Nederlands",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("nl-NL")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Nederlands (Belgium)",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("nl-BE")
|
||||
CommandParameter = new CultureInfo("ja-jp")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Українська",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("uk-UA")
|
||||
CommandParameter = new CultureInfo("uk-ua")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Русский",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("ru-RU")
|
||||
CommandParameter = new CultureInfo("ru-ru")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "繁體中文",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("zh-TW")
|
||||
CommandParameter = new CultureInfo("zh-tw")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Deutsch",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("de-DE")
|
||||
CommandParameter = new CultureInfo("de-de")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Español",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("es-ES")
|
||||
CommandParameter = new CultureInfo("es-es")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Polski",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("pl-PL")
|
||||
CommandParameter = new CultureInfo("pl-pl")
|
||||
},
|
||||
new MenuItemViewModel
|
||||
{
|
||||
Header = "Français",
|
||||
Command = SelectLocaleCommand,
|
||||
CommandParameter = new CultureInfo("fr-FR")
|
||||
CommandParameter = new CultureInfo("fr-fr")
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -247,4 +197,4 @@ public class MenuItemViewModel
|
||||
public ICommand? Command { get; set; }
|
||||
public object? CommandParameter { get; set; }
|
||||
public IList<MenuItemViewModel>? Items { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<AvaloniaVersion>12.0.999-cibuild0061987-alpha</AvaloniaVersion>
|
||||
<DataGridVersion>11.3.7</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-nightly-20260206184422"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,23 +1,17 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>11.2.1.9</Version>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageIcon>irihi.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<AvaloniaVersion>12.0.999-cibuild0058575-alpha</AvaloniaVersion>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -1,50 +0,0 @@
|
||||
# Semi.Avalonia.ColorPicker
|
||||
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.ColorPicker/)
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.ColorPicker/)
|
||||
|
||||
Avalonia ColorPicker Theme inspired by Semi Design
|
||||
|
||||
This package provides Semi Design theming for the Avalonia ColorPicker control.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia.ColorPicker
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This package requires the main Semi.Avalonia theme to be installed:
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Include the ColorPicker theme in your application:
|
||||
|
||||
```xaml
|
||||
<Application
|
||||
...
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
<Application.Styles>
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:ColorPickerSemiTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [Documentation](https://docs.irihi.tech/semi/)
|
||||
- [Repository](https://github.com/irihitech/Semi.Avalonia)
|
||||
- [Online Demo](https://irihitech.github.io/Semi.Avalonia/)
|
||||
- [Download Demo](https://github.com/irihitech/Semi.Avalonia/releases)
|
||||
|
||||
## Credits
|
||||
|
||||
[Semi Design](https://semi.design/)
|
||||
|
||||
[Avalonia](https://github.com/AvaloniaUI/Avalonia)
|
||||
@@ -1,16 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="../Package.props"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Version>12.0.0-nightly-20260210000416</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.0-nightly-20260210000416</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.9</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
|
||||
<PackageReference Include="Irihi.Avalonia.Shared"/>
|
||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||
<PackageReference Include="Irihi.Avalonia.Shared" Version="0.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
BIN
src/Semi.Avalonia.ColorPicker/irihi.png
Normal file
BIN
src/Semi.Avalonia.ColorPicker/irihi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -86,7 +86,7 @@
|
||||
<Rectangle
|
||||
Name="PART_RightGridLine"
|
||||
Grid.Column="1"
|
||||
Width="{DynamicResource DataGridGridLineThickness}"
|
||||
Width="1"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource DataGridLineBrush}" />
|
||||
</Grid>
|
||||
@@ -145,7 +145,7 @@
|
||||
<Rectangle
|
||||
Name="VerticalSeparator"
|
||||
Grid.Column="1"
|
||||
Width="{DynamicResource DataGridGridLineThickness}"
|
||||
Width="1"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{TemplateBinding SeparatorBrush}"
|
||||
IsVisible="{TemplateBinding AreSeparatorsVisible}" />
|
||||
@@ -209,7 +209,7 @@
|
||||
<Rectangle
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Height="{DynamicResource DataGridGridLineThickness}"
|
||||
Height="1"
|
||||
VerticalAlignment="Bottom"
|
||||
Fill="{DynamicResource DataGridLineBrush}"
|
||||
StrokeThickness="1" />
|
||||
@@ -250,7 +250,7 @@
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Height="{DynamicResource DataGridGridLineThickness}"
|
||||
Height="1"
|
||||
Margin="1,0,1,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="{TemplateBinding SeparatorBrush}"
|
||||
@@ -315,7 +315,7 @@
|
||||
Name="PART_BottomGridLine"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="{DynamicResource DataGridGridLineThickness}"
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch" />
|
||||
</DataGridFrozenGrid>
|
||||
</Border>
|
||||
@@ -452,7 +452,7 @@
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="5"
|
||||
Height="{DynamicResource DataGridGridLineThickness}"
|
||||
Height="1"
|
||||
Fill="{DynamicResource DataGridLineBrush}" />
|
||||
</DataGridFrozenGrid>
|
||||
</ControlTemplate>
|
||||
@@ -498,7 +498,7 @@
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Height="{DynamicResource DataGridGridLineThickness}"
|
||||
Height="1"
|
||||
VerticalAlignment="Bottom"
|
||||
Fill="{DynamicResource DataGridLineBrush}" />
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# Semi.Avalonia.DataGrid
|
||||
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.DataGrid/)
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.DataGrid/)
|
||||
|
||||
Avalonia DataGrid Theme inspired by Semi Design
|
||||
|
||||
This package provides Semi Design theming for the Avalonia DataGrid control.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia.DataGrid
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This package requires the main Semi.Avalonia theme to be installed:
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Include the DataGrid theme in your application:
|
||||
|
||||
```xaml
|
||||
<Application
|
||||
...
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
<Application.Styles>
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:DataGridSemiTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [Documentation](https://docs.irihi.tech/semi/)
|
||||
- [Repository](https://github.com/irihitech/Semi.Avalonia)
|
||||
- [Online Demo](https://irihitech.github.io/Semi.Avalonia/)
|
||||
- [Download Demo](https://github.com/irihitech/Semi.Avalonia/releases)
|
||||
|
||||
## Credits
|
||||
|
||||
[Semi Design](https://semi.design/)
|
||||
|
||||
[Avalonia](https://github.com/AvaloniaUI/Avalonia)
|
||||
@@ -2,14 +2,27 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||
<Version>11.3.7.2</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.3.7.2</PackageReleaseNotes>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.2.1.9</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.9</PackageReleaseNotes>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageIcon>irihi.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
<Title>Semi.Avalonia.DataGrid</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid"/>
|
||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
|
||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -19,7 +19,4 @@
|
||||
<StaticResource x:Key="DataGridRowGroupHeaderVisualStrokeThickness" ResourceKey="SemiBorderSpacingControl" />
|
||||
|
||||
<StaticResource x:Key="DataGridDisabledCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
|
||||
|
||||
<!-- Grid line thickness -->
|
||||
<x:Double x:Key="DataGridGridLineThickness">1</x:Double>
|
||||
</ResourceDictionary>
|
||||
@@ -1,10 +1,10 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointeroverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointeroverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="TreeDataGridGridLinesBrush" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverBackground" ResourceKey="SemiColorFill1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedBackground" ResourceKey="SemiColorFill2" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointeroverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBorderBrush" Color="Transparent" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointeroverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPointerOverForeground" ResourceKey="SemiColorText1" />
|
||||
<StaticResource x:Key="TreeDataGridHeaderPressedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="TreeDataGridCellSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||
<StaticResource x:Key="TreeDataGridColumnHeaderForeground" ResourceKey="SemiColorText2" />
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# Semi.Avalonia.TreeDataGrid
|
||||
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.TreeDataGrid/)
|
||||
[](https://www.nuget.org/packages/Semi.Avalonia.TreeDataGrid/)
|
||||
|
||||
Avalonia TreeDataGrid Theme inspired by Semi Design
|
||||
|
||||
This package provides Semi Design theming for the Avalonia TreeDataGrid control.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This package requires the main Semi.Avalonia theme to be installed:
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Include the TreeDataGrid theme in your application:
|
||||
|
||||
```xaml
|
||||
<Application
|
||||
...
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
<Application.Styles>
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:TreeDataGridSemiTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [Documentation](https://docs.irihi.tech/semi/)
|
||||
- [Repository](https://github.com/irihitech/Semi.Avalonia)
|
||||
- [Online Demo](https://irihitech.github.io/Semi.Avalonia/)
|
||||
- [Download Demo](https://github.com/irihitech/Semi.Avalonia/releases)
|
||||
|
||||
## Credits
|
||||
|
||||
[Semi Design](https://semi.design/)
|
||||
|
||||
[Avalonia](https://github.com/AvaloniaUI/Avalonia)
|
||||
@@ -2,14 +2,26 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>11.1.1.1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.TreeDataGrid 11.1.1.1</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.TreeDataGrid</Title>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.0.10.4</Version>
|
||||
<PackageReleaseNotes>Update to 11.0.10.4</PackageReleaseNotes>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageIcon>irihi.png</PackageIcon>
|
||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid"/>
|
||||
<None Include="README.md" Pack="true" PackagePath="\"/>
|
||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
|
||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls.TreeDataGrid"
|
||||
x:CompileBindings="True">
|
||||
xmlns:conv="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls.TreeDataGrid">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20">
|
||||
<TreeDataGridColumnHeader Header="123" />
|
||||
@@ -113,9 +112,9 @@
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ Border#DataGridBorder">
|
||||
<Setter Property="Background" Value="{DynamicResource TreeDataGridHeaderPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TreeDataGridHeaderPointeroverBorderBrush}" />
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TreeDataGridHeaderPointeroverForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource TreeDataGridHeaderPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource TreeDataGridHeaderPointerOverBorderBrush}" />
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TreeDataGridHeaderPointerOverForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pressed /template/ Border#DataGridBorder">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
x:Class="Semi.Avalonia.SemiPopupAnimations"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
|
||||
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={semi:PlacementToRenderTransformOriginConverter}}" />
|
||||
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Popup[IsOpen=True] LayoutTransformControl#PART_LayoutTransform">
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<TextBox Text="Hello" />
|
||||
<AutoCompleteBox Width="100" PlaceholderText="Hello" />
|
||||
<AutoCompleteBox Width="100" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
|
||||
<Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
||||
<Setter Property="Template">
|
||||
@@ -21,13 +19,11 @@
|
||||
Name="PART_TextBox"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
ClearSelectionOnLostFocus="{TemplateBinding ClearSelectionOnLostFocus}"
|
||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}" />
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
@@ -58,13 +54,43 @@
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^.Bordered">
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="iri:ClassHelper.Classes" Value="Bordered" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ListBox#PART_SelectingItemsControl">
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="False" />
|
||||
</Style>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AutoCompleteBox">
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="0"
|
||||
Classes="Bordered"
|
||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
InheritsTransform="True"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementTarget="{TemplateBinding}">
|
||||
<Border
|
||||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Margin="{DynamicResource AutoCompleteBoxPopupMargin}"
|
||||
Padding="{DynamicResource AutoCompleteBoxPopupPadding}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{DynamicResource AutoCompleteBoxPopupBackground}"
|
||||
BorderBrush="{DynamicResource AutoCompleteBoxPopupBorderBrush}"
|
||||
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
|
||||
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
|
||||
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
|
||||
<ListBox
|
||||
Name="PART_SelectingItemsControl"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||
</Border>
|
||||
</Popup>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||
|
||||
@@ -1,97 +1,11 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Theme: Light, Solid, Outline, Borderless; Default is Light -->
|
||||
<!-- Color Classes: Primary, Secondary, Tertiary, Success, Warning, Danger; Default is Primary -->
|
||||
<!-- Size Classes: Large, Small -->
|
||||
<!-- AI style Classes: Colorful -->
|
||||
<!-- PseudoClasses: :pointerover, :pressed, :disabled -->
|
||||
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="16" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" />
|
||||
<Button Content="Primary" Classes="Primary" />
|
||||
<Button Content="Secondary" Classes="Secondary" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" />
|
||||
<Button Content="Success" Classes="Success" />
|
||||
<Button Content="Warning" Classes="Warning" />
|
||||
<Button Content="Danger" Classes="Danger" />
|
||||
<Button Content="Disabled" Classes="Danger" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Disabled" Classes="Danger" Theme="{DynamicResource SolidButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Disabled" Classes="Danger" Theme="{DynamicResource OutlineButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Primary" Classes="Primary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Secondary" Classes="Secondary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Success" Classes="Success" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Warning" Classes="Warning" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Danger" Classes="Danger" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Disabled" Classes="Danger" Theme="{DynamicResource BorderlessButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Classes="Colorful" />
|
||||
<Button Content="Primary" Classes="Colorful Primary" />
|
||||
<Button Content="Secondary" Classes="Colorful Secondary" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" />
|
||||
<Button Content="Success" Classes="Colorful Success" />
|
||||
<Button Content="Warning" Classes="Colorful Warning" />
|
||||
<Button Content="Danger" Classes="Colorful Danger" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Classes="Colorful" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Success" Classes="Colorful Success" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource SolidButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource SolidButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Classes="Colorful" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Success" Classes="Colorful Success" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource OutlineButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource OutlineButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<Button Content="Default" Classes="Colorful" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Success" Classes="Colorful Success" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource BorderlessButton}" />
|
||||
<Button Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource BorderlessButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<!-- Button Theme Key: Light, Solid, Outline, Borderless; Default is Light -->
|
||||
<!-- Button Default Classes: Primary, Secondary, Tertiary, Success, Warning, Danger; Default is Primary -->
|
||||
<!-- State: default, pointerover, pressed, disabled -->
|
||||
|
||||
<!-- Button Light -->
|
||||
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||
@@ -123,6 +37,7 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
TextElement.FontWeight="{TemplateBinding FontWeight}"
|
||||
UseLayoutRounding="False" />
|
||||
@@ -132,7 +47,6 @@
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
||||
@@ -154,12 +68,6 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultColorfulPrimaryForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||
@@ -301,39 +209,6 @@
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryPressedBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidColorfulTertiaryForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryPressedBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||
@@ -366,14 +241,6 @@
|
||||
<Style Selector="^.Danger /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonOutlineColorfulPrimaryForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineColorfulPrimaryBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||
@@ -394,6 +261,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
||||
</Style>
|
||||
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="InnerIconButton" TargetType="Button">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||
@@ -53,9 +52,8 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
UseFloatingPlaceholder="{TemplateBinding UseFloatingPlaceholder}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}">
|
||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||
Watermark="{TemplateBinding Watermark}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
@@ -173,7 +171,7 @@
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#Background">
|
||||
@@ -215,8 +213,8 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointeroverBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
|
||||
|
||||
@@ -50,33 +50,21 @@
|
||||
Data="{StaticResource WindowExpandGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_MinimizeButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Minimize"
|
||||
Win32Properties.NonClientHitTestResult="MinButton">
|
||||
<Button Name="PART_MinimizeButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_MinimizeButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowMinimizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_RestoreButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Maximize"
|
||||
Win32Properties.NonClientHitTestResult="MaxButton">
|
||||
<Button Name="PART_RestoreButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_RestoreButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Data="{StaticResource WindowMaximizeGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Button
|
||||
Name="PART_CloseButton"
|
||||
Theme="{StaticResource CaptionButton}"
|
||||
AutomationProperties.Name="Close"
|
||||
Win32Properties.NonClientHitTestResult="Close">
|
||||
<Button Name="PART_CloseButton" Theme="{StaticResource CaptionButton}">
|
||||
<PathIcon
|
||||
Name="PART_CloseButtonIcon"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi">
|
||||
xmlns:converter="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Spacing="20" Width="800" Height="800">
|
||||
<StackPanel.Styles>
|
||||
@@ -197,8 +197,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
|
||||
ItemsSource="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemToObjectConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
ItemsSource="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemToObjectConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
SelectedIndex="{TemplateBinding SelectedIndex, Mode=TwoWay}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -213,7 +213,7 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Previous}" />
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
@@ -222,7 +222,7 @@
|
||||
Theme="{DynamicResource CarouselButton}"
|
||||
Margin="{DynamicResource CarouselButtonMargin}"
|
||||
Foreground="{DynamicResource CarouselButtonForeground}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static semi:ItemConverter.ItemVisibleConverter}}"
|
||||
IsVisible="{TemplateBinding ItemCount, Converter={x:Static converter:ItemConverter.ItemVisibleConverter}}"
|
||||
Command="{Binding $parent[Carousel].Next}"
|
||||
RenderTransform="rotate(180deg)" />
|
||||
</Grid>
|
||||
|
||||
@@ -62,16 +62,13 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^:pointerover /template/ Border#NormalRectangle">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
|
||||
@@ -222,16 +219,13 @@
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^:pointerover">
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@@ -343,15 +337,12 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" />
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{TemplateBinding Text, Mode=TwoWay}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}"
|
||||
Watermark="{TemplateBinding PlaceholderText}"
|
||||
IsVisible="{TemplateBinding IsEditable}" />
|
||||
|
||||
<Button
|
||||
@@ -217,7 +217,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#Background">
|
||||
@@ -273,8 +273,8 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointeroverBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#Background">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20">
|
||||
<Border Padding="20">
|
||||
<DatePickerPresenter />
|
||||
<DatePicker Width="500" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
||||
<Setter Property="Width" Value="296" />
|
||||
@@ -142,7 +141,6 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
|
||||
<Setter Property="MinWidth" Value="296" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="DatePicker">
|
||||
<DataValidationErrors>
|
||||
@@ -154,8 +152,8 @@
|
||||
Name="PART_FlyoutButton"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MaxWidth="{TemplateBinding MaxWidth}"
|
||||
Width="298"
|
||||
MinWidth="298"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
@@ -241,8 +239,7 @@
|
||||
Margin="0,0,9,0"
|
||||
Command="{Binding $parent[DatePicker].Clear}"
|
||||
Content="{DynamicResource IconButtonClearData}"
|
||||
IsVisible="False"
|
||||
Focusable="False" />
|
||||
IsVisible="False" />
|
||||
</Grid>
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
|
||||
@@ -2,90 +2,16 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="16" Spacing="16">
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" />
|
||||
<DropDownButton Content="Success" Classes="Success" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" />
|
||||
<DropDownButton Content="Disabled" Classes="Danger" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Danger" Theme="{DynamicResource SolidDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Danger" Theme="{DynamicResource OutlineDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Primary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Success" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Warning" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Danger" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Danger" Theme="{DynamicResource BorderlessDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Classes="Colorful" />
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" />
|
||||
<DropDownButton Content="Secondary" Classes="Colorful Secondary" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" />
|
||||
<DropDownButton Content="Success" Classes="Colorful Success" />
|
||||
<DropDownButton Content="Warning" Classes="Colorful Warning" />
|
||||
<DropDownButton Content="Danger" Classes="Colorful Danger" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Classes="Colorful" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Colorful Success" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource SolidDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource SolidDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Classes="Colorful" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Colorful Success" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource OutlineDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource OutlineDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<WrapPanel ItemSpacing="16">
|
||||
<DropDownButton Content="Default" Classes="Colorful" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Secondary" Classes="Colorful Secondary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Success" Classes="Colorful Success" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Warning" Classes="Colorful Warning" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Danger" Classes="Colorful Danger" Theme="{DynamicResource BorderlessDropDownButton}" />
|
||||
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{DynamicResource BorderlessDropDownButton}" IsEnabled="False" />
|
||||
</WrapPanel>
|
||||
<StackPanel Margin="20">
|
||||
<DropDownButton Content="Button" />
|
||||
<DropDownButton Classes="Primary" Content="Button" />
|
||||
<DropDownButton Classes="Secondary" Content="Button" />
|
||||
<DropDownButton IsEnabled="False" Classes="Tertiary" Content="Button" />
|
||||
<DropDownButton Theme="{DynamicResource SolidDropDownButton}" Classes="Success" Content="Button" />
|
||||
<DropDownButton Theme="{DynamicResource OutlineDropDownButton}" Classes="Warning" Content="Button" />
|
||||
<DropDownButton Theme="{DynamicResource BorderlessDropDownButton}" Classes="Danger" Content="Button" />
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
|
||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||
@@ -110,12 +36,13 @@
|
||||
Padding="{TemplateBinding Padding}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel HorizontalSpacing="8">
|
||||
<DockPanel>
|
||||
<PathIcon
|
||||
Name="DropDownGlyph"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="8,0,0,0"
|
||||
Data="{DynamicResource DropDownButtonIconGlyph}"
|
||||
Foreground="{Binding #PART_ContentPresenter.Foreground}"
|
||||
IsHitTestVisible="False"
|
||||
@@ -126,7 +53,8 @@
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
RecognizesAccessKey="True" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
@@ -137,10 +65,6 @@
|
||||
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
</Style>
|
||||
@@ -160,12 +84,6 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultColorfulPrimaryForeground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||
@@ -325,40 +243,6 @@
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary">
|
||||
<Style Selector="^ /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulPrimaryPressedBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulPrimaryPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidColorfulTertiaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryPointeroverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidColorfulTertiaryPressedBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidColorfulTertiaryPressedBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" />
|
||||
</Style>
|
||||
@@ -393,16 +277,6 @@
|
||||
<Style Selector="^.Danger /template/ Border#PART_Background">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.Colorful">
|
||||
<Style Selector="^.Primary">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonOutlineColorfulPrimaryForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#PART_Background">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineColorfulPrimaryBorderBrush}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
Grid.Row="0"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
RecognizesAccessKey="True"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
@@ -51,6 +52,7 @@
|
||||
Grid.Row="1"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}"
|
||||
RecognizesAccessKey="True"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
@@ -61,14 +63,6 @@
|
||||
</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>
|
||||
|
||||
<ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl">
|
||||
|
||||
@@ -39,15 +39,12 @@
|
||||
Name="PART_ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
RecognizesAccessKey="True" />
|
||||
</DockPanel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonPointeroverForeground}" />
|
||||
</Style>
|
||||
|
||||
@@ -75,16 +75,7 @@
|
||||
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
|
||||
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Colorful Gradient" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Gradient Ghost" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Gradient Solid" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<Label Classes="Colorful" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Ghost" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
<Label Classes="Colorful Solid" Theme="{DynamicResource TagLabel}">AI</Label>
|
||||
</WrapPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type Label}" TargetType="Label">
|
||||
@@ -103,12 +94,10 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontSize="{TemplateBinding FontSize}" />
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="^.Secondary">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
||||
</Style>
|
||||
@@ -173,7 +162,6 @@
|
||||
<!-- Shape: Square,Circle. Default is Square -->
|
||||
<!-- Size: Small, Large. Default is Small -->
|
||||
<!-- Color: Red, Pink, Purple, Violet, Indigo, Blue, LightBlue, Cyan, Teal, Green, LightGreen, Lime, Yellow, Amber, Orange, Grey, White. Default is Grey -->
|
||||
<!-- AI style: Colorful, Gradient -->
|
||||
<ControlTheme x:Key="TagLabel" TargetType="Label">
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource LabelTagBorderThickness}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource LabelTagSmallHeight}" />
|
||||
@@ -199,12 +187,10 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="True" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="Padding" Value="{DynamicResource LabelTagLargePadding}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource LabelTagLargeHeight}" />
|
||||
@@ -409,34 +395,5 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagSolidWhiteBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagSolidWhiteBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Colorful">
|
||||
<Setter Property="FontWeight" Value="{StaticResource LabelTagColorfulFontWeight}" />
|
||||
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulLightForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulLightBackground}" />
|
||||
<Style Selector="^.Ghost">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGhostForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGhostBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagColorfulGhostBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.Solid">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulSolidBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Gradient">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientLightForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientLightBackground}" />
|
||||
<Style Selector="^.Ghost">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientGhostForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientGhostBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagColorfulGradientGhostBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^.Solid">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelTagColorfulGradientSolidForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LabelTagColorfulGradientSolidBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -1,9 +1,9 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared"
|
||||
xmlns:dialogs="using:Avalonia.Dialogs"
|
||||
xmlns:internal="using:Avalonia.Dialogs.Internal"
|
||||
xmlns:converters="using:Semi.Avalonia.Converters"
|
||||
xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
|
||||
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs"
|
||||
xmlns:cvt="using:Avalonia.Controls.Converters">
|
||||
<Design.PreviewWith>
|
||||
<Border
|
||||
@@ -14,11 +14,11 @@
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<iri:ResourceConverter x:Key="Icons">
|
||||
<converters:KeyToPathConverter x:Key="Icons">
|
||||
<StreamGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</StreamGeometry>
|
||||
</iri:ResourceConverter>
|
||||
</converters:KeyToPathConverter>
|
||||
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser">
|
||||
@@ -77,7 +77,7 @@
|
||||
<TextBox
|
||||
IsVisible="{Binding !SelectingFolder}"
|
||||
Text="{Binding FileName}"
|
||||
PlaceholderText="{DynamicResource STRING_CHOOSER_FILE_NAME}" />
|
||||
Watermark="{DynamicResource STRING_CHOOSER_FILE_NAME}" />
|
||||
</DockPanel>
|
||||
<CheckBox
|
||||
VerticalAlignment="Center"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
<ControlTheme x:Key="MenuScrollViewer" TargetType="ScrollViewer">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ScrollViewer">
|
||||
<DockPanel>
|
||||
@@ -167,7 +166,8 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
RecognizesAccessKey="True" />
|
||||
<TextBlock
|
||||
Name="PART_InputGestureText"
|
||||
Grid.Column="3"
|
||||
@@ -222,10 +222,6 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:icon /template/ Viewbox#PART_IconPresenter">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
@@ -350,7 +346,7 @@
|
||||
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
||||
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||
<ScrollViewer Theme="{StaticResource MenuScrollViewer}" IsScrollChainingEnabled="False" CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||
<ScrollViewer Theme="{StaticResource MenuScrollViewer}" CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="True"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" />
|
||||
<Setter Property="PlaceholderForeground" Value="{DynamicResource TextBoxPlaceholderForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="NumericUpDown">
|
||||
<DataValidationErrors>
|
||||
@@ -39,8 +38,7 @@
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||
PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
|
||||
PlaceholderText="{TemplateBinding PlaceholderText}" />
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
</ButtonSpinner>
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
@@ -59,7 +57,7 @@
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointeroverBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ TextBox#PART_TextBox">
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="Inline.TextDecorations" Value="" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="PopupRoot">
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
@@ -30,10 +29,6 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type OverlayPopupHost}" TargetType="OverlayPopupHost">
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="Inline.TextDecorations" Value="" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:semi="https://irihi.tech/semi"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:semiConverters="clr-namespace:Semi.Avalonia.Converters">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20" Spacing="20">
|
||||
<ProgressBar
|
||||
@@ -338,6 +338,8 @@
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<semiConverters:PositionToAngleConverter x:Key="AngleConverter" />
|
||||
|
||||
<ControlTheme x:Key="ProgressRing" TargetType="ProgressBar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarIndicatorBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ProgressBarBackground}" />
|
||||
@@ -363,7 +365,8 @@
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,Converter={semi:PositionToAngleConverter}}" />
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<Arc
|
||||
Name="IndeterminateIndicator"
|
||||
Opacity="0"
|
||||
@@ -373,7 +376,8 @@
|
||||
StrokeJoin="Round"
|
||||
StrokeLineCap="Round"
|
||||
StrokeThickness="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SweepAngle="{TemplateBinding Percentage,Converter={semi:PositionToAngleConverter}}" />
|
||||
SweepAngle="{TemplateBinding Percentage,
|
||||
Converter={StaticResource AngleConverter}}" />
|
||||
<TextBlock
|
||||
Name="PART_ProgressText"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -439,4 +443,4 @@
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -64,16 +64,13 @@
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
@@ -165,14 +162,12 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
TextElement.FontWeight="{TemplateBinding FontWeight}"
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="^:unchecked">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Style Selector="^:pointerover">
|
||||
@@ -254,6 +249,7 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
RecognizesAccessKey="True"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
@@ -261,10 +257,6 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
@@ -377,13 +369,11 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="^:unchecked">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCardDefaultBorderBrush}" />
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
MinWidth="{StaticResource ScrollBarThickness}"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Column left"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
@@ -76,7 +75,6 @@
|
||||
VerticalAlignment="Stretch"
|
||||
CornerRadius="0"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Page left"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
@@ -87,10 +85,9 @@
|
||||
VerticalAlignment="Stretch"
|
||||
CornerRadius="0"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Page right"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb Name="thumb" AutomationProperties.Name="Position" />
|
||||
<Thumb Name="thumb" />
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Name="PART_LineDownButton"
|
||||
@@ -99,7 +96,6 @@
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Column right"
|
||||
Theme="{DynamicResource ScrollBarRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
@@ -127,7 +123,6 @@
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Line up"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
@@ -151,7 +146,6 @@
|
||||
VerticalAlignment="Stretch"
|
||||
CornerRadius="0"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Page up"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}" />
|
||||
</Track.DecreaseButton>
|
||||
<Track.IncreaseButton>
|
||||
@@ -162,10 +156,9 @@
|
||||
VerticalAlignment="Stretch"
|
||||
CornerRadius="0"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Page down"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}" />
|
||||
</Track.IncreaseButton>
|
||||
<Thumb Name="thumb" AutomationProperties.Name="Position" />
|
||||
<Thumb Name="thumb" />
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Name="PART_LineDownButton"
|
||||
@@ -174,7 +167,6 @@
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Focusable="False"
|
||||
AutomationProperties.Name="Line down"
|
||||
Theme="{StaticResource ScrollBarRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<MenuFlyout
|
||||
x:Key="SelectableTextBlockContextFlyout"
|
||||
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
|
||||
Placement="Bottom">
|
||||
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
|
||||
<MenuItem
|
||||
Command="{Binding $parent[SelectableTextBlock].Copy}"
|
||||
Header="{DynamicResource STRING_MENU_COPY}"
|
||||
|
||||
@@ -92,12 +92,11 @@
|
||||
VerticalAlignment="Bottom"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Top"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
TickFrequency="{TemplateBinding TickFrequency}"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<TickBar
|
||||
Name="BottomTickBar"
|
||||
@@ -107,12 +106,11 @@
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Bottom"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
TickFrequency="{TemplateBinding TickFrequency}"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
@@ -171,12 +169,11 @@
|
||||
HorizontalAlignment="Right"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Left"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
TickFrequency="{TemplateBinding TickFrequency}"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<TickBar
|
||||
Name="RightTickBar"
|
||||
@@ -186,12 +183,11 @@
|
||||
HorizontalAlignment="Left"
|
||||
Fill="{DynamicResource SliderTickForeground}"
|
||||
IsVisible="False"
|
||||
Maximum="{TemplateBinding Maximum}"
|
||||
Minimum="{TemplateBinding Minimum}"
|
||||
Orientation="{TemplateBinding Orientation}"
|
||||
Maximum="{TemplateBinding Slider.Maximum}"
|
||||
Minimum="{TemplateBinding Slider.Minimum}"
|
||||
Orientation="{TemplateBinding Slider.Orientation}"
|
||||
Placement="Right"
|
||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||
TickFrequency="{TemplateBinding TickFrequency}"
|
||||
TickFrequency="{TemplateBinding Slider.TickFrequency}"
|
||||
Ticks="{TemplateBinding Ticks}" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:iri="https://irihi.tech/shared">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Width="500" Height="500" Margin="20" Spacing="8">
|
||||
<SplitButton
|
||||
Theme="{DynamicResource OutlineSplitButton}"
|
||||
Classes="Danger"
|
||||
CornerRadius="12"
|
||||
Theme="{DynamicResource SolidSplitButton}"
|
||||
Content="Hello" />
|
||||
<ToggleSplitButton
|
||||
IsChecked="True"
|
||||
@@ -47,14 +44,12 @@
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
TextElement.FontWeight="{TemplateBinding FontWeight}"
|
||||
UseLayoutRounding="False" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="RecognizesAccessKey" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="{x:Type SplitButton}" TargetType="SplitButton">
|
||||
@@ -76,40 +71,47 @@
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitButton">
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="{DynamicResource SplitButtonSeparatorWidth}">
|
||||
<Button
|
||||
Name="PART_PrimaryButton"
|
||||
Grid.Column="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Left}}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}" />
|
||||
<Button
|
||||
Name="PART_SecondaryButton"
|
||||
Grid.Column="1"
|
||||
Padding="0"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius, Converter={iri:CornerRadiusMixerConverter Right}}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
</Grid>
|
||||
<Border
|
||||
BackgroundSizing="OuterBorderEdge"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel>
|
||||
<Button
|
||||
Name="PART_SecondaryButton"
|
||||
Padding="4,0"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="0"
|
||||
DockPanel.Dock="Right"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Data="{DynamicResource SplitButtonIconGlyph}"
|
||||
Foreground="{Binding $parent[Button].Foreground}" />
|
||||
</Button>
|
||||
<Rectangle
|
||||
Name="SeparatorBorder"
|
||||
Width="{DynamicResource SplitButtonSeparatorWidth}"
|
||||
VerticalAlignment="Stretch"
|
||||
DockPanel.Dock="Right"
|
||||
Fill="Transparent"
|
||||
StrokeThickness="0" />
|
||||
<Button
|
||||
Name="PART_PrimaryButton"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="0"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Theme="{DynamicResource SemiSplitButtonElement}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView">
|
||||
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
||||
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
||||
@@ -101,7 +100,7 @@
|
||||
|
||||
<Style Selector="^:right">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitView">
|
||||
<ControlTemplate>
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -186,190 +185,8 @@
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:top">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitView">
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- why is this throwing a binding error? -->
|
||||
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Panel
|
||||
Name="PART_PaneRoot"
|
||||
VerticalAlignment="Top"
|
||||
Background="{TemplateBinding PaneBackground}"
|
||||
ClipToBounds="True"
|
||||
ZIndex="100">
|
||||
<ContentPresenter
|
||||
Name="PART_PanePresenter"
|
||||
Content="{TemplateBinding Pane}"
|
||||
ContentTemplate="{TemplateBinding PaneTemplate}" />
|
||||
<Rectangle
|
||||
Name="HCPaneBorder"
|
||||
Height="1"
|
||||
VerticalAlignment="Bottom"
|
||||
Fill="{DynamicResource SplitViewSeparatorBackground}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="ContentRoot">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Rectangle
|
||||
Name="LightDismissLayer"
|
||||
Fill="Transparent"
|
||||
IsVisible="False" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactinline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactoverlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<!-- RowSpan should be 2 -->
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:bottom">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="SplitView">
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Panel
|
||||
Name="PART_PaneRoot"
|
||||
VerticalAlignment="Bottom"
|
||||
Background="{TemplateBinding PaneBackground}"
|
||||
ClipToBounds="True"
|
||||
ZIndex="100">
|
||||
<ContentPresenter
|
||||
Name="PART_PanePresenter"
|
||||
Content="{TemplateBinding Pane}"
|
||||
ContentTemplate="{TemplateBinding PaneTemplate}" />
|
||||
<Rectangle
|
||||
Name="HCPaneBorder"
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource SplitViewSeparatorBackground}" />
|
||||
</Panel>
|
||||
|
||||
<Panel Name="ContentRoot">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Rectangle
|
||||
Name="LightDismissLayer"
|
||||
Fill="Transparent"
|
||||
IsVisible="False" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactinline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:compactoverlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:inline">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:open">
|
||||
<Style Selector="^:left /template/ Panel#PART_PaneRoot">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
@@ -380,39 +197,6 @@
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^:right /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Width"
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^:top /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Height"
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^:bottom /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Height"
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
@@ -427,7 +211,7 @@
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:closed">
|
||||
<Style Selector="^:left /template/ Panel#PART_PaneRoot">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
@@ -438,39 +222,6 @@
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:right /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Width"
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:top /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Height"
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^:bottom /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<DoubleTransition
|
||||
Easing="{StaticResource SplitViewPaneAnimationEasing}"
|
||||
Property="Height"
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
@@ -494,8 +245,6 @@
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<!-- Obsolete after Avalonia 11.3.7 -->
|
||||
<ControlTheme x:Key="VerticalSplitView" TargetType="SplitView">
|
||||
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
|
||||
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />
|
||||
@@ -507,7 +256,8 @@
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- why is this throwing a binding error? -->
|
||||
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
<RowDefinition
|
||||
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -545,7 +295,8 @@
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
</Style>
|
||||
@@ -559,7 +310,8 @@
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
@@ -572,7 +324,8 @@
|
||||
<!-- RowSpan should be 2 -->
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
@@ -584,7 +337,8 @@
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
@@ -599,7 +353,8 @@
|
||||
<Grid Name="Container" Background="{TemplateBinding Background}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
<RowDefinition
|
||||
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneColumnGridLength}" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Panel
|
||||
@@ -633,7 +388,8 @@
|
||||
|
||||
<Style Selector="^:overlay">
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
</Style>
|
||||
@@ -647,7 +403,8 @@
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
@@ -659,7 +416,8 @@
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
@@ -671,7 +429,8 @@
|
||||
<Style Selector="^ /template/ Panel#PART_PaneRoot">
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.Row" Value="1" />
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Panel#ContentRoot">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
@@ -690,7 +449,8 @@
|
||||
Duration="{StaticResource SplitViewPaneAnimationOpenDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OpenPaneLength}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
@@ -715,7 +475,8 @@
|
||||
Duration="{StaticResource SplitViewPaneAnimationCloseDuration}" />
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
<Setter Property="Height"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ClosedPaneWidth}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Rectangle#LightDismissLayer">
|
||||
<Setter Property="Transitions">
|
||||
|
||||
@@ -42,10 +42,6 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<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}" />
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user