mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-19 07:56:36 +08:00
Compare commits
1 Commits
copilot/fi
...
textbox-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf4705dbde |
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
@@ -24,6 +24,9 @@ jobs:
|
|||||||
- name: Publish .NET Project
|
- name: Publish .NET Project
|
||||||
run: dotnet publish $PROJECT_PATH -c Release --nologo
|
run: dotnet publish $PROJECT_PATH -c Release --nologo
|
||||||
|
|
||||||
|
- name: Change base-tag in index.html
|
||||||
|
run: sed -i 's#<base href="/" />#<base href="/Semi.Avalonia/" />#g' $OUTPUT_PATH/index.html
|
||||||
|
|
||||||
- name: copy index.html to 404.html
|
- name: copy index.html to 404.html
|
||||||
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
||||||
|
|
||||||
|
|||||||
38
.github/workflows/pack-nightly.yml
vendored
38
.github/workflows/pack-nightly.yml
vendored
@@ -10,19 +10,23 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
Semi_Avalonia:
|
Semi_Avalonia:
|
||||||
description: 'Pack Semi.Avalonia'
|
description: 'Pack Semi.Avalonia'
|
||||||
default: true
|
required: true
|
||||||
|
default: 'true'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_ColorPicker:
|
Semi_Avalonia_ColorPicker:
|
||||||
description: 'Pack Semi.Avalonia.ColorPicker'
|
description: 'Pack Semi.Avalonia.ColorPicker'
|
||||||
default: true
|
required: true
|
||||||
|
default: 'true'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_DataGrid:
|
Semi_Avalonia_DataGrid:
|
||||||
description: 'Pack Semi.Avalonia.DataGrid'
|
description: 'Pack Semi.Avalonia.DataGrid'
|
||||||
default: false
|
required: true
|
||||||
|
default: 'false'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_TreeDataGrid:
|
Semi_Avalonia_TreeDataGrid:
|
||||||
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
||||||
default: false
|
required: true
|
||||||
|
default: 'false'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -31,39 +35,39 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
run: |
|
run: |
|
||||||
VERSION_TIMESTAMP=$(date +'%Y%m%d%H%M%S')
|
VERSION_TIMESTAMP=$(date +'%Y%m%d%H%M%S')
|
||||||
VERSION="${{ inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
|
VERSION="${{ github.event.inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia
|
- name: Pack Semi.Avalonia
|
||||||
if: ${{ inputs.Semi_Avalonia }}
|
if: ${{ github.event.inputs.Semi_Avalonia == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia -o nugets /p:Version=${{ env.VERSION }}
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets /p:Version=${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.ColorPicker
|
- name: Pack Semi.Avalonia.ColorPicker
|
||||||
if: ${{ inputs.Semi_Avalonia_ColorPicker }}
|
if: ${{ github.event.inputs.Semi_Avalonia_ColorPicker == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.ColorPicker -o nugets /p:Version=${{ env.VERSION }}
|
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets /p:Version=${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.DataGrid
|
- name: Pack Semi.Avalonia.DataGrid
|
||||||
if: ${{ inputs.Semi_Avalonia_DataGrid }}
|
if: ${{ github.event.inputs.Semi_Avalonia_DataGrid == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.DataGrid -o nugets /p:Version=${{ env.VERSION }}
|
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets /p:Version=${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.TreeDataGrid
|
- name: Pack Semi.Avalonia.TreeDataGrid
|
||||||
if: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
|
if: ${{ github.event.inputs.Semi_Avalonia_TreeDataGrid == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.TreeDataGrid -o nugets /p:Version=${{ env.VERSION }}
|
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets /p:Version=${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Add NuGet Source
|
- name: Add NuGet Source
|
||||||
run: dotnet nuget add source ${{ secrets.IRIHI_NUGET_NIGHTLY_FEED }} -n irihi.tech -u ${{ secrets.IRIHI_NUGET_USERNAME }} -p ${{ secrets.IRIHI_NUGET_PASSWORD }} --store-password-in-clear-text
|
run: dotnet nuget add source ${{ secrets.IRIHI_NUGET_NIGHTLY_FEED }} -n irihi.tech -u ${{ secrets.IRIHI_NUGET_USERNAME }} -p ${{ secrets.IRIHI_NUGET_PASSWORD }} --store-password-in-clear-text
|
||||||
|
|
||||||
- name: Publish Nightly Package
|
- name: Publish Nightly Package
|
||||||
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.IRIHI_NUGET_API_KEY }} --source irihi.tech --skip-duplicate
|
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.IRIHI_NUGET_API_KEY }} --source irihi.tech --skip-duplicate
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.6.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: nugets
|
name: nugets
|
||||||
path: nugets
|
path: ./nugets
|
||||||
if: always()
|
if: always()
|
||||||
60
.github/workflows/pack.yml
vendored
60
.github/workflows/pack.yml
vendored
@@ -3,43 +3,26 @@ name: Pack to NuGet
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
Upload_to_NuGet:
|
|
||||||
description: 'Upload to NuGet'
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
Semi_Avalonia:
|
Semi_Avalonia:
|
||||||
description: 'Pack Semi.Avalonia'
|
description: 'Pack Semi.Avalonia'
|
||||||
default: true
|
required: true
|
||||||
|
default: 'true'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_ColorPicker:
|
Semi_Avalonia_ColorPicker:
|
||||||
description: 'Pack Semi.Avalonia.ColorPicker'
|
description: 'Pack Semi.Avalonia.ColorPicker'
|
||||||
default: true
|
required: true
|
||||||
|
default: 'true'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_DataGrid:
|
Semi_Avalonia_DataGrid:
|
||||||
description: 'Pack Semi.Avalonia.DataGrid'
|
description: 'Pack Semi.Avalonia.DataGrid'
|
||||||
default: false
|
required: true
|
||||||
|
default: 'false'
|
||||||
type: boolean
|
type: boolean
|
||||||
Semi_Avalonia_TreeDataGrid:
|
Semi_Avalonia_TreeDataGrid:
|
||||||
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
||||||
default: false
|
required: true
|
||||||
|
default: 'false'
|
||||||
type: boolean
|
type: boolean
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
Upload_to_NuGet:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
Semi_Avalonia:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
Semi_Avalonia_ColorPicker:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
Semi_Avalonia_DataGrid:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
Semi_Avalonia_TreeDataGrid:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Pack_to_NuGet:
|
Pack_to_NuGet:
|
||||||
@@ -47,31 +30,30 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia
|
- name: Pack Semi.Avalonia
|
||||||
if: ${{ inputs.Semi_Avalonia }}
|
if: ${{ github.event.inputs.Semi_Avalonia == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia -o nugets
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.ColorPicker
|
- name: Pack Semi.Avalonia.ColorPicker
|
||||||
if: ${{ inputs.Semi_Avalonia_ColorPicker }}
|
if: ${{ github.event.inputs.Semi_Avalonia_ColorPicker == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.ColorPicker -o nugets
|
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.DataGrid
|
- name: Pack Semi.Avalonia.DataGrid
|
||||||
if: ${{ inputs.Semi_Avalonia_DataGrid }}
|
if: ${{ github.event.inputs.Semi_Avalonia_DataGrid == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.DataGrid -o nugets
|
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
|
||||||
|
|
||||||
- name: Pack Semi.Avalonia.TreeDataGrid
|
- name: Pack Semi.Avalonia.TreeDataGrid
|
||||||
if: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
|
if: ${{ github.event.inputs.Semi_Avalonia_TreeDataGrid == 'true' }}
|
||||||
run: dotnet pack src/Semi.Avalonia.TreeDataGrid -o nugets
|
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets
|
||||||
|
|
||||||
- name: Upload to NuGet
|
- name: Publish NuGet package
|
||||||
if: ${{ inputs.Upload_to_NuGet }}
|
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||||
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.6.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: nugets
|
name: nugets
|
||||||
path: nugets
|
path: ./nugets
|
||||||
if: always()
|
if: always()
|
||||||
263
.github/workflows/publish.yml
vendored
263
.github/workflows/publish.yml
vendored
@@ -3,223 +3,116 @@ name: Publish Demo
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
win-x64:
|
platform:
|
||||||
description: 'Windows x64'
|
description: 'Platform to publish'
|
||||||
default: false
|
required: true
|
||||||
type: boolean
|
default: 'all'
|
||||||
win-x64-aot:
|
type: choice
|
||||||
description: 'Windows x64 AOT'
|
options:
|
||||||
default: false
|
- 'windows'
|
||||||
type: boolean
|
- 'linux'
|
||||||
linux-x64:
|
- 'android'
|
||||||
description: 'Linux x64'
|
- 'all'
|
||||||
default: false
|
include_aot:
|
||||||
type: boolean
|
description: 'Include Windows AOT packaging'
|
||||||
linux-x64-aot:
|
required: true
|
||||||
description: 'Linux x64 AOT'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
drm-linux-x64:
|
|
||||||
description: 'DRM Linux x64'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
drm-linux-x64-aot:
|
|
||||||
description: 'DRM Linux x64 AOT'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
osx-arm64:
|
|
||||||
description: 'macOS arm64'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
osx-arm64-aot:
|
|
||||||
description: 'macOS arm64 AOT'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
android-arm64:
|
|
||||||
description: 'Android arm64'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
win-x64:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
default: true
|
||||||
win-x64-aot:
|
|
||||||
type: boolean
|
type: boolean
|
||||||
|
include_drm:
|
||||||
|
description: 'Include Linux DRM packaging'
|
||||||
|
required: true
|
||||||
default: true
|
default: true
|
||||||
linux-x64:
|
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
|
||||||
linux-x64-aot:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
drm-linux-x64:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
drm-linux-x64-aot:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
osx-arm64:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
osx-arm64-aot:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
android-arm64:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
win-x64:
|
windows:
|
||||||
if: ${{inputs.win-x64}}
|
if: ${{ github.event.inputs.platform == 'windows' || github.event.inputs.platform == 'all' }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
|
- name: Make upload directory
|
||||||
|
run: mkdir upload
|
||||||
|
|
||||||
- name: Publish win-x64
|
- 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
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
- name: Zip win-x64
|
||||||
with:
|
run: |
|
||||||
name: Semi.Avalonia.Demo.Desktop.win-x64
|
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
|
||||||
path: |
|
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
win-x64-aot:
|
|
||||||
if: ${{inputs.win-x64-aot}}
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
- name: Enable Native AOT in .csproj
|
- 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
|
if: ${{ github.event.inputs.include_aot == 'true' }}
|
||||||
|
run: |
|
||||||
|
sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||||
|
sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||||
|
|
||||||
- name: Publish win-x64 AOT
|
- name: Publish win-x64 AOT
|
||||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish
|
if: ${{ github.event.inputs.include_aot == 'true' }}
|
||||||
- name: Upload a Build Artifact
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
linux-x64:
|
- name: Zip win-x64 AOT
|
||||||
if: ${{inputs.linux-x64}}
|
if: ${{ github.event.inputs.include_aot == 'true' }}
|
||||||
|
run: |
|
||||||
|
$files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
|
||||||
|
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v4.3.1
|
||||||
|
with:
|
||||||
|
name: windows
|
||||||
|
path: ./upload
|
||||||
|
|
||||||
|
linux:
|
||||||
|
if: ${{ github.event.inputs.platform == 'linux' || github.event.inputs.platform == 'all' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
|
- name: Make upload directory
|
||||||
|
run: mkdir upload
|
||||||
|
|
||||||
- name: Publish linux-x64
|
- 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
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Desktop.linux-x64
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
linux-x64-aot:
|
- name: Zip linux-x64
|
||||||
if: ${{inputs.linux-x64-aot}}
|
run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
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
|
|
||||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
drm-linux-x64:
|
|
||||||
if: ${{inputs.drm-linux-x64}}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.2.2
|
|
||||||
- name: Publish linux-x64 DRM
|
- 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
|
if: ${{ github.event.inputs.include_drm == 'true' }}
|
||||||
- name: Upload a Build Artifact
|
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Drm.linux-x64
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
drm-linux-x64-aot:
|
- name: Zip linux-x64 DRM
|
||||||
if: ${{inputs.drm-linux-x64-aot}}
|
if: ${{ github.event.inputs.include_drm == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
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
|
|
||||||
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
osx-arm64:
|
|
||||||
if: ${{inputs.osx-arm64}}
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
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
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.6.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Semi.Avalonia.Demo.Desktop.osx-arm64
|
name: linux
|
||||||
path: |
|
path: ./upload
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
osx-arm64-aot:
|
android:
|
||||||
if: ${{inputs.osx-arm64-aot}}
|
if: ${{ github.event.inputs.platform == 'android' || github.event.inputs.platform == 'all' }}
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
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
|
|
||||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish
|
|
||||||
- name: Upload a Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4.6.2
|
|
||||||
with:
|
|
||||||
name: Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
|
|
||||||
path: |
|
|
||||||
publish
|
|
||||||
!publish/*.pdb
|
|
||||||
|
|
||||||
android-arm64:
|
|
||||||
if: ${{inputs.android-arm64 }}
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: CD Android
|
- name: CD Android
|
||||||
run: cd demo/Semi.Avalonia.Demo.Android
|
run: cd ./demo/Semi.Avalonia.Demo.Android
|
||||||
|
|
||||||
- name: Restore Dependencies
|
- name: Restore Dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Publish Android
|
- name: Publish Android
|
||||||
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.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
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.6.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: android-arm64
|
name: android
|
||||||
path: publish/*Signed.apk
|
path: ./publish/*Signed.apk
|
||||||
|
|||||||
177
.github/workflows/release-tag.yml
vendored
177
.github/workflows/release-tag.yml
vendored
@@ -1,73 +1,146 @@
|
|||||||
name: Release Tag
|
name: Release Tag
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
Upload_to_NuGet:
|
|
||||||
description: 'Upload to NuGet'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
Semi_Avalonia:
|
|
||||||
description: 'Pack Semi.Avalonia'
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
Semi_Avalonia_ColorPicker:
|
|
||||||
description: 'Pack Semi.Avalonia.ColorPicker'
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
Semi_Avalonia_DataGrid:
|
|
||||||
description: 'Pack Semi.Avalonia.DataGrid'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
Semi_Avalonia_TreeDataGrid:
|
|
||||||
description: 'Pack Semi.Avalonia.TreeDataGrid'
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nuget:
|
pack:
|
||||||
uses: ./.github/workflows/pack.yml
|
runs-on: ubuntu-latest
|
||||||
with:
|
|
||||||
Upload_to_NuGet: ${{ inputs.Upload_to_NuGet }}
|
|
||||||
Semi_Avalonia: ${{ inputs.Semi_Avalonia }}
|
|
||||||
Semi_Avalonia_ColorPicker: ${{ inputs.Semi_Avalonia_ColorPicker }}
|
|
||||||
Semi_Avalonia_DataGrid: ${{ inputs.Semi_Avalonia_DataGrid }}
|
|
||||||
Semi_Avalonia_TreeDataGrid: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
|
|
||||||
|
|
||||||
publish:
|
steps:
|
||||||
uses: ./.github/workflows/publish.yml
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
draft-release:
|
- name: Pack Semi.Avalonia
|
||||||
needs: [ nuget,publish ]
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
||||||
|
|
||||||
|
- name: Pack Semi.Avalonia.ColorPicker
|
||||||
|
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nugets
|
||||||
|
path: ./nugets
|
||||||
|
|
||||||
|
publish-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Make upload directory
|
||||||
|
run: mkdir upload
|
||||||
|
|
||||||
|
- name: Publish win-x64
|
||||||
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
|
||||||
|
|
||||||
|
- name: Zip win-x64
|
||||||
|
run: |
|
||||||
|
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
|
||||||
|
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
|
||||||
|
|
||||||
|
- 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
|
||||||
|
sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||||
|
|
||||||
|
- name: Publish win-x64 AOT
|
||||||
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
|
||||||
|
|
||||||
|
- name: Zip win-x64 AOT
|
||||||
|
run: |
|
||||||
|
$files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
|
||||||
|
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows
|
||||||
|
path: ./upload
|
||||||
|
|
||||||
|
publish-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4.3.0
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
- name: Make upload directory
|
||||||
run: ls -R
|
run: mkdir upload
|
||||||
|
|
||||||
- name: Zip artifacts
|
- name: Publish linux-x64
|
||||||
run: |
|
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
|
||||||
zip -rj Semi.Avalonia.Demo.Desktop.win-x64.zip Semi.Avalonia.Demo.Desktop.win-x64
|
|
||||||
zip -rj Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT
|
|
||||||
zip -rj Semi.Avalonia.Demo.Desktop.linux-x64.zip Semi.Avalonia.Demo.Desktop.linux-x64
|
|
||||||
zip -rj Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT.zip Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT
|
|
||||||
zip -rj Semi.Avalonia.Demo.Drm.linux-x64.zip Semi.Avalonia.Demo.Drm.linux-x64
|
|
||||||
zip -rj Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT.zip Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT
|
|
||||||
zip -rj Semi.Avalonia.Demo.Desktop.osx-arm64.zip Semi.Avalonia.Demo.Desktop.osx-arm64
|
|
||||||
cd Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
|
|
||||||
zip -r ../Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT.zip .
|
|
||||||
|
|
||||||
- name: Display structure of zipped files
|
- name: Zip linux-x64
|
||||||
run: ls -R
|
run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
|
||||||
|
|
||||||
|
- name: Publish linux-x64 DRM
|
||||||
|
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
|
||||||
|
|
||||||
|
- name: Zip linux-x64 DRM
|
||||||
|
run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux
|
||||||
|
path: ./upload
|
||||||
|
|
||||||
|
publish-android:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: CD Android
|
||||||
|
run: cd ./demo/Semi.Avalonia.Demo.Android
|
||||||
|
|
||||||
|
- name: Restore Dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Publish Android
|
||||||
|
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
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
path: ./publish/*Signed.apk
|
||||||
|
|
||||||
|
draft-release:
|
||||||
|
needs: [ pack, publish-windows, publish-linux, publish-android ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download nugets Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nugets
|
||||||
|
|
||||||
|
- name: Download windows Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: windows
|
||||||
|
|
||||||
|
- name: Download linux Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux
|
||||||
|
|
||||||
|
- name: Download android Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v2.3.2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
nugets/*.nupkg
|
*.nupkg
|
||||||
android-arm64/*.apk
|
|
||||||
*.zip
|
*.zip
|
||||||
|
*.apk
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 IRIHI Technology
|
Copyright (c) 2022 iriHi Technology
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -38,15 +38,12 @@ Include Semi Design Styles in application:
|
|||||||
|
|
||||||
That's all.
|
That's all.
|
||||||
|
|
||||||
ColorPicker, DataGrid, TreeDataGrid, Dock, Tabalonia and AvaloniaEdit are distributed in separated packages. Please install if you need.
|
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker
|
dotnet add package Semi.Avalonia.ColorPicker
|
||||||
dotnet add package Semi.Avalonia.DataGrid
|
dotnet add package Semi.Avalonia.DataGrid
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid
|
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||||
dotnet add package Semi.Avalonia.Dock
|
|
||||||
dotnet add package Semi.Avalonia.Tabalonia
|
|
||||||
dotnet add package Semi.Avalonia.AvaloniaEdit
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
@@ -54,14 +51,9 @@ dotnet add package Semi.Avalonia.AvaloniaEdit
|
|||||||
<semi:ColorPickerSemiTheme />
|
<semi:ColorPickerSemiTheme />
|
||||||
<semi:DataGridSemiTheme />
|
<semi:DataGridSemiTheme />
|
||||||
<semi:TreeDataGridSemiTheme />
|
<semi:TreeDataGridSemiTheme />
|
||||||
<semi:DockSemiTheme />
|
|
||||||
<semi:TabaloniaSemiTheme />
|
|
||||||
<semi:AvaloniaEditSemiTheme />
|
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
```
|
```
|
||||||
|
|
||||||
Notice: Dock, Tabalonia and AvaloniaEdit are delivered via nuget for free, but not open source. Please read the license and agree to continue use these packages. If you need source code, please contact us via email: [contact@irihi.tech](contact@irihi.tech)
|
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
You can always download demo executable to play around with Semi Avalonia Themes.
|
You can always download demo executable to play around with Semi Avalonia Themes.
|
||||||
|
|||||||
10
README_CN.md
10
README_CN.md
@@ -38,15 +38,12 @@ dotnet add package Semi.Avalonia
|
|||||||
|
|
||||||
这样就可以了。
|
这样就可以了。
|
||||||
|
|
||||||
ColorPicker、DataGrid、TreeDataGrid、Dock、Tabalonia 和 AvaloniaEdit 的样式单独分发,如果需要请安装并引用。
|
ColorPicker、DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker
|
dotnet add package Semi.Avalonia.ColorPicker
|
||||||
dotnet add package Semi.Avalonia.DataGrid
|
dotnet add package Semi.Avalonia.DataGrid
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid
|
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||||
dotnet add package Semi.Avalonia.Dock
|
|
||||||
dotnet add package Semi.Avalonia.Tabalonia
|
|
||||||
dotnet add package Semi.Avalonia.AvaloniaEdit
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
@@ -54,14 +51,9 @@ dotnet add package Semi.Avalonia.AvaloniaEdit
|
|||||||
<semi:ColorPickerSemiTheme />
|
<semi:ColorPickerSemiTheme />
|
||||||
<semi:DataGridSemiTheme />
|
<semi:DataGridSemiTheme />
|
||||||
<semi:TreeDataGridSemiTheme />
|
<semi:TreeDataGridSemiTheme />
|
||||||
<semi:DockSemiTheme />
|
|
||||||
<semi:TabaloniaSemiTheme />
|
|
||||||
<semi:AvaloniaEditSemiTheme />
|
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
```
|
```
|
||||||
|
|
||||||
注意:Dock、Tabalonia 和 AvaloniaEdit 是通过 NuGet 免费分发的,但不是开源的。请阅读许可协议并同意后继续使用这些包。如果您需要源代码,请通过电子邮件联系我们:[contact@irihi.tech](contact@irihi.tech)
|
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||
|
|
||||||
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
|
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AvaloniaVersion>11.3.0</AvaloniaVersion>
|
<AvaloniaVersion>11.2.5</AvaloniaVersion>
|
||||||
<DataGridVersion>11.3.0</DataGridVersion>
|
<DataGridVersion>11.2.5</DataGridVersion>
|
||||||
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
|
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<!-- Uncomment below to enable Native AOT compilation-->
|
<!-- Uncomment below to enable Native AOT compilation-->
|
||||||
<!--<PublishAot>true</PublishAot>-->
|
<!--<PublishAot>true</PublishAot>-->
|
||||||
|
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ private static void SilenceConsole()
|
|||||||
6. Publish the app to Linux
|
6. Publish the app to Linux
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc /p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the following code to the csproj file for AOT publishing
|
Add the following code to the csproj file for AOT publishing
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ private static void SilenceConsole()
|
|||||||
6. 发布程序到Linux
|
6. 发布程序到Linux
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc /p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
||||||
```
|
```
|
||||||
|
|
||||||
AOT发布需要在csproj文件中添加以下代码
|
AOT发布需要在csproj文件中添加以下代码
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<!-- Uncomment below to enable Native AOT compilation-->
|
<!-- Uncomment below to enable Native AOT compilation-->
|
||||||
<!--<PublishAot>true</PublishAot>-->
|
<!--<PublishAot>true</PublishAot>-->
|
||||||
|
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ namespace Semi.Avalonia.Demo.Constant;
|
|||||||
|
|
||||||
public static class ColorTokens
|
public static class ColorTokens
|
||||||
{
|
{
|
||||||
public static IReadOnlyList<Tuple<string, string>> PrimaryTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> PrimaryTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorPrimary", "Primary"),
|
new("SemiColorPrimary", "Primary"),
|
||||||
new("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
new("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
||||||
new("SemiColorPrimaryActive", "Primary Active"),
|
new("SemiColorPrimaryActive", "Primary Active"),
|
||||||
@@ -14,130 +14,130 @@ public static class ColorTokens
|
|||||||
new("SemiColorPrimaryLight", "Primary Light"),
|
new("SemiColorPrimaryLight", "Primary Light"),
|
||||||
new("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
new("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
||||||
new("SemiColorPrimaryLightActive", "Primary Light Active"),
|
new("SemiColorPrimaryLightActive", "Primary Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> SecondaryTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> SecondaryTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorSecondary", "Secondary"),
|
new("SemiColorSecondary", "Secondary"),
|
||||||
new("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
new("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
||||||
new("SemiColorSecondaryActive", "Secondary Active"),
|
new("SemiColorSecondaryActive", "Secondary Active"),
|
||||||
new("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
new("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
||||||
new("SemiColorSecondaryLight", "Secondary Light"),
|
new("SemiColorSecondaryLight", "Secondary Light"),
|
||||||
new("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
new("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
||||||
new("SemiColorSecondaryLightActive", "Secondary Light Active")
|
new("SemiColorSecondaryLightActive", "Secondary Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> TertiaryTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> TertiaryTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorTertiary", "Tertiary"),
|
new("SemiColorTertiary", "Tertiary"),
|
||||||
new("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
new("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
||||||
new("SemiColorTertiaryActive", "Tertiary Active"),
|
new("SemiColorTertiaryActive", "Tertiary Active"),
|
||||||
new("SemiColorTertiaryLight", "Tertiary Light"),
|
new("SemiColorTertiaryLight", "Tertiary Light"),
|
||||||
new("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
new("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
||||||
new("SemiColorTertiaryLightActive", "Tertiary Light Active")
|
new("SemiColorTertiaryLightActive", "Tertiary Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> InformationTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> InformationTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorInformation", "Information"),
|
new("SemiColorInformation", "Information"),
|
||||||
new("SemiColorInformationPointerover", "Information Pointerover"),
|
new("SemiColorInformationPointerover", "Information Pointerover"),
|
||||||
new("SemiColorInformationActive", "Information Active"),
|
new("SemiColorInformationActive", "Information Active"),
|
||||||
new("SemiColorInformationDisabled", "Information Disabled"),
|
new("SemiColorInformationDisabled", "Information Disabled"),
|
||||||
new("SemiColorInformationLight", "Information Light"),
|
new("SemiColorInformationLight", "Information Light"),
|
||||||
new("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
new("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
||||||
new("SemiColorInformationLightActive", "Information Light Active")
|
new("SemiColorInformationLightActive", "Information Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> SuccessTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> SuccessTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorSuccess", "Success"),
|
new("SemiColorSuccess", "Success"),
|
||||||
new("SemiColorSuccessPointerover", "Success Pointerover"),
|
new("SemiColorSuccessPointerover", "Success Pointerover"),
|
||||||
new("SemiColorSuccessActive", "Success Active"),
|
new("SemiColorSuccessActive", "Success Active"),
|
||||||
new("SemiColorSuccessDisabled", "Success Disabled"),
|
new("SemiColorSuccessDisabled", "Success Disabled"),
|
||||||
new("SemiColorSuccessLight", "Success Light"),
|
new("SemiColorSuccessLight", "Success Light"),
|
||||||
new("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
new("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
||||||
new("SemiColorSuccessLightActive", "Success Light Active")
|
new("SemiColorSuccessLightActive", "Success Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> WarningTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> WarningTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorWarning", "Warning"),
|
new("SemiColorWarning", "Warning"),
|
||||||
new("SemiColorWarningPointerover", "Warning Pointerover"),
|
new("SemiColorWarningPointerover", "Warning Pointerover"),
|
||||||
new("SemiColorWarningActive", "Warning Active"),
|
new("SemiColorWarningActive", "Warning Active"),
|
||||||
new("SemiColorWarningLight", "Warning Light"),
|
new("SemiColorWarningLight", "Warning Light"),
|
||||||
new("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
new("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
||||||
new("SemiColorWarningLightActive", "Warning Light Active")
|
new("SemiColorWarningLightActive", "Warning Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> DangerTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> DangerTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorDanger", "Danger"),
|
new("SemiColorDanger", "Danger"),
|
||||||
new("SemiColorDangerPointerover", "Danger Pointerover"),
|
new("SemiColorDangerPointerover", "Danger Pointerover"),
|
||||||
new("SemiColorDangerActive", "Danger Active"),
|
new("SemiColorDangerActive", "Danger Active"),
|
||||||
new("SemiColorDangerLight", "Danger Light"),
|
new("SemiColorDangerLight", "Danger Light"),
|
||||||
new("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
new("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
||||||
new("SemiColorDangerLightActive", "Danger Light Active")
|
new("SemiColorDangerLightActive", "Danger Light Active"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorText0", "Text 0"),
|
new("SemiColorText0", "Text 0"),
|
||||||
new("SemiColorText1", "Text 1"),
|
new("SemiColorText1", "Text 1"),
|
||||||
new("SemiColorText2", "Text 2"),
|
new("SemiColorText2", "Text 2"),
|
||||||
new("SemiColorText3", "Text 3")
|
new("SemiColorText3", "Text 3"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> LinkTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> LinkTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorLink", "Link"),
|
new("SemiColorLink", "Link"),
|
||||||
new("SemiColorLinkPointerover", "Link Pointerover"),
|
new("SemiColorLinkPointerover", "Link Pointerover"),
|
||||||
new("SemiColorLinkActive", "Link Active"),
|
new("SemiColorLinkActive", "Link Active"),
|
||||||
new("SemiColorLinkVisited", "Link Visited")
|
new("SemiColorLinkVisited", "Link Visited"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> BackgroundTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> BackgroundTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorBackground0", "Background 0"),
|
new("SemiColorBackground0", "Background 0"),
|
||||||
new("SemiColorBackground1", "Background 1"),
|
new("SemiColorBackground1", "Background 1"),
|
||||||
new("SemiColorBackground2", "Background 2"),
|
new("SemiColorBackground2", "Background 2"),
|
||||||
new("SemiColorBackground3", "Background 3"),
|
new("SemiColorBackground3", "Background 3"),
|
||||||
new("SemiColorBackground4", "Background 4")
|
new("SemiColorBackground4", "Background 4"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> FillTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> FillTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorFill0", "Fill 0"),
|
new("SemiColorFill0", "Fill 0"),
|
||||||
new("SemiColorFill1", "Fill 1"),
|
new("SemiColorFill1", "Fill 1"),
|
||||||
new("SemiColorFill2", "Fill 2")
|
new("SemiColorFill2", "Fill 2"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> BorderTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> BorderTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorBorder", "Border"),
|
new("SemiColorBorder", "Border"),
|
||||||
new("SemiColorFocusBorder", "Focus Border")
|
new("SemiColorFocusBorder", "Focus Border"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> DisabledTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> DisabledTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorDisabledText", "Disabled Text"),
|
new("SemiColorDisabledText", "Disabled Text"),
|
||||||
new("SemiColorDisabledBorder", "Disabled Border"),
|
new("SemiColorDisabledBorder", "Disabled Border"),
|
||||||
new("SemiColorDisabledBackground", "Disabled Background"),
|
new("SemiColorDisabledBackground", "Disabled Background"),
|
||||||
new("SemiColorDisabledFill", "Disabled Fill")
|
new("SemiColorDisabledFill", "Disabled Fill"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> OtherTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> OtherTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorWhite", "White"),
|
new("SemiColorWhite", "White"),
|
||||||
new("SemiColorBlack", "Black"),
|
new("SemiColorBlack", "Black"),
|
||||||
new("SemiColorNavBackground", "Navigation Background"),
|
new("SemiColorNavBackground", "Navigation Background"),
|
||||||
new("SemiColorOverlayBackground", "Overlay Background"),
|
new("SemiColorOverlayBackground", "Overlay Background"),
|
||||||
new("SemiColorHighlightBackground", "Highlight Background"),
|
new("SemiColorHighlightBackground", "Highlight Background"),
|
||||||
new("SemiColorHighlight", "Highlight Text")
|
new("SemiColorHighlight", "Highlight Text"),
|
||||||
];
|
};
|
||||||
|
|
||||||
public static IReadOnlyList<Tuple<string, string>> ShadowTokens { get; } =
|
public static IReadOnlyList<Tuple<string, string>> ShadowTokens { get; } = new List<Tuple<string, string>>
|
||||||
[
|
{
|
||||||
new("SemiColorShadow", "Shadow"),
|
new("SemiColorShadow", "Shadow"),
|
||||||
new("SemiShadowElevated", "Shadow Elevated")
|
new("SemiShadowElevated", "Shadow Elevated"),
|
||||||
];
|
};
|
||||||
}
|
}
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
<UserControl
|
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.AboutUs"
|
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:collections="clr-namespace:Avalonia.Collections;assembly=Avalonia.Base"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:iri="https://irihi.tech/shared"
|
|
||||||
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">
|
|
||||||
<UserControl.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
|
||||||
<ResourceDictionary x:Key="Light">
|
|
||||||
<collections:AvaloniaList x:Key="CanvasPalette" x:TypeArguments="Color">
|
|
||||||
<Color>#FFFDB7A5</Color>
|
|
||||||
<Color>#FFF6A0B5</Color>
|
|
||||||
<Color>#FFDD9BE0</Color>
|
|
||||||
<Color>#FFC4A7E9</Color>
|
|
||||||
<Color>#FFA7B3E1</Color>
|
|
||||||
<Color>#FF98CDFD</Color>
|
|
||||||
<Color>#FF95D8F8</Color>
|
|
||||||
</collections:AvaloniaList>
|
|
||||||
<LinearGradientBrush x:Key="TileTitleForeground" StartPoint="">
|
|
||||||
<GradientStop Offset="0.0" Color="#FFA20B48" />
|
|
||||||
<GradientStop Offset="0.3" Color="#FF71168A" />
|
|
||||||
<GradientStop Offset="0.6" Color="#FF46259E" />
|
|
||||||
<GradientStop Offset="1.0" Color="#FF28348C" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="Dark">
|
|
||||||
<collections:AvaloniaList x:Key="CanvasPalette" x:TypeArguments="Color">
|
|
||||||
<Color>#FFB42019</Color>
|
|
||||||
<Color>#FFA41751</Color>
|
|
||||||
<Color>#FF731F8A</Color>
|
|
||||||
<Color>#FF582EA0</Color>
|
|
||||||
<Color>#FF29368E</Color>
|
|
||||||
<Color>#FF135CB8</Color>
|
|
||||||
<Color>#FF0366A9</Color>
|
|
||||||
</collections:AvaloniaList>
|
|
||||||
<LinearGradientBrush x:Key="TileTitleForeground">
|
|
||||||
<GradientStop Offset="0.0" Color="#FFF7A8BC" />
|
|
||||||
<GradientStop Offset="0.3" Color="#FFDDA0E1" />
|
|
||||||
<GradientStop Offset="0.6" Color="#FFBEADE9" />
|
|
||||||
<GradientStop Offset="1.0" Color="#FFA7B4E2" />
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
|
||||||
<ControlTheme x:Key="TileButton" TargetType="Button">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
||||||
<Setter Property="Padding" Value="24" />
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="Template">
|
|
||||||
<ControlTemplate>
|
|
||||||
<Border
|
|
||||||
Padding="0"
|
|
||||||
Classes="Hover"
|
|
||||||
Cursor="Hand"
|
|
||||||
Theme="{DynamicResource CardBorder}">
|
|
||||||
<Border.Transitions>
|
|
||||||
<Transitions>
|
|
||||||
<BrushTransition Property="BorderBrush" Duration="0.5" />
|
|
||||||
</Transitions>
|
|
||||||
</Border.Transitions>
|
|
||||||
<ContentPresenter
|
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
||||||
Content="{TemplateBinding Content}"
|
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
<Style Selector="^:pointerover /template/ Border">
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource TileTitleForeground}" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</UserControl.Resources>
|
|
||||||
<UserControl.Styles>
|
|
||||||
<Style Selector="TextBlock.TileTitle">
|
|
||||||
<Setter Property="FontWeight" Value="700" />
|
|
||||||
<Setter Property="FontSize" Value="24" />
|
|
||||||
<Setter Property="Margin" Value="0 0 0 8" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource TileTitleForeground}" />
|
|
||||||
</Style>
|
|
||||||
</UserControl.Styles>
|
|
||||||
<Grid RowDefinitions="*, Auto">
|
|
||||||
<ScrollViewer>
|
|
||||||
<StackPanel>
|
|
||||||
<Grid
|
|
||||||
Margin="0,96,0,48"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
ColumnDefinitions="*, *"
|
|
||||||
RowDefinitions="*, *">
|
|
||||||
<iri:IrihiLogo
|
|
||||||
Grid.Row="0"
|
|
||||||
Grid.RowSpan="2"
|
|
||||||
Grid.Column="0"
|
|
||||||
Fill="{DynamicResource TextBlockSecondaryForeground}"
|
|
||||||
Width="96"
|
|
||||||
Margin="0,0,24,0"
|
|
||||||
VerticalAlignment="Center" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="1"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Classes="Secondary"
|
|
||||||
FontSize="48"
|
|
||||||
FontWeight="700"
|
|
||||||
Text="铱泓科技" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="12,0,0,0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Classes="Secondary"
|
|
||||||
FontSize="16"
|
|
||||||
Text="IRIHI Technology" />
|
|
||||||
</Grid>
|
|
||||||
<TextBlock
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Classes="Tertiary"
|
|
||||||
FontSize="20"
|
|
||||||
FontWeight="700"
|
|
||||||
Text="聚焦生产力的美学进化" />
|
|
||||||
<TextBlock
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Classes="Tertiary"
|
|
||||||
FontSize="20"
|
|
||||||
Text="Aesthetic Evolution of Productivity" />
|
|
||||||
<UniformGrid
|
|
||||||
MaxWidth="810"
|
|
||||||
Margin="24"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Columns="2">
|
|
||||||
<Button
|
|
||||||
Margin="8"
|
|
||||||
Command="{Binding NavigateCommand}"
|
|
||||||
CommandParameter="semi"
|
|
||||||
Theme="{DynamicResource TileButton}">
|
|
||||||
<StackPanel HorizontalAlignment="Left">
|
|
||||||
<TextBlock Classes="TileTitle" Text="Semi" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
|
|
||||||
<Label Theme="{DynamicResource TagLabel}" Classes="Blue Ghost">Open Source</Label>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="开箱即用的独立主题库" />
|
|
||||||
<TextBlock Text="A ready-to-use standalone theme library" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Margin="8"
|
|
||||||
Command="{Binding NavigateCommand}"
|
|
||||||
CommandParameter="ursa"
|
|
||||||
Theme="{DynamicResource TileButton}">
|
|
||||||
<StackPanel HorizontalAlignment="Left">
|
|
||||||
<TextBlock Classes="TileTitle" Text="Ursa" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
|
|
||||||
<Label Theme="{DynamicResource TagLabel}" Classes="Blue Ghost">Open Source</Label>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="高性能企业级桌面客户端控件库" />
|
|
||||||
<TextBlock Text="High-performance enterprise level control library for desktop apps" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Margin="8"
|
|
||||||
Command="{Binding NavigateCommand}"
|
|
||||||
CommandParameter="mantra"
|
|
||||||
Theme="{DynamicResource TileButton}">
|
|
||||||
<StackPanel HorizontalAlignment="Left">
|
|
||||||
<TextBlock Classes="TileTitle" Text="Mantra" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
|
|
||||||
<Label Theme="{DynamicResource TagLabel}" Classes="Purple Ghost">Commercial</Label>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="高性能文字排版渲染控件库" />
|
|
||||||
<TextBlock Text="High-performance typography control library" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Margin="8"
|
|
||||||
Command="{Binding NavigateCommand}"
|
|
||||||
CommandParameter="huska"
|
|
||||||
Theme="{DynamicResource TileButton}">
|
|
||||||
<StackPanel HorizontalAlignment="Left">
|
|
||||||
<TextBlock Classes="TileTitle" Text="Huska" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
|
|
||||||
<Label Theme="{DynamicResource TagLabel}" Classes="Purple Ghost">Commercial</Label>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="手绘风格主题库" />
|
|
||||||
<TextBlock Text="Hand-drawing theme library" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
</UniformGrid>
|
|
||||||
</StackPanel>
|
|
||||||
</ScrollViewer>
|
|
||||||
<StackPanel
|
|
||||||
Grid.Row="1"
|
|
||||||
Margin="0,16"
|
|
||||||
Spacing="32"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<HyperlinkButton
|
|
||||||
Classes="WithIcon"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Content="Homepage"
|
|
||||||
NavigateUri="https://irihi.tech">
|
|
||||||
<HyperlinkButton.Styles>
|
|
||||||
<Style Selector=".WithIcon /template/ PathIcon">
|
|
||||||
<Setter Property="Data" Value="{StaticResource SemiIconHome}" />
|
|
||||||
</Style>
|
|
||||||
</HyperlinkButton.Styles>
|
|
||||||
</HyperlinkButton>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<HyperlinkButton
|
|
||||||
Classes="WithIcon"
|
|
||||||
Content="GitHub"
|
|
||||||
NavigateUri="https://github.com/irihitech">
|
|
||||||
<HyperlinkButton.Styles>
|
|
||||||
<Style Selector=".WithIcon /template/ PathIcon">
|
|
||||||
<Setter Property="Data" Value="{StaticResource SemiIconGithubLogo}" />
|
|
||||||
</Style>
|
|
||||||
</HyperlinkButton.Styles>
|
|
||||||
</HyperlinkButton>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Interactivity;
|
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
|
||||||
|
|
||||||
public partial class AboutUs : UserControl
|
|
||||||
{
|
|
||||||
public AboutUs()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
this.DataContext = new AboutUsViewModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnLoaded(RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnLoaded(e);
|
|
||||||
if (this.DataContext is AboutUsViewModel vm)
|
|
||||||
{
|
|
||||||
var launcher = TopLevel.GetTopLevel(this)?.Launcher;
|
|
||||||
vm.Launcher = launcher;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
x:CompileBindings="False"
|
x:CompileBindings="False"
|
||||||
x:DataType="vm:AutoCompleteBoxDemoViewModel"
|
x:DataType="local:AutoCompleteBoxDemoViewModel"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<vm:AutoCompleteBoxDemoViewModel />
|
<local:AutoCompleteBoxDemoViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<StackPanel.Styles>
|
<StackPanel.Styles>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<Binding Path="States" />
|
<Binding Path="States" />
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="ItemTemplate">
|
<Setter Property="ItemTemplate">
|
||||||
<DataTemplate DataType="vm:StateData">
|
<DataTemplate DataType="local:StateData">
|
||||||
<TextBlock Text="{Binding Name}" />
|
<TextBlock Text="{Binding Name}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using Avalonia.Markup.Xaml;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -11,3 +15,85 @@ public partial class AutoCompleteBoxDemo : UserControl
|
|||||||
this.DataContext = new AutoCompleteBoxDemoViewModel();
|
this.DataContext = new AutoCompleteBoxDemoViewModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AutoCompleteBoxDemoViewModel: ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<StateData> States { get; set; }
|
||||||
|
|
||||||
|
public AutoCompleteBoxDemoViewModel()
|
||||||
|
{
|
||||||
|
States = new ObservableCollection<StateData>(GetStates());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<StateData> GetStates()
|
||||||
|
{
|
||||||
|
return new List<StateData>
|
||||||
|
{
|
||||||
|
new StateData("Alabama", "AL", "Montgomery"),
|
||||||
|
new StateData("Alaska", "AK", "Juneau"),
|
||||||
|
new StateData("Arizona", "AZ", "Phoenix"),
|
||||||
|
new StateData("Arkansas", "AR", "Little Rock"),
|
||||||
|
new StateData("California", "CA", "Sacramento"),
|
||||||
|
new StateData("Colorado", "CO", "Denver"),
|
||||||
|
new StateData("Connecticut", "CT", "Hartford"),
|
||||||
|
new StateData("Delaware", "DE", "Dover"),
|
||||||
|
new StateData("Florida", "FL", "Tallahassee"),
|
||||||
|
new StateData("Georgia", "GA", "Atlanta"),
|
||||||
|
new StateData("Hawaii", "HI", "Honolulu"),
|
||||||
|
new StateData("Idaho", "ID", "Boise"),
|
||||||
|
new StateData("Illinois", "IL", "Springfield"),
|
||||||
|
new StateData("Indiana", "IN", "Indianapolis"),
|
||||||
|
new StateData("Iowa", "IA", "Des Moines"),
|
||||||
|
new StateData("Kansas", "KS", "Topeka"),
|
||||||
|
new StateData("Kentucky", "KY", "Frankfort"),
|
||||||
|
new StateData("Louisiana", "LA", "Baton Rouge"),
|
||||||
|
new StateData("Maine", "ME", "Augusta"),
|
||||||
|
new StateData("Maryland", "MD", "Annapolis"),
|
||||||
|
new StateData("Massachusetts", "MA", "Boston"),
|
||||||
|
new StateData("Michigan", "MI", "Lansing"),
|
||||||
|
new StateData("Minnesota", "MN", "St. Paul"),
|
||||||
|
new StateData("Mississippi", "MS", "Jackson"),
|
||||||
|
new StateData("Missouri", "MO", "Jefferson City"),
|
||||||
|
new StateData("Montana", "MT", "Helena"),
|
||||||
|
new StateData("Nebraska", "NE", "Lincoln"),
|
||||||
|
new StateData("Nevada", "NV", "Carson City"),
|
||||||
|
new StateData("New Hampshire", "NH", "Concord"),
|
||||||
|
new StateData("New Jersey", "NJ", "Trenton"),
|
||||||
|
new StateData("New Mexico", "NM", "Santa Fe"),
|
||||||
|
new StateData("New York", "NY", "Albany"),
|
||||||
|
new StateData("North Carolina", "NC", "Raleigh"),
|
||||||
|
new StateData("North Dakota", "ND", "Bismarck"),
|
||||||
|
new StateData("Ohio", "OH", "Columbus"),
|
||||||
|
new StateData("Oklahoma", "OK", "Oklahoma City"),
|
||||||
|
new StateData("Oregon", "OR", "Salem"),
|
||||||
|
new StateData("Pennsylvania", "PA", "Harrisburg"),
|
||||||
|
new StateData("Rhode Island", "RI", "Providence"),
|
||||||
|
new StateData("South Carolina", "SC", "Columbia"),
|
||||||
|
new StateData("South Dakota", "SD", "Pierre"),
|
||||||
|
new StateData("Tennessee", "TN", "Nashville"),
|
||||||
|
new StateData("Texas", "TX", "Austin"),
|
||||||
|
new StateData("Utah", "UT", "Salt Lake City"),
|
||||||
|
new StateData("Vermont", "VT", "Montpelier"),
|
||||||
|
new StateData("Virginia", "VA", "Richmond"),
|
||||||
|
new StateData("Washington", "WA", "Olympia"),
|
||||||
|
new StateData("West Virginia", "WV", "Charleston"),
|
||||||
|
new StateData("Wisconsin", "WI", "Madison"),
|
||||||
|
new StateData("Wyoming", "WY", "Cheyenne"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class StateData
|
||||||
|
{
|
||||||
|
public string Name { get; private set; }
|
||||||
|
public string Abbreviation { get; private set; }
|
||||||
|
public string Capital { get; private set; }
|
||||||
|
|
||||||
|
public StateData(string name, string abbreviation, string capital)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
Abbreviation = abbreviation;
|
||||||
|
Capital = capital;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -112,14 +112,14 @@
|
|||||||
IsEnabled="False" />
|
IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<DropDownButton Content="Default" Classes="Success" />
|
<DropDownButton Content="Default" Classes="Success"/>
|
||||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" />
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
|
||||||
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" />
|
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success"/>
|
||||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" />
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
|
||||||
<DropDownButton Content="Default" Classes="Success" IsEnabled="False" />
|
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
|
||||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" 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="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False" />
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<DropDownButton Classes="Small" Content="Small" />
|
<DropDownButton Classes="Small" Content="Small" />
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<SplitButton Content="Default" Classes="Success" />
|
<SplitButton Content="Default" Classes="Success" />
|
||||||
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
|
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
|
||||||
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
|
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
|
||||||
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
|
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
|
||||||
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<ToggleSplitButton Content="Default" Classes="Success" />
|
<ToggleSplitButton Content="Default" Classes="Success" />
|
||||||
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
|
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
|
||||||
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||||
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
|
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -29,6 +31,7 @@ public partial class ButtonSpinnerDemo : UserControl
|
|||||||
|
|
||||||
txtBox.Text = _mountains[value];
|
txtBox.Text = _mountains[value];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly string[] _mountains = new[]
|
private readonly string[] _mountains = new[]
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class CalendarDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
d:DesignHeight="800"
|
d:DesignHeight="800"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<vm:ComboBoxDemoViewModel />
|
<pages:ComboBoxDemoViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<StackPanel.Styles>
|
<StackPanel.Styles>
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
<ComboBox Classes="Bordered" />
|
<ComboBox Classes="Bordered" />
|
||||||
<ComboBox Classes="Bordered" IsEnabled="False" />
|
<ComboBox Classes="Bordered" IsEnabled="False" />
|
||||||
<ComboBox>
|
<ComboBox>
|
||||||
<ComboBox.SelectionBoxItemTemplate>
|
<ComboBox.SelectionBoxItemTemplate>
|
||||||
<DataTemplate DataType="x:String">
|
<DataTemplate DataType="x:String">
|
||||||
<ContentControl BorderThickness="1"
|
<ContentControl BorderThickness="1"
|
||||||
BorderBrush="Gold"
|
BorderBrush="Gold"
|
||||||
Content="{Binding}" />
|
Content="{Binding}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.SelectionBoxItemTemplate>
|
</ComboBox.SelectionBoxItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -11,3 +12,8 @@ public partial class ComboBoxDemo : UserControl
|
|||||||
this.DataContext = new ComboBoxDemoViewModel();
|
this.DataContext = new ComboBoxDemoViewModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ComboBoxDemoViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
|
||||||
|
}
|
||||||
@@ -12,54 +12,54 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem Header="DataGrid">
|
<TabItem Header="DataGrid">
|
||||||
<Grid RowDefinitions="Auto, *">
|
<Grid RowDefinitions="Auto, *">
|
||||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
<ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
|
<ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
|
||||||
<ToggleSwitch Content="Inset Content" Name="inset" />
|
<ToggleSwitch Content="Inset Content" Name="inset" />
|
||||||
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
|
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<DataGrid Grid.Row="1"
|
<DataGrid Grid.Row="1"
|
||||||
Margin="8"
|
Margin="8"
|
||||||
CanUserReorderColumns="True"
|
CanUserReorderColumns="True"
|
||||||
CanUserResizeColumns="True"
|
CanUserResizeColumns="True"
|
||||||
CanUserSortColumns="True"
|
CanUserSortColumns="True"
|
||||||
HeadersVisibility="All"
|
HeadersVisibility="All"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Classes.InsetContent="{Binding #inset.IsChecked}"
|
Classes.InsetContent="{Binding #inset.IsChecked}"
|
||||||
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
|
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
|
||||||
IsEnabled="{Binding #enable.IsChecked}"
|
IsEnabled="{Binding #enable.IsChecked}"
|
||||||
ItemsSource="{Binding GridData1}">
|
ItemsSource="{Binding GridData1}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="6*"
|
Width="6*"
|
||||||
x:DataType="vm:Song"
|
x:DataType="vm:Song"
|
||||||
Binding="{Binding Title}"
|
Binding="{Binding Title}"
|
||||||
Header="Title" />
|
Header="Title" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="6*"
|
Width="6*"
|
||||||
x:DataType="vm:Song"
|
x:DataType="vm:Song"
|
||||||
Binding="{Binding Artist}"
|
Binding="{Binding Artist}"
|
||||||
Header="Artist" />
|
Header="Artist" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="6*"
|
Width="6*"
|
||||||
x:DataType="vm:Song"
|
x:DataType="vm:Song"
|
||||||
Binding="{Binding Album}"
|
Binding="{Binding Album}"
|
||||||
Header="Album" />
|
Header="Album" />
|
||||||
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
|
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="8,0,0,0"
|
Margin="8,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Duration}" />
|
Text="{Binding Duration}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Grouping">
|
<TabItem Header="Grouping">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Collections;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Primitives;
|
||||||
|
using Avalonia.Data;
|
||||||
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Input.Raw;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.Threading;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class DataValidationErrorsDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +11,14 @@ public partial class DatePickerDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Render(DrawingContext context)
|
||||||
|
{
|
||||||
|
base.Render(context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.LogicalTree;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +9,9 @@ public partial class GridSplitterDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
using System;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
ColumnDefinitions="Auto, *"
|
ColumnDefinitions="Auto, *"
|
||||||
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
|
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
|
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
|
<TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
|
<TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
|
<TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
Header="Default">
|
Header="Default">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Theme: Default" />
|
<TextBlock Text="Theme: Default"/>
|
||||||
<ListBox ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
<ListBox ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
||||||
<ListBox IsEnabled="False">
|
<ListBox IsEnabled="False">
|
||||||
<ListBoxItem IsSelected="True">Avalonia</ListBoxItem>
|
<ListBoxItem IsSelected="True">Avalonia</ListBoxItem>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
Theme="{DynamicResource GroupBox}"
|
Theme="{DynamicResource GroupBox}"
|
||||||
Header="RadioGroupListBox">
|
Header="RadioGroupListBox">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Theme: RadioGroupListBox" />
|
<TextBlock Text="Theme: RadioGroupListBox"/>
|
||||||
<ListBox
|
<ListBox
|
||||||
Theme="{DynamicResource RadioGroupListBox}"
|
Theme="{DynamicResource RadioGroupListBox}"
|
||||||
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<ListBoxItem IsSelected="True">WPF</ListBoxItem>
|
<ListBoxItem IsSelected="True">WPF</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<TextBlock Text="Theme: ButtonRadioGroupListBox" />
|
<TextBlock Text="Theme: ButtonRadioGroupListBox"/>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock Text="Theme: CardRadioGroupListBox" />
|
<TextBlock Text="Theme: CardRadioGroupListBox"/>
|
||||||
<ListBox Theme="{DynamicResource CardRadioGroupListBox}"
|
<ListBox Theme="{DynamicResource CardRadioGroupListBox}"
|
||||||
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
||||||
<ListBox Theme="{DynamicResource CardRadioGroupListBox}" IsEnabled="False">
|
<ListBox Theme="{DynamicResource CardRadioGroupListBox}" IsEnabled="False">
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<ListBoxItem>WPF</ListBoxItem>
|
<ListBoxItem>WPF</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<TextBlock Text="Theme: PureCardRadioGroupListBox" />
|
<TextBlock Text="Theme: PureCardRadioGroupListBox"/>
|
||||||
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}"
|
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}"
|
||||||
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
|
||||||
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}" IsEnabled="False">
|
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}" IsEnabled="False">
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
Header="CheckGroupListBox">
|
Header="CheckGroupListBox">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Theme: CheckGroupListBox" />
|
<TextBlock Text="Theme: CheckGroupListBox"/>
|
||||||
<ListBox
|
<ListBox
|
||||||
SelectionMode="Multiple,Toggle"
|
SelectionMode="Multiple,Toggle"
|
||||||
Theme="{DynamicResource CheckGroupListBox}"
|
Theme="{DynamicResource CheckGroupListBox}"
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<ListBoxItem>WPF</ListBoxItem>
|
<ListBoxItem>WPF</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<TextBlock Text="Theme: CardCheckGroupListBox" />
|
<TextBlock Text="Theme: CardCheckGroupListBox"/>
|
||||||
<ListBox
|
<ListBox
|
||||||
SelectionMode="Multiple,Toggle"
|
SelectionMode="Multiple,Toggle"
|
||||||
Theme="{DynamicResource CardCheckGroupListBox}"
|
Theme="{DynamicResource CardCheckGroupListBox}"
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,4 +11,8 @@ public partial class MenuDemo : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,4 +11,8 @@ public partial class NumericUpDownDemo : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
Classes="H5"
|
Classes="H5"
|
||||||
Text="Start to install"
|
Text="Start to install"
|
||||||
Theme="{DynamicResource TitleTextBlock}" />
|
Theme="{DynamicResource TitleTextBlock}" />
|
||||||
<TabControl Theme="{StaticResource LineTabControl}">
|
<TabControl Padding="8">
|
||||||
<TabItem Header="Main">
|
<TabItem Header="Main">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Install via nuget: " />
|
<TextBlock Text="Install via nuget: " />
|
||||||
@@ -409,51 +409,6 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Dock">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Text="Install via nuget: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].DockInstall}" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock Text="Reference styles: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock
|
|
||||||
FontFamily="Consolas"
|
|
||||||
Text="{Binding $parent[local:Overview].DockStyle}"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="Tabalonia">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Text="Install via nuget: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].TabaloniaInstall}" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock Text="Reference styles: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock
|
|
||||||
FontFamily="Consolas"
|
|
||||||
Text="{Binding $parent[local:Overview].TabaloniaStyle}"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="AvaloniaEdit">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Text="Install via nuget: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].AvaloniaEditInstall}" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock Text="Reference styles: " />
|
|
||||||
<Border Margin="0,16" Classes="CodeBlock">
|
|
||||||
<SelectableTextBlock
|
|
||||||
FontFamily="Consolas"
|
|
||||||
Text="{Binding $parent[local:Overview].AvaloniaEditStyle}"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public partial class Overview : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.9";
|
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.7";
|
||||||
|
|
||||||
public string MainStyle { get; set; } =
|
public string MainStyle { get; set; } =
|
||||||
"""
|
"""
|
||||||
@@ -18,7 +18,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.9";
|
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.7";
|
||||||
|
|
||||||
public string ColorPickerStyle { get; set; } =
|
public string ColorPickerStyle { get; set; } =
|
||||||
"""
|
"""
|
||||||
@@ -27,7 +27,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.9";
|
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.7";
|
||||||
|
|
||||||
public string DataGridStyle { get; set; } =
|
public string DataGridStyle { get; set; } =
|
||||||
"""
|
"""
|
||||||
@@ -36,7 +36,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.4";
|
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.3";
|
||||||
|
|
||||||
public string TreeDataGridStyle { get; set; } =
|
public string TreeDataGridStyle { get; set; } =
|
||||||
"""
|
"""
|
||||||
@@ -44,31 +44,4 @@ public partial class Overview : UserControl
|
|||||||
<semi:TreeDataGridSemiTheme />
|
<semi:TreeDataGridSemiTheme />
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string DockInstall { get; set; } = "dotnet add package Semi.Avalonia.Dock --version 11.3.0";
|
|
||||||
|
|
||||||
public string DockStyle { get; set; } =
|
|
||||||
"""
|
|
||||||
<Application.Styles>
|
|
||||||
<semi:DockSemiTheme />
|
|
||||||
</Application.Styles>
|
|
||||||
""";
|
|
||||||
|
|
||||||
public string TabaloniaInstall { get; set; } = "dotnet add package Semi.Avalonia.Tabalonia --version 11.0.0-beta1";
|
|
||||||
|
|
||||||
public string TabaloniaStyle { get; set; } =
|
|
||||||
"""
|
|
||||||
<Application.Styles>
|
|
||||||
<semi:TabaloniaSemiTheme />
|
|
||||||
</Application.Styles>
|
|
||||||
""";
|
|
||||||
|
|
||||||
public string AvaloniaEditInstall { get; set; } = "dotnet add package Semi.Avalonia.AvaloniaEdit --version 11.2.0";
|
|
||||||
|
|
||||||
public string AvaloniaEditStyle { get; set; } =
|
|
||||||
"""
|
|
||||||
<Application.Styles>
|
|
||||||
<semi:AvaloniaEditSemiTheme />
|
|
||||||
</Application.Styles>
|
|
||||||
""";
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,15 @@
|
|||||||
Minimum="{Binding #slider.Minimum}"
|
Minimum="{Binding #slider.Minimum}"
|
||||||
Theme="{DynamicResource ProgressRing}"
|
Theme="{DynamicResource ProgressRing}"
|
||||||
Value="{Binding #slider.Value}"
|
Value="{Binding #slider.Value}"
|
||||||
ShowProgressText="True" />
|
ShowProgressText="True"/>
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
Width="100"
|
Width="100"
|
||||||
Height="100"
|
Height="100"
|
||||||
IsIndeterminate="True"
|
IsIndeterminate="True"
|
||||||
BorderThickness="16"
|
|
||||||
Maximum="{Binding #slider.Maximum}"
|
Maximum="{Binding #slider.Maximum}"
|
||||||
Minimum="{Binding #slider.Minimum}"
|
Minimum="{Binding #slider.Minimum}"
|
||||||
Theme="{DynamicResource ProgressRing}"
|
Theme="{DynamicResource ProgressRing}"
|
||||||
ShowProgressText="True" />
|
ShowProgressText="True"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Slider
|
<Slider
|
||||||
Name="slider"
|
Name="slider"
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class ProgressBarDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
x:DataType="vm:RefreshContainerDemoViewModel"
|
x:DataType="pages:RefreshContainerDemoViewModel"
|
||||||
x:CompileBindings="True"
|
x:CompileBindings="True"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -10,14 +13,34 @@ public partial class RefreshContainerDemo : UserControl
|
|||||||
public RefreshContainerDemo()
|
public RefreshContainerDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
_viewModel = new RefreshContainerDemoViewModel();
|
_viewModel = new RefreshContainerDemoViewModel();
|
||||||
|
|
||||||
DataContext = _viewModel;
|
DataContext = _viewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void RefreshContainerPage_RefreshRequested(object? sender, RefreshRequestedEventArgs e)
|
private async void RefreshContainerPage_RefreshRequested(object? sender, RefreshRequestedEventArgs e)
|
||||||
{
|
{
|
||||||
var deferral = e.GetDeferral();
|
var deferral = e.GetDeferral();
|
||||||
|
|
||||||
await _viewModel.AddToTop();
|
await _viewModel.AddToTop();
|
||||||
|
|
||||||
deferral.Complete();
|
deferral.Complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class RefreshContainerDemoViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Items { get; }
|
||||||
|
|
||||||
|
public RefreshContainerDemoViewModel()
|
||||||
|
{
|
||||||
|
Items = new ObservableCollection<string>(Enumerable.Range(1, 200).Select(i => $"Item {i}"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddToTop()
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
Items.Insert(0, $"Item {200 - Items.Count}");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class ScrollViewerDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,4 +11,8 @@ public partial class SelectableTextBlockDemo : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,4 +11,8 @@ public partial class SliderDemo : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,12 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
d:DesignHeight="1000"
|
d:DesignHeight="1000"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<vm:SplitViewDemoViewModel />
|
<pages:SplitViewDemoViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<Border>
|
<Border>
|
||||||
<Grid ColumnDefinitions="*,400">
|
<Grid ColumnDefinitions="*,400">
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
Grid.Row="3" Grid.Column="1"
|
Grid.Row="3" Grid.Column="1"
|
||||||
Name="DisplayModeSelector"
|
Name="DisplayModeSelector"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
ItemsSource="{x:Static vm:SplitViewDemoViewModel.DisplayModes}"
|
ItemsSource="{x:Static pages:SplitViewDemoViewModel.DisplayModes}"
|
||||||
SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" />
|
SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" />
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
@@ -114,7 +114,8 @@
|
|||||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||||
Content="{StaticResource SemiIconSidebar}"
|
Content="{StaticResource SemiIconSidebar}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsChecked="{Binding #SplitView.IsPaneOpen}" />
|
IsChecked="{Binding #SplitView.IsPaneOpen}">
|
||||||
|
</ToggleSwitch>
|
||||||
</Grid>
|
</Grid>
|
||||||
</SplitView.Pane>
|
</SplitView.Pane>
|
||||||
|
|
||||||
@@ -204,7 +205,8 @@
|
|||||||
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
||||||
Content="{StaticResource SemiIconSidebar}"
|
Content="{StaticResource SemiIconSidebar}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsChecked="{Binding #SplitView2.IsPaneOpen}" />
|
IsChecked="{Binding #SplitView2.IsPaneOpen}">
|
||||||
|
</ToggleSwitch>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="8,12"
|
Margin="8,12"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using Avalonia.Markup.Xaml;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -10,4 +12,33 @@ public partial class SplitViewDemo : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.DataContext = new SplitViewDemoViewModel();
|
this.DataContext = new SplitViewDemoViewModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SplitViewDemoViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Songs { get; set; } =
|
||||||
|
[
|
||||||
|
"320万年前",
|
||||||
|
"隐德来希",
|
||||||
|
"孔明",
|
||||||
|
"锦鲤卟噜噜",
|
||||||
|
"指鹿为马",
|
||||||
|
"热带季风Remix",
|
||||||
|
"加州梦境",
|
||||||
|
"渐近自由",
|
||||||
|
"世界所有的烂漫",
|
||||||
|
];
|
||||||
|
|
||||||
|
public static ObservableCollection<SplitViewDisplayMode> DisplayModes { get; set; } =
|
||||||
|
[
|
||||||
|
SplitViewDisplayMode.Inline,
|
||||||
|
SplitViewDisplayMode.CompactInline,
|
||||||
|
SplitViewDisplayMode.Overlay,
|
||||||
|
SplitViewDisplayMode.CompactOverlay,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<TextBox Width="300" Classes="revealPasswordButton" Text="123456" />
|
<TextBox Width="300" Classes="revealPasswordButton" Text="123456" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="300"
|
Width="300"
|
||||||
|
IsReadOnly="True"
|
||||||
Classes="ClearButton RevealPasswordButton"
|
Classes="ClearButton RevealPasswordButton"
|
||||||
InnerLeftContent="https://"
|
InnerLeftContent="https://"
|
||||||
InnerRightContent=".com"
|
InnerRightContent=".com"
|
||||||
@@ -48,7 +49,6 @@
|
|||||||
IsEnabled="False" />
|
IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBox Width="300" Classes="TextArea" Watermark="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
|
<TextBox
|
||||||
Width="300"
|
Width="300"
|
||||||
Theme="{StaticResource LooklessTextBox}"
|
Theme="{StaticResource LooklessTextBox}"
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
<TimePicker Classes="Large" />
|
<TimePicker Classes="Large" />
|
||||||
<TimePicker Classes="Small" />
|
<TimePicker Classes="Small" />
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TimePicker Classes="Large" ClockIdentifier="12HourClock" />
|
<TimePicker Classes="Large" ClockIdentifier="12HourClock"/>
|
||||||
<TimePicker ClockIdentifier="12HourClock" />
|
<TimePicker ClockIdentifier="12HourClock"/>
|
||||||
<TimePicker Classes="Small" ClockIdentifier="12HourClock" />
|
<TimePicker Classes="Small" ClockIdentifier="12HourClock"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TimePicker IsEnabled="False" />
|
<TimePicker IsEnabled="False" />
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class TimePickerDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class ToggleButtonDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class ToggleSwitchDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -8,4 +10,9 @@ public partial class ToolTipDemo : UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
@@ -23,16 +25,14 @@ public class TreeViewVm : ObservableObject
|
|||||||
{
|
{
|
||||||
Items = new ObservableCollection<TreeViewItemVm>()
|
Items = new ObservableCollection<TreeViewItemVm>()
|
||||||
{
|
{
|
||||||
new TreeViewItemVm() { Name = "Item 1", Id = "1" },
|
new TreeViewItemVm() {Name = "Item 1", Id = "1"},
|
||||||
new TreeViewItemVm() { Name = "Item 2", Id = "2" },
|
new TreeViewItemVm() {Name = "Item 2", Id = "2"},
|
||||||
new TreeViewItemVm()
|
new TreeViewItemVm() {Name = "Item 3", Id = "3", Items = new ObservableCollection<TreeViewItemVm>()
|
||||||
{
|
{
|
||||||
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.1", Id = "3.1" },
|
new TreeViewItemVm() {Name = "Item 3.3", Id = "3.3"},
|
||||||
new TreeViewItemVm() { Name = "Item 3.2", Id = "3.2" },
|
},
|
||||||
new TreeViewItemVm() { Name = "Item 3.3", Id = "3.3" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,10 +50,8 @@ public class TreeViewVm : ObservableObject
|
|||||||
ThirdItem thirdItem = new ThirdItem { Id = k, Name = $"ThirdItem {k}" };
|
ThirdItem thirdItem = new ThirdItem { Id = k, Name = $"ThirdItem {k}" };
|
||||||
secondItem.ThirdItemItems.Add(thirdItem);
|
secondItem.ThirdItemItems.Add(thirdItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
firstItem.SecondItems.Add(secondItem);
|
firstItem.SecondItems.Add(secondItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
MultipleLevelItems.Add(firstItem);
|
MultipleLevelItems.Add(firstItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,17 +69,18 @@ public class ItemBase
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FirstItem : ItemBase
|
public class FirstItem : ItemBase
|
||||||
{
|
{
|
||||||
public ObservableCollection<SecondItem>? SecondItems { get; set; }
|
public ObservableCollection<SecondItem>? SecondItems { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SecondItem : ItemBase
|
public class SecondItem : ItemBase
|
||||||
{
|
{
|
||||||
public ObservableCollection<ThirdItem>? ThirdItemItems { get; set; }
|
public ObservableCollection<ThirdItem>? ThirdItemItems { get; set; }
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
public class ThirdItem : ItemBase
|
public class ThirdItem : ItemBase
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)"/>
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)"/>
|
||||||
<PackageReference Include="Irihi.Avalonia.Shared" Version="0.3.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using Avalonia.Platform.Storage;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
public partial class AboutUsViewModel : ObservableObject
|
|
||||||
{
|
|
||||||
public ICommand NavigateCommand { get; set; }
|
|
||||||
|
|
||||||
internal ILauncher? Launcher { get; set; }
|
|
||||||
|
|
||||||
public AboutUsViewModel()
|
|
||||||
{
|
|
||||||
NavigateCommand = new AsyncRelayCommand<string>(OnNavigateAsync);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static readonly IReadOnlyDictionary<string, string> _keyToUrlMapping = new Dictionary<string, string>()
|
|
||||||
{
|
|
||||||
["semi"] = "https://github.com/irihitech/Semi.Avalonia",
|
|
||||||
["ursa"] = "https://github.com/irihitech/Ursa.Avalonia",
|
|
||||||
["mantra"] = "https://www.bilibili.com/video/BV15pfKYbEEQ",
|
|
||||||
["huska"] = "https://www.bilibili.com/video/BV1knj1zWE4A",
|
|
||||||
};
|
|
||||||
|
|
||||||
private async Task OnNavigateAsync(string? arg)
|
|
||||||
{
|
|
||||||
if (Launcher is not null && arg is not null && _keyToUrlMapping.TryGetValue(arg.ToLower(), out var uri))
|
|
||||||
{
|
|
||||||
await Launcher.LaunchUriAsync(new Uri(uri));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,10 +2,11 @@ using Avalonia;
|
|||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Semi.Avalonia.Demo.Views;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
namespace Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
public partial class ApplicationViewModel : ObservableObject
|
public partial class ApplicationViewModel: ObservableObject
|
||||||
{
|
{
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void Exit()
|
private void Exit()
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
using System.Collections.ObjectModel;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
public class AutoCompleteBoxDemoViewModel : ObservableObject
|
|
||||||
{
|
|
||||||
public ObservableCollection<StateData> States { get; set; } =
|
|
||||||
[
|
|
||||||
new("Alabama", "AL", "Montgomery"),
|
|
||||||
new("Alaska", "AK", "Juneau"),
|
|
||||||
new("Arizona", "AZ", "Phoenix"),
|
|
||||||
new("Arkansas", "AR", "Little Rock"),
|
|
||||||
new("California", "CA", "Sacramento"),
|
|
||||||
new("Colorado", "CO", "Denver"),
|
|
||||||
new("Connecticut", "CT", "Hartford"),
|
|
||||||
new("Delaware", "DE", "Dover"),
|
|
||||||
new("Florida", "FL", "Tallahassee"),
|
|
||||||
new("Georgia", "GA", "Atlanta"),
|
|
||||||
new("Hawaii", "HI", "Honolulu"),
|
|
||||||
new("Idaho", "ID", "Boise"),
|
|
||||||
new("Illinois", "IL", "Springfield"),
|
|
||||||
new("Indiana", "IN", "Indianapolis"),
|
|
||||||
new("Iowa", "IA", "Des Moines"),
|
|
||||||
new("Kansas", "KS", "Topeka"),
|
|
||||||
new("Kentucky", "KY", "Frankfort"),
|
|
||||||
new("Louisiana", "LA", "Baton Rouge"),
|
|
||||||
new("Maine", "ME", "Augusta"),
|
|
||||||
new("Maryland", "MD", "Annapolis"),
|
|
||||||
new("Massachusetts", "MA", "Boston"),
|
|
||||||
new("Michigan", "MI", "Lansing"),
|
|
||||||
new("Minnesota", "MN", "St. Paul"),
|
|
||||||
new("Mississippi", "MS", "Jackson"),
|
|
||||||
new("Missouri", "MO", "Jefferson City"),
|
|
||||||
new("Montana", "MT", "Helena"),
|
|
||||||
new("Nebraska", "NE", "Lincoln"),
|
|
||||||
new("Nevada", "NV", "Carson City"),
|
|
||||||
new("New Hampshire", "NH", "Concord"),
|
|
||||||
new("New Jersey", "NJ", "Trenton"),
|
|
||||||
new("New Mexico", "NM", "Santa Fe"),
|
|
||||||
new("New York", "NY", "Albany"),
|
|
||||||
new("North Carolina", "NC", "Raleigh"),
|
|
||||||
new("North Dakota", "ND", "Bismarck"),
|
|
||||||
new("Ohio", "OH", "Columbus"),
|
|
||||||
new("Oklahoma", "OK", "Oklahoma City"),
|
|
||||||
new("Oregon", "OR", "Salem"),
|
|
||||||
new("Pennsylvania", "PA", "Harrisburg"),
|
|
||||||
new("Rhode Island", "RI", "Providence"),
|
|
||||||
new("South Carolina", "SC", "Columbia"),
|
|
||||||
new("South Dakota", "SD", "Pierre"),
|
|
||||||
new("Tennessee", "TN", "Nashville"),
|
|
||||||
new("Texas", "TX", "Austin"),
|
|
||||||
new("Utah", "UT", "Salt Lake City"),
|
|
||||||
new("Vermont", "VT", "Montpelier"),
|
|
||||||
new("Virginia", "VA", "Richmond"),
|
|
||||||
new("Washington", "WA", "Olympia"),
|
|
||||||
new("West Virginia", "WV", "Charleston"),
|
|
||||||
new("Wisconsin", "WI", "Madison"),
|
|
||||||
new("Wyoming", "WY", "Cheyenne")
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public class StateData(string name, string abbreviation, string capital)
|
|
||||||
{
|
|
||||||
public string Name { get; private set; } = name;
|
|
||||||
public string Abbreviation { get; private set; } = abbreviation;
|
|
||||||
public string Capital { get; private set; } = capital;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
using System.Collections.ObjectModel;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
public class ComboBoxDemoViewModel : ObservableObject
|
|
||||||
{
|
|
||||||
public ObservableCollection<string> Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
public class RefreshContainerDemoViewModel : ObservableObject
|
|
||||||
{
|
|
||||||
public ObservableCollection<string> Items { get; }
|
|
||||||
|
|
||||||
public RefreshContainerDemoViewModel()
|
|
||||||
{
|
|
||||||
Items = new ObservableCollection<string>(Enumerable.Range(1, 200).Select(i => $"Item {i}"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task AddToTop()
|
|
||||||
{
|
|
||||||
await Task.Delay(1000);
|
|
||||||
Items.Insert(0, $"Item {200 - Items.Count}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using System.Collections.ObjectModel;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
|
||||||
|
|
||||||
public class SplitViewDemoViewModel : ObservableObject
|
|
||||||
{
|
|
||||||
public ObservableCollection<string> Songs { get; set; } =
|
|
||||||
[
|
|
||||||
"320万年前",
|
|
||||||
"隐德来希",
|
|
||||||
"孔明",
|
|
||||||
"锦鲤卟噜噜",
|
|
||||||
"指鹿为马",
|
|
||||||
"热带季风Remix",
|
|
||||||
"加州梦境",
|
|
||||||
"渐近自由",
|
|
||||||
"世界所有的烂漫",
|
|
||||||
];
|
|
||||||
|
|
||||||
public static ObservableCollection<SplitViewDisplayMode> DisplayModes { get; set; } =
|
|
||||||
[
|
|
||||||
SplitViewDisplayMode.Inline,
|
|
||||||
SplitViewDisplayMode.CompactInline,
|
|
||||||
SplitViewDisplayMode.Overlay,
|
|
||||||
SplitViewDisplayMode.CompactOverlay,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
|||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
namespace Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
public class TreeDataGridDemoViewModel : ObservableObject
|
public class TreeDataGridDemoViewModel: ObservableObject
|
||||||
{
|
{
|
||||||
public SongsPageViewModel SongsContext { get; } = new();
|
public SongsPageViewModel SongsContext { get; } = new();
|
||||||
public FilesPageViewModel FilesContext { get; } = new();
|
public FilesPageViewModel FilesContext { get; } = new();
|
||||||
|
|||||||
@@ -111,9 +111,6 @@
|
|||||||
<TabItem Header="Overview">
|
<TabItem Header="Overview">
|
||||||
<pages:Overview />
|
<pages:Overview />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="About Us">
|
|
||||||
<pages:AboutUs />
|
|
||||||
</TabItem>
|
|
||||||
<TabItem
|
<TabItem
|
||||||
Theme="{DynamicResource CategoryTabItem}"
|
Theme="{DynamicResource CategoryTabItem}"
|
||||||
Header="Resource Browser" />
|
Header="Resource Browser" />
|
||||||
|
|||||||
@@ -120,18 +120,6 @@ public partial class MainViewModel : ObservableObject
|
|||||||
Command = SelectLocaleCommand,
|
Command = SelectLocaleCommand,
|
||||||
CommandParameter = new CultureInfo("es-es")
|
CommandParameter = new CultureInfo("es-es")
|
||||||
},
|
},
|
||||||
new MenuItemViewModel
|
|
||||||
{
|
|
||||||
Header = "Polski",
|
|
||||||
Command = SelectLocaleCommand,
|
|
||||||
CommandParameter = new CultureInfo("pl-pl")
|
|
||||||
},
|
|
||||||
new MenuItemViewModel
|
|
||||||
{
|
|
||||||
Header = "Français",
|
|
||||||
Command = SelectLocaleCommand,
|
|
||||||
CommandParameter = new CultureInfo("fr-fr")
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Notifications;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Views;
|
namespace Semi.Avalonia.Demo.Views;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.2.1.9</Version>
|
<Version>11.2.1.7</Version>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="ColorPicker.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||||
<ResourceInclude Source="ColorPreviewer.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
|
||||||
<ResourceInclude Source="ColorSlider.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSlider.axaml" />
|
||||||
<ResourceInclude Source="ColorSpectrum.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSpectrum.axaml" />
|
||||||
<ResourceInclude Source="ColorView.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorView.axaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceInclude x:Key="Default" Source="Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
||||||
<ResourceInclude x:Key="Dark" Source="Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="Controls/_index.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/_index.axaml" />
|
||||||
<ResourceInclude Source="Shared.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Shared.axaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.9</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 11.2.1.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceInclude x:Key="Default" Source="Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
||||||
<ResourceInclude x:Key="Dark" Source="Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="DataGrid.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
||||||
<ResourceInclude Source="Shared.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/Shared.axaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.2.1.9</Version>
|
<Version>11.2.1.7</Version>
|
||||||
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.9</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Semi.Avalonia.DataGrid 11.2.1.7</PackageReleaseNotes>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1"/>
|
||||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -2,12 +2,12 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceInclude x:Key="Default" Source="Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.TreeDataGrid/Light.axaml" />
|
||||||
<ResourceInclude x:Key="Dark" Source="Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.TreeDataGrid/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="TreeDataGrid.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.TreeDataGrid/TreeDataGrid.axaml" />
|
||||||
<ResourceInclude Source="Shared.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.TreeDataGrid/Shared.axaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.10.4</Version>
|
<Version>11.0.10.3</Version>
|
||||||
<PackageReleaseNotes>Update to 11.0.10.4</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.10.3</PackageReleaseNotes>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
@@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
|
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
|
||||||
<None Include="..\..\irihi.png" Pack="true" PackagePath="\" Link="Properties\irihi.png"/>
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" Link="Properties\LICENSE"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
BIN
src/Semi.Avalonia.TreeDataGrid/irihi.png
Normal file
BIN
src/Semi.Avalonia.TreeDataGrid/irihi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -1,8 +1,7 @@
|
|||||||
<Styles
|
<Styles xmlns="https://github.com/avaloniaui"
|
||||||
x:Class="Semi.Avalonia.SemiPopupAnimations"
|
x:Class="Semi.Avalonia.SemiPopupAnimations"
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
||||||
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
|
||||||
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
|
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
|
||||||
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}" />
|
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ using Avalonia.Styling;
|
|||||||
|
|
||||||
namespace Semi.Avalonia;
|
namespace Semi.Avalonia;
|
||||||
|
|
||||||
public class SemiPopupAnimations : Styles;
|
public class SemiPopupAnimations: Styles
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
PlacementTarget="{TemplateBinding}">
|
PlacementTarget="{TemplateBinding}">
|
||||||
<Border
|
<Border
|
||||||
@@ -68,7 +67,6 @@
|
|||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
PlacementTarget="{TemplateBinding}">
|
PlacementTarget="{TemplateBinding}">
|
||||||
<Border
|
<Border
|
||||||
|
|||||||
@@ -8,21 +8,21 @@
|
|||||||
|
|
||||||
<!-- Button Light -->
|
<!-- Button Light -->
|
||||||
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||||
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||||
<Setter Property="RenderTransform" Value="none" />
|
|
||||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
@@ -35,9 +35,9 @@
|
|||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
RecognizesAccessKey="True"
|
RecognizesAccessKey="True"
|
||||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||||
TextElement.FontWeight="{TemplateBinding FontWeight}"
|
TextElement.FontWeight="{TemplateBinding FontWeight}"
|
||||||
@@ -46,42 +46,42 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
@@ -243,9 +243,9 @@
|
|||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -254,13 +254,13 @@
|
|||||||
BasedOn="{StaticResource {x:Type Button}}"
|
BasedOn="{StaticResource {x:Type Button}}"
|
||||||
TargetType="Button">
|
TargetType="Button">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
Placement="BottomEdgeAlignedLeft"
|
Placement="BottomEdgeAlignedLeft"
|
||||||
PlacementTarget="{TemplateBinding}">
|
PlacementTarget="{TemplateBinding}">
|
||||||
@@ -112,7 +111,7 @@
|
|||||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||||
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
||||||
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
||||||
SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, Mode=TwoWay}" />
|
SelectedDate="{TemplateBinding SelectedDate, Mode=TwoWay}" />
|
||||||
</Border>
|
</Border>
|
||||||
</Popup>
|
</Popup>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:collections="clr-namespace:System.Collections;assembly=netstandard"
|
xmlns:collections="clr-namespace:System.Collections;assembly=netstandard">
|
||||||
x:CompileBindings="True">
|
|
||||||
<ControlTheme x:Key="{x:Type DataValidationErrors}" TargetType="DataValidationErrors">
|
<ControlTheme x:Key="{x:Type DataValidationErrors}" TargetType="DataValidationErrors">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DataValidationErrors">
|
<ControlTemplate TargetType="DataValidationErrors">
|
||||||
|
|||||||
@@ -226,7 +226,6 @@
|
|||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
Placement="Bottom"
|
Placement="Bottom"
|
||||||
PlacementTarget="{TemplateBinding}"
|
PlacementTarget="{TemplateBinding}"
|
||||||
|
|||||||
@@ -2,113 +2,117 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
|
||||||
<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">
|
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||||
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||||
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||||
<Setter Property="RenderTransform" Value="none" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DropDownButton">
|
<ControlTemplate TargetType="DropDownButton">
|
||||||
<Border
|
<Border
|
||||||
Name="PART_Background"
|
Name="RootBorder"
|
||||||
Padding="{TemplateBinding Padding}"
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
ClipToBounds="True"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<DockPanel>
|
<Grid Name="InnerGrid" ColumnDefinitions="*,Auto">
|
||||||
<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"
|
|
||||||
UseLayoutRounding="False" />
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="PART_ContentPresenter"
|
Name="PART_ContentPresenter"
|
||||||
|
Grid.Column="0"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
</DockPanel>
|
<PathIcon
|
||||||
|
Name="DropDownGlyph"
|
||||||
|
Grid.Column="1"
|
||||||
|
Theme="{DynamicResource InnerPathIcon}"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Data="{DynamicResource DropDownButtonIconGlyph}"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
UseLayoutRounding="False" />
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Border#PART_Background">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonLargeHeight}" />
|
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonLargeHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -123,133 +127,114 @@
|
|||||||
</FocusAdornerTemplate>
|
</FocusAdornerTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger">
|
<Style Selector="^.Danger">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:disabled /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -257,33 +242,33 @@
|
|||||||
x:Key="OutlineDropDownButton"
|
x:Key="OutlineDropDownButton"
|
||||||
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
TargetType="DropDownButton">
|
TargetType="DropDownButton">
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success /template/ Border#PART_Background">
|
<Style Selector="^.Success /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning /template/ Border#PART_Background">
|
<Style Selector="^.Warning /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger /template/ Border#PART_Background">
|
<Style Selector="^.Danger /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:disabled /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -291,16 +276,13 @@
|
|||||||
x:Key="BorderlessDropDownButton"
|
x:Key="BorderlessDropDownButton"
|
||||||
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
TargetType="DropDownButton">
|
TargetType="DropDownButton">
|
||||||
<Style Selector="^ /template/ Border#PART_Background">
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Style Selector="^:disabled /template/ Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -191,7 +191,6 @@
|
|||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
HorizontalOffset="-8"
|
HorizontalOffset="-8"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="False"
|
IsLightDismissEnabled="False"
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||||
Mode=TwoWay}"
|
Mode=TwoWay}"
|
||||||
@@ -327,7 +326,6 @@
|
|||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
||||||
HorizontalOffset="-8"
|
HorizontalOffset="-8"
|
||||||
InheritsTransform="True"
|
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
|
IsOpen="{TemplateBinding IsSubMenuOpen,Mode=TwoWay}"
|
||||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user