Compare commits
169 Commits
v11.0.1
...
v11.1.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e263c917de | ||
|
|
911a07d6a1 | ||
|
|
f65ec4bb05 | ||
|
|
e6e7d6042c | ||
|
|
e44499db4e | ||
|
|
b45272daa4 | ||
|
|
2d61d93c93 | ||
|
|
a49111c0c2 | ||
|
|
9a738603d0 | ||
|
|
49c7799431 | ||
|
|
634e792f61 | ||
|
|
5212f255e6 | ||
|
|
e20f0a4161 | ||
|
|
20b2cf3aaa | ||
|
|
cf54ad51f9 | ||
|
|
3dff0ccad5 | ||
|
|
5036a53b7c | ||
|
|
8c1c48bcf5 | ||
|
|
67752d43d3 | ||
|
|
5947fc70eb | ||
|
|
9e26d5f20b | ||
|
|
3be9b72148 | ||
|
|
75ecc525a7 | ||
|
|
0c1922a08b | ||
|
|
92e0362eb6 | ||
|
|
3716cc3bcc | ||
|
|
e24e847f4b | ||
|
|
ccc423c44e | ||
|
|
28b89e2535 | ||
|
|
52bfeae099 | ||
|
|
6215a6a622 | ||
|
|
c2c41f9275 | ||
|
|
d7de64a4ef | ||
|
|
04ffd38e14 | ||
|
|
38958c1326 | ||
|
|
9bb50a7190 | ||
|
|
2e59ed73aa | ||
|
|
b3dc2425f8 | ||
|
|
4e7681d4d4 | ||
|
|
48235b63a2 | ||
|
|
8de7a1ae8c | ||
|
|
8142dd48cd | ||
|
|
76c9b57a4b | ||
|
|
071a75a740 | ||
|
|
4782dab745 | ||
|
|
90fbd2a7e5 | ||
|
|
1f0d83ded4 | ||
|
|
6ff3ebc55b | ||
|
|
3813091668 | ||
|
|
47e5300a46 | ||
|
|
41662706ab | ||
|
|
91aa717189 | ||
|
|
f6b936431a | ||
|
|
8524e56166 | ||
|
|
8328c69c46 | ||
|
|
2470522209 | ||
|
|
f1d87f7c4d | ||
|
|
07278047a4 | ||
|
|
6df8ea2101 | ||
|
|
3b3fbd1265 | ||
|
|
8b4a670be8 | ||
|
|
dad406e995 | ||
|
|
13e9364477 | ||
|
|
3018f17e6d | ||
|
|
627aa65e1f | ||
|
|
b83525092c | ||
|
|
dd3c4bdbae | ||
|
|
17fe50d40b | ||
|
|
27c4794c6c | ||
|
|
a678a0f39d | ||
|
|
33c56f87f8 | ||
|
|
ffb1b9c0e8 | ||
|
|
ef272815ea | ||
|
|
d967583228 | ||
|
|
ef36239161 | ||
|
|
bb3966c36c | ||
|
|
4b7674d7e2 | ||
|
|
166490195f | ||
|
|
3d267139fe | ||
|
|
ede0f9f3db | ||
|
|
f140a331d7 | ||
|
|
bf1a2cac39 | ||
|
|
4d14c846b0 | ||
|
|
46e57925b9 | ||
|
|
ca8f8d6c15 | ||
|
|
7acd741ff0 | ||
|
|
38cbc6da94 | ||
|
|
c2d1d0c4eb | ||
|
|
3fce633195 | ||
|
|
30a7466fc9 | ||
|
|
7fa99ed910 | ||
|
|
801fea8269 | ||
|
|
341fa7900a | ||
|
|
fb0b4a08ac | ||
|
|
a0797721a0 | ||
|
|
8dee3ec364 | ||
|
|
0ddcb39302 | ||
|
|
5f72ed4a49 | ||
|
|
71e276d478 | ||
|
|
833ccadb58 | ||
|
|
d33f38ea70 | ||
|
|
386a3d297c | ||
|
|
d19cc9d7b9 | ||
|
|
30081a1717 | ||
|
|
0d68df3711 | ||
|
|
157d22a8f9 | ||
|
|
4efc6bf4ec | ||
|
|
a920dbc873 | ||
|
|
cafd47f334 | ||
|
|
3a83c67c6c | ||
|
|
a5657a38cd | ||
|
|
82f284b5fa | ||
|
|
6459a8be1b | ||
|
|
06240d4aa8 | ||
|
|
5c2a42b69e | ||
|
|
3c9a2f53ab | ||
|
|
b565707db9 | ||
|
|
380d28253a | ||
|
|
3410b0df10 | ||
|
|
a2d6469620 | ||
|
|
c0c89cbfd7 | ||
|
|
f3e72b6a6d | ||
|
|
a9b9737065 | ||
|
|
1a2628eff0 | ||
|
|
53b468db4a | ||
|
|
73000d30aa | ||
|
|
a521efd39a | ||
|
|
3531376eb2 | ||
|
|
2ec97c023f | ||
|
|
2b65a39c7a | ||
|
|
ca4632ef3a | ||
|
|
bc5e65ab6c | ||
|
|
74140e9db1 | ||
|
|
0bf7168cba | ||
|
|
69002c3ff0 | ||
|
|
d9c39cdd05 | ||
|
|
1989736d45 | ||
|
|
ecbe87bf3c | ||
|
|
c9fd4c9605 | ||
|
|
97b316c5f7 | ||
|
|
589ec8784b | ||
|
|
547d733f84 | ||
|
|
8ff8057f07 | ||
|
|
8059614a2e | ||
|
|
98785417b2 | ||
|
|
750f295c0f | ||
|
|
cbea8156ad | ||
|
|
1ad9fc2714 | ||
|
|
a247eadd54 | ||
|
|
6c80c65f62 | ||
|
|
6c0623a9e1 | ||
|
|
7646a296dc | ||
|
|
b1c65da22b | ||
|
|
1fa66bd469 | ||
|
|
8ca57dc45b | ||
|
|
f6624aca02 | ||
|
|
1757b4c872 | ||
|
|
98e8411fb6 | ||
|
|
72f8d51eb1 | ||
|
|
6d09d9f5ca | ||
|
|
ce2e104286 | ||
|
|
49b823f094 | ||
|
|
ba2ce1decb | ||
|
|
eb9a5b960b | ||
|
|
d7a7153069 | ||
|
|
90f982d673 | ||
|
|
385e1e2cd5 | ||
|
|
d638b0603d | ||
|
|
a451b6b8b6 |
14
.github/workflows/Pack.yml
vendored
@@ -2,16 +2,16 @@ name: Pack
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "release" ]
|
branches: [ "action/pack" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "release" ]
|
branches: [ "action/pack" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nuget_desktop:
|
nuget_desktop:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Nuget Semi.Avalonia
|
- name: Nuget Semi.Avalonia
|
||||||
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
||||||
@@ -28,8 +28,8 @@ jobs:
|
|||||||
- name: Desktop
|
- name: Desktop
|
||||||
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: nuget_desktop
|
name: nuget_desktop
|
||||||
path: |
|
path: |
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
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
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android
|
||||||
path: ./**/publish/*Signed.apk
|
path: ./**/publish/*Signed.apk
|
||||||
|
|||||||
61
.github/workflows/deploy.yml
vendored
@@ -1,50 +1,53 @@
|
|||||||
name: Deploy to GitHub Pages
|
name: Deploy to GitHub Pages
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
||||||
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Debug/net7.0/browser-wasm/AppBundle
|
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-to-github-pages:
|
deploy-to-github-pages:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup .NET Core SDK
|
- name: Setup .NET 7
|
||||||
uses: actions/setup-dotnet@v1.9.0
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0.405
|
||||||
|
|
||||||
- name: Install wasm-tools
|
- name: Install wasm-tools
|
||||||
run: dotnet workload install wasm-tools wasm-experimental
|
run: dotnet workload install wasm-tools wasm-tools-net7
|
||||||
|
|
||||||
- name: Install DotNetCompress
|
- name: Install DotNetCompress
|
||||||
run: dotnet tool install --global DotNetCompress --version 2.0.0 --no-cache
|
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
|
||||||
|
|
||||||
- name: Publish .NET Project
|
- name: Publish .NET Project
|
||||||
run: dotnet publish $PROJECT_PATH -c Debug -o debug --nologo
|
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
|
||||||
|
|
||||||
- name: Change base-tag in index.html
|
- name: Change base-tag in index.html
|
||||||
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/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
|
||||||
|
|
||||||
- name: Compress Output using Brotli
|
- name: Compress Output using Brotli
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
|
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
|
||||||
|
|
||||||
- name: Compress Output using GZip
|
- name: Compress Output using GZip
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
|
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
|
||||||
|
|
||||||
- name: Add .nojekyll file
|
- name: Add .nojekyll file
|
||||||
run: touch $OUTPUT_PATH/.nojekyll
|
run: touch $OUTPUT_PATH/.nojekyll
|
||||||
|
|
||||||
- name: Commit wwwroot to GitHub Pages
|
- name: Commit wwwroot to GitHub Pages
|
||||||
uses: JamesIves/github-pages-deploy-action@4.1.7
|
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
BRANCH: gh-pages
|
BRANCH: gh-pages
|
||||||
FOLDER: ${{ env.OUTPUT_PATH }}
|
FOLDER: ${{ env.OUTPUT_PATH }}
|
||||||
|
|||||||
73
README.md
@@ -1,16 +1,24 @@
|
|||||||
# Semi.Avalonia
|
# Semi Avalonia
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
||||||
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
||||||
|
|
||||||
|
[中文](./README_CN.md)
|
||||||
|
|
||||||
Avalonia Theme inspired by Semi Design
|
Avalonia Theme inspired by Semi Design
|
||||||
|
|
||||||
# How to Use
|
If you are looking for more customized controls, Please try [Ursa](https://github.com/irihitech/Ursa.Avalonia)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## How to Use
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
## Installation
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 11.0.1
|
dotnet add package Semi.Avalonia --version 11.0.7
|
||||||
```
|
```
|
||||||
|
|
||||||
Include Semi Design Styles in application:
|
Include Semi Design Styles in application:
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
@@ -22,11 +30,13 @@ Include Semi Design Styles in application:
|
|||||||
That's all.
|
That's all.
|
||||||
|
|
||||||
ColorPicker, DataGrid and TreeDataGrid 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 --version 11.0.1
|
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
||||||
dotnet add package Semi.Avalonia.DataGrid --version 11.0.1
|
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.1
|
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
||||||
```
|
```
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
@@ -35,18 +45,56 @@ dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.1
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If AOT publishing is required, you need to include the rd.xml file in your project:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<ItemGroup>
|
||||||
|
<RdXmlFile Include="rd.xml"/>
|
||||||
|
</ItemGroup>
|
||||||
|
```
|
||||||
|
|
||||||
|
The contents of the rd.xml file should be as follows:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Directives>
|
||||||
|
<!--
|
||||||
|
This file is part of RdXmlLibrary project.
|
||||||
|
Visit https://github.com/kant2002/rdxmllibrary for latest version.
|
||||||
|
If you have modifications specific to this Nuget package,
|
||||||
|
please contribute back.
|
||||||
|
-->
|
||||||
|
<Application>
|
||||||
|
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia" Dynamic="Required All"/>
|
||||||
|
<!-- If you don't use these, please don't include them.
|
||||||
|
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
|
||||||
|
-->
|
||||||
|
</Application>
|
||||||
|
</Directives>
|
||||||
|
```
|
||||||
|
|
||||||
## 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.
|
||||||
https://github.com/irihitech/Semi.Avalonia/releases
|
<https://github.com/irihitech/Semi.Avalonia/releases>
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
We offer limited free community support for Semi Avalonia and Ursa. If you have any question or suggestion, feel free to raise issues and discussions via GitHub, and you are welcomed to join our group via FeiShu(Lark)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Version compatibility
|
## Version compatibility
|
||||||
|
|
||||||
| Semi Design Version | Avalonia Version |
|
| Semi Design Version | Avalonia Version |
|
||||||
|:--------------------|:-----------------|
|
|:--------------------|:-----------------|
|
||||||
| 11.0.x | 11.0.x |
|
| 11.0.7 | >=11.0.7 |
|
||||||
|
| 11.0.1 | <=11.0.6 |
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
* FocusAdorner
|
* FocusAdorner
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
@@ -61,10 +109,3 @@ https://github.com/irihitech/Semi.Avalonia/releases
|
|||||||
|
|
||||||
[CommunityToolKit](https://github.com/CommunityToolkit/dotnet)
|
[CommunityToolKit](https://github.com/CommunityToolkit/dotnet)
|
||||||
|
|
||||||
## Screenshot
|
|
||||||
|
|
||||||
Light Mode
|
|
||||||

|
|
||||||
|
|
||||||
Dark Mode
|
|
||||||

|
|
||||||
113
README_CN.md
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
# Semi Avalonia
|
||||||
|
|
||||||
|
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
||||||
|
[](https://www.nuget.org/packages/Semi.Avalonia/)
|
||||||
|
|
||||||
|
[English](./README.md)
|
||||||
|
|
||||||
|
Avalonia UI 控件主题,灵感来自 Semi Design
|
||||||
|
|
||||||
|
如果您希望使用更多的拓展控件,欢迎尝试 [Ursa](https://github.com/irihitech/Ursa.Avalonia)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 如何使用
|
||||||
|
|
||||||
|
### 安装
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet add package Semi.Avalonia --version 11.0.7
|
||||||
|
```
|
||||||
|
|
||||||
|
在样式中引用 Semi 主题:
|
||||||
|
|
||||||
|
```xaml
|
||||||
|
<Application.Styles>
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||||
|
</Application.Styles>
|
||||||
|
```
|
||||||
|
|
||||||
|
这样就可以了。
|
||||||
|
|
||||||
|
ColorPicker, DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
||||||
|
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
||||||
|
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
||||||
|
```
|
||||||
|
|
||||||
|
```xaml
|
||||||
|
<Application.Styles>
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
|
||||||
|
</Application.Styles>
|
||||||
|
```
|
||||||
|
|
||||||
|
如果需要进行 AOT 发布,则需要在项目中包含 rd.xml 文件:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<ItemGroup>
|
||||||
|
<RdXmlFile Include="rd.xml"/>
|
||||||
|
</ItemGroup>
|
||||||
|
```
|
||||||
|
|
||||||
|
rd.xml 文件的内容如下:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Directives>
|
||||||
|
<!--
|
||||||
|
This file is part of RdXmlLibrary project.
|
||||||
|
Visit https://github.com/kant2002/rdxmllibrary for latest version.
|
||||||
|
If you have modifications specific to this Nuget package,
|
||||||
|
please contribute back.
|
||||||
|
-->
|
||||||
|
<Application>
|
||||||
|
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia" Dynamic="Required All"/>
|
||||||
|
<!-- If you don't use these, please don't include them.
|
||||||
|
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
|
||||||
|
-->
|
||||||
|
</Application>
|
||||||
|
</Directives>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 示例
|
||||||
|
|
||||||
|
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
|
||||||
|
|
||||||
|
<https://github.com/irihitech/Semi.Avalonia/releases>
|
||||||
|
|
||||||
|
## 社区支持
|
||||||
|
|
||||||
|
我们提供有限度的免费社区支持,如果您有任何问题或建议,除了在GitHub上提交issue或发起讨论,也欢迎加入我们的飞书交流群:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## 版本兼容性
|
||||||
|
|
||||||
|
| Semi Design Version | Avalonia Version |
|
||||||
|
|:--------------------|:-----------------|
|
||||||
|
| 11.0.7 | >=11.0.7 |
|
||||||
|
| 11.0.1 | <=11.0.6 |
|
||||||
|
|
||||||
|
## 代办事项
|
||||||
|
|
||||||
|
* FocusAdorner
|
||||||
|
|
||||||
|
## 致谢
|
||||||
|
|
||||||
|
[Semi Design](https://semi.design/)
|
||||||
|
|
||||||
|
[Avalonia](https://github.com/AvaloniaUI/Avalonia)
|
||||||
|
|
||||||
|
[FluentAvalonia](https://github.com/amwx/FluentAvalonia)
|
||||||
|
|
||||||
|
[Material Design Icons](https://pictogrammers.com/library/mdi/)
|
||||||
|
|
||||||
|
[CommunityToolKit](https://github.com/CommunityToolkit/dotnet)
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
<AvaloniaVersion>11.1.0-beta2</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,59 +1,53 @@
|
|||||||
using Avalonia;
|
using System;
|
||||||
using Avalonia.Dialogs;
|
using System.Globalization;
|
||||||
using Avalonia.Media;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Avalonia;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Drm
|
namespace Semi.Avalonia.Demo.Drm;
|
||||||
|
|
||||||
|
class Program
|
||||||
{
|
{
|
||||||
internal class Program
|
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||||
|
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||||
|
// yet and stuff might break.
|
||||||
|
[STAThread]
|
||||||
|
public static int Main(string[] args)
|
||||||
{
|
{
|
||||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
var builder = BuildAvaloniaApp();
|
||||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
|
||||||
// yet and stuff might break.
|
double GetScaling()
|
||||||
[STAThread]
|
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
{
|
||||||
var builder = BuildAvaloniaApp();
|
var idx = Array.IndexOf(args, "--scaling");
|
||||||
builder.With(new FontManagerOptions
|
if (idx != 0 && args.Length > idx + 1 &&
|
||||||
{
|
double.TryParse(args[idx + 1], NumberStyles.Any, CultureInfo.InvariantCulture, out var scaling))
|
||||||
FontFallbacks = new[]
|
return scaling;
|
||||||
{
|
return 1;
|
||||||
new FontFallback
|
|
||||||
{
|
|
||||||
FontFamily = new FontFamily("Microsoft YaHei")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (args.Contains("--drm"))
|
|
||||||
{
|
|
||||||
SilenceConsole();
|
|
||||||
builder.StartLinuxDrm(args: args, card: "/dev/dri/card0", scaling: 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
builder.StartWithClassicDesktopLifetime(args);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avalonia configuration, don't remove; also used by visual designer.
|
if (args.Contains("--drm"))
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
|
||||||
=> AppBuilder.Configure<App>()
|
|
||||||
.UseManagedSystemDialogs()
|
|
||||||
.UsePlatformDetect()
|
|
||||||
.With(new Win32PlatformOptions())
|
|
||||||
.LogToTrace();
|
|
||||||
|
|
||||||
private static void SilenceConsole()
|
|
||||||
{
|
{
|
||||||
new Thread(() =>
|
SilenceConsole();
|
||||||
|
return builder.StartLinuxDrm(args: args, card: "/dev/dri/card1", scaling: GetScaling());
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.StartWithClassicDesktopLifetime(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Avalonia configuration, don't remove; also used by visual designer.
|
||||||
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
=> AppBuilder.Configure<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
.LogToTrace();
|
||||||
|
|
||||||
|
private static void SilenceConsole()
|
||||||
|
{
|
||||||
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
Console.CursorVisible = false;
|
Console.CursorVisible = false;
|
||||||
while (true)
|
while (true)
|
||||||
Console.ReadKey(true);
|
Console.ReadKey(true);
|
||||||
})
|
})
|
||||||
{ IsBackground = true }.Start();
|
{ IsBackground = true }.Start();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,23 @@
|
|||||||
# DRM启动步骤
|
# DRM启动步骤
|
||||||
|
|
||||||
(Ubuntu18.04Server版本 虚拟机测试OK)
|
(Ubuntu18.04Server版本 虚拟机测试OK)
|
||||||
|
(Orange Pi Zero2 Ubuntu20.04-arm64 测试OK)
|
||||||
|
|
||||||
Avalonia官方参考文档:https://docs.avaloniaui.net/docs/next/guides/platforms/rpi/running-on-raspbian-lite-via-drm
|
Avalonia官方参考文档:https://docs.avaloniaui.net/docs/next/guides/platforms/rpi/running-on-raspbian-lite-via-drm
|
||||||
|
|
||||||
1.Linux端运行命令
|
1.Linux端运行命令
|
||||||
sudo apt update
|
```
|
||||||
sudo apt upgrade
|
sudo apt update
|
||||||
sudo reboot
|
sudo apt upgrade
|
||||||
sudo apt - get install libgbm1 libgl1 - mesa - dri libegl1 - mesa libinput10
|
sudo reboot
|
||||||
|
sudo apt - get install libgbm1 libgl1 - mesa - dri libegl1 - mesa libinput10
|
||||||
|
```
|
||||||
|
|
||||||
2.安装测试工具测试(出现一个彩色立方体说明环境安装完成)
|
2.安装测试工具测试(出现一个彩色立方体说明环境安装完成)
|
||||||
sudo apt-get install kmscube
|
```
|
||||||
sudo kmscube
|
sudo apt-get install kmscube
|
||||||
|
sudo kmscube
|
||||||
|
```
|
||||||
|
|
||||||
3.安装.net运行时(参考网址:https://learn.microsoft.com/zh-cn/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website)
|
3.安装.net运行时(参考网址:https://learn.microsoft.com/zh-cn/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website)
|
||||||
|
|
||||||
@@ -31,7 +36,7 @@ Avalonia官方参考文档:https://docs.avaloniaui.net/docs/next/guides/platfo
|
|||||||
>Unhandled exception. Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for avares://Semi.Avalonia/Themes/Light/Light.axaml (baseUri: avares://Semi.Avalonia/Themes/Index.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
|
>Unhandled exception. Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for avares://Semi.Avalonia/Themes/Light/Light.axaml (baseUri: avares://Semi.Avalonia/Themes/Index.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
|
||||||
|
|
||||||
解决方法:
|
解决方法:
|
||||||
如果使用Semi发布文件不要裁剪,如果裁剪会报错
|
>如果使用Semi发布文件不要裁剪,如果裁剪会报错
|
||||||
|
|
||||||
|
|
||||||
2. 报错内容
|
2. 报错内容
|
||||||
@@ -41,11 +46,32 @@ Avalonia官方参考文档:https://docs.avaloniaui.net/docs/next/guides/platfo
|
|||||||
at SkiaSharp.SKImageInfo..cctor()
|
at SkiaSharp.SKImageInfo..cctor()
|
||||||
|
|
||||||
解决方法:
|
解决方法:
|
||||||
Linux命令行安装一下 apt-get install -y libfontconfig1
|
>Linux命令行安装一下 apt-get install -y libfontconfig1
|
||||||
参考网址:https://github.com/mono/SkiaSharp/issues/509
|
参考网址:https://github.com/mono/SkiaSharp/issues/509
|
||||||
|
|
||||||
3. 报错内容
|
3. 报错内容
|
||||||
>Permission denied
|
>Permission denied
|
||||||
|
|
||||||
解决方法:
|
解决方法:
|
||||||
sudo chmod +x ./Semi.Avalonia.Demo.Drm
|
>sudo chmod +x ./Semi.Avalonia.Demo.Drm
|
||||||
|
|
||||||
|
4. 报错内容
|
||||||
|
>Unhandled exception. System.ComponentModel.Win32Exception (95): drmModeGetResources failed
|
||||||
|
at Avalonia.LinuxFramebuffer.Output.DrmResources..ctor(Int32 fd, Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 91
|
||||||
|
at Avalonia.LinuxFramebuffer.Output.DrmCard.GetResources(Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 171
|
||||||
|
at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String path, Boolean connectorsForceProbe, DrmOutputOptions options) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 60
|
||||||
|
at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder builder, String[] args, String card, Double scaling, IInputBackend inputBackend) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
|
||||||
|
at Semi.Avalonia.Demo.Drm.Program.Main(String[] args)
|
||||||
|
|
||||||
|
解决方法:
|
||||||
|
>`program.cs`的显卡路径错误,可能不是`dev/dri/card1`,看在`dev/dri`目录下有无其他的显卡如`card0`。
|
||||||
|
|
||||||
|
5. 报错内容
|
||||||
|
>Unhandled exception. System.ComponentModel.Win32Exception (2): Couldn't open /dev/dri/card1
|
||||||
|
at Avalonia.LinuxFramebuffer.Output.DrmCard..ctor(String ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 167
|
||||||
|
at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String , Boolean , DrmOutputOptions ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 58
|
||||||
|
at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder, String[], String , Double , IInputBackend ) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
|
||||||
|
at Semi.Avalonia.Demo.Drm.Program.Main(String[])
|
||||||
|
|
||||||
|
解决办法:
|
||||||
|
>找不到显卡路径`dev/dri/card1`,可能是显卡挂载到别的文件夹下了,待解决。
|
||||||
@@ -7,9 +7,9 @@ using Avalonia.Browser;
|
|||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Web;
|
namespace Semi.Avalonia.Demo.Web;
|
||||||
|
|
||||||
internal partial class Program
|
internal sealed partial class Program
|
||||||
{
|
{
|
||||||
private static async Task Main(string[] args) => await BuildAvaloniaApp()
|
private static Task Main(string[] args) => BuildAvaloniaApp()
|
||||||
.StartBrowserAppAsync("out");
|
.StartBrowserAppAsync("out");
|
||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
|
||||||
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
|
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0-browser</TargetFramework>
|
||||||
|
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
||||||
|
<WasmMainJSPath>wwwroot\main.js</WasmMainJSPath>
|
||||||
|
<WasmRuntimeAssetsLocation>./_framework</WasmRuntimeAssetsLocation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<WasmExtraFilesToDeploy Include="AppBundle\**" />
|
<WasmExtraFilesToDeploy Include="wwwroot\**"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@@ -7,8 +7,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<link rel="modulepreload" href="./main.js" />
|
<link rel="modulepreload" href="./main.js" />
|
||||||
<link rel="modulepreload" href="./dotnet.js" />
|
<link rel="modulepreload" href="./_framework/dotnet.js" />
|
||||||
<link rel="modulepreload" href="./avalonia.js" />
|
<link rel="modulepreload" href="./_framework/avalonia.js" />
|
||||||
<link rel="stylesheet" href="./app.css" />
|
<link rel="stylesheet" href="./app.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { dotnet } from './dotnet.js'
|
import { dotnet } from './_framework/dotnet.js'
|
||||||
|
|
||||||
const is_browser = typeof window != "undefined";
|
const is_browser = typeof window != "undefined";
|
||||||
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
||||||
@@ -10,4 +10,4 @@ const dotnetRuntime = await dotnet
|
|||||||
|
|
||||||
const config = dotnetRuntime.getConfig();
|
const config = dotnetRuntime.getConfig();
|
||||||
|
|
||||||
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);
|
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
<Application
|
<Application
|
||||||
x:Class="Semi.Avalonia.Demo.App"
|
x:Class="Semi.Avalonia.Demo.App"
|
||||||
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:semi="https://irihi.tech/semi">
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
|
<!-- You can still reference in old way.
|
||||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||||
|
-->
|
||||||
|
<semi:SemiTheme Locale="zh-CN"/>
|
||||||
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
|
|||||||
BIN
demo/Semi.Avalonia.Demo/Assets/WORLD.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
@@ -5,7 +5,7 @@
|
|||||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
x:CompileBindings="True"
|
x:CompileBindings="True"
|
||||||
x:DataType="viewModels:ColorItemViewModel">
|
x:DataType="viewModels:ColorItemViewModel">
|
||||||
<PathGeometry x:Key="CopyIcon">M5 7C3.89543 7 3 7.89543 3 9V19C3 20.1046 3.89543 21 5 21H15C16.1046 21 17 20.1046 17 19V9C17 7.89543 16.1046 7 15 7H5Z,M7 4C7 2.89543 7.89543 2 9 2H20C21.1046 2 22 2.89543 22 4V15C22 16.1046 21.1046 17 20 17H19V8C19 6 18 5 16 5H7V4Z</PathGeometry>
|
<StreamGeometry x:Key="CopyIcon">M5 7C3.89543 7 3 7.89543 3 9V19C3 20.1046 3.89543 21 5 21H15C16.1046 21 17 20.1046 17 19V9C17 7.89543 16.1046 7 15 7H5Z,M7 4C7 2.89543 7.89543 2 9 2H20C21.1046 2 22 2.89543 22 4V15C22 16.1046 21.1046 17 20 17H19V8C19 6 18 5 16 5H7V4Z</StreamGeometry>
|
||||||
<ControlTheme x:Key="{x:Type controls:ColorDetailControl}" TargetType="controls:ColorDetailControl">
|
<ControlTheme x:Key="{x:Type controls:ColorDetailControl}" TargetType="controls:ColorDetailControl">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<Setter Property="controls:ColorDetailControl.Template">
|
<Setter Property="controls:ColorDetailControl.Template">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
x:DataType="viewModels:ColorItemViewModel"
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Binding="{ReflectionBinding ColorDisplayName}"
|
Binding="{Binding ColorDisplayName}"
|
||||||
CanUserSort="False"
|
CanUserSort="False"
|
||||||
Header="Name" />
|
Header="Name" />
|
||||||
<DataGridTemplateColumn Width="100" Header="Hex">
|
<DataGridTemplateColumn Width="100" Header="Hex">
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
x:DataType="viewModels:ColorItemViewModel"
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Binding="{ReflectionBinding ColorDisplayName}"
|
Binding="{Binding ColorDisplayName}"
|
||||||
CanUserSort="False"
|
CanUserSort="False"
|
||||||
Header="Name" />
|
Header="Name" />
|
||||||
<DataGridTemplateColumn Width="100" Header="Hex">
|
<DataGridTemplateColumn Width="100" Header="Hex">
|
||||||
|
|||||||
@@ -17,58 +17,72 @@
|
|||||||
<StackPanel.Styles>
|
<StackPanel.Styles>
|
||||||
<Style Selector="AutoCompleteBox">
|
<Style Selector="AutoCompleteBox">
|
||||||
<Setter Property="Width" Value="300" />
|
<Setter Property="Width" Value="300" />
|
||||||
|
<Setter Property="ItemsSource">
|
||||||
|
<Binding Path="States" />
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="ItemTemplate">
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</StackPanel.Styles>
|
</StackPanel.Styles>
|
||||||
|
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
ItemsSource="{Binding States}"
|
Watermark="Please select a State"
|
||||||
ValueMemberBinding="{Binding Name}"
|
ValueMemberBinding="{Binding Name}" />
|
||||||
Watermark="Please select a State">
|
|
||||||
<AutoCompleteBox.ItemTemplate>
|
|
||||||
<DataTemplate DataType="local:StateData">
|
|
||||||
<TextBlock Text="{Binding Name}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</AutoCompleteBox.ItemTemplate>
|
|
||||||
</AutoCompleteBox>
|
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
Classes="Large"
|
Classes="Large"
|
||||||
ItemsSource="{Binding States}"
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
ValueMemberBinding="{ReflectionBinding Name}">
|
|
||||||
<AutoCompleteBox.ItemTemplate>
|
|
||||||
<DataTemplate DataType="local:StateData">
|
|
||||||
<TextBlock Text="{Binding Name}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</AutoCompleteBox.ItemTemplate>
|
|
||||||
</AutoCompleteBox>
|
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
Classes="Small"
|
Classes="Small"
|
||||||
ItemsSource="{Binding States}"
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
ValueMemberBinding="{ReflectionBinding Name}">
|
|
||||||
<AutoCompleteBox.ItemTemplate>
|
|
||||||
<DataTemplate DataType="local:StateData">
|
|
||||||
<TextBlock Text="{Binding Name}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</AutoCompleteBox.ItemTemplate>
|
|
||||||
</AutoCompleteBox>
|
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
ItemsSource="{Binding States}"
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
ValueMemberBinding="{ReflectionBinding Name}">
|
|
||||||
<AutoCompleteBox.ItemTemplate>
|
|
||||||
<DataTemplate DataType="local:StateData">
|
|
||||||
<TextBlock Text="{Binding Name}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</AutoCompleteBox.ItemTemplate>
|
|
||||||
</AutoCompleteBox>
|
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
ItemsSource="{Binding States}"
|
Watermark="Disabled"
|
||||||
ValueMemberBinding="{ReflectionBinding Name}"
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
Watermark="Disabled">
|
<AutoCompleteBox
|
||||||
<AutoCompleteBox.ItemTemplate>
|
InnerLeftContent="https://"
|
||||||
<DataTemplate DataType="local:StateData">
|
InnerRightContent=".com"
|
||||||
<TextBlock Text="{Binding Name}" />
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
</DataTemplate>
|
|
||||||
</AutoCompleteBox.ItemTemplate>
|
<StackPanel Orientation="Horizontal">
|
||||||
</AutoCompleteBox>
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
Classes="Large"
|
||||||
|
Watermark="Large"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
Watermark="Default"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
Classes="Small"
|
||||||
|
Watermark="Small"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
IsEnabled="False"
|
||||||
|
Watermark="Disabled"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
Classes="Bordered"
|
||||||
|
Watermark="Bordered"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
<AutoCompleteBox
|
||||||
|
Width="100"
|
||||||
|
Classes="Bordered"
|
||||||
|
IsEnabled="False"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -4,114 +4,148 @@
|
|||||||
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"
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<ScrollViewer>
|
||||||
<TextBlock>Light (Default)</TextBlock>
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel.Styles>
|
||||||
<Button Classes="Primary">Primary</Button>
|
<Style Selector="SplitButton">
|
||||||
<Button Classes="Secondary">Secondary</Button>
|
<Setter Property="Flyout">
|
||||||
<Button Classes="Tertiary">Tertiary</Button>
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
<Button Classes="Success">Success</Button>
|
<MenuItem Header="Submit All" />
|
||||||
<Button Classes="Warning">Warning</Button>
|
<MenuItem Header="Submit Updated" />
|
||||||
<Button Classes="Danger">Danger</Button>
|
</MenuFlyout>
|
||||||
<Button Classes="Primary" IsEnabled="False">Danger</Button>
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="DropDownButton">
|
||||||
|
<Setter Property="Flyout">
|
||||||
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
|
<MenuItem Header="Submit All" />
|
||||||
|
<MenuItem Header="Submit Updated" />
|
||||||
|
</MenuFlyout>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="ToggleSplitButton">
|
||||||
|
<Setter Property="Flyout">
|
||||||
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
|
<MenuItem Header="Submit All" />
|
||||||
|
<MenuItem Header="Submit Updated" />
|
||||||
|
</MenuFlyout>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Styles>
|
||||||
|
|
||||||
|
<TextBlock>Light (Default)</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary">Primary</Button>
|
||||||
|
<Button Classes="Secondary">Secondary</Button>
|
||||||
|
<Button Classes="Tertiary">Tertiary</Button>
|
||||||
|
<Button Classes="Success">Success</Button>
|
||||||
|
<Button Classes="Warning">Warning</Button>
|
||||||
|
<Button Classes="Danger">Danger</Button>
|
||||||
|
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary Small">Small</Button>
|
||||||
|
<Button Classes="Primary">Default</Button>
|
||||||
|
<Button Classes="Primary Large">Large</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock>Solid</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
||||||
|
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
|
||||||
|
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
|
||||||
|
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
|
||||||
|
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
||||||
|
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
||||||
|
<Button
|
||||||
|
Classes="Danger"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource SolidButton}">
|
||||||
|
Disabled
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock>Borderless</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
||||||
|
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button>
|
||||||
|
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
|
||||||
|
<Button Classes="Success" Theme="{DynamicResource BorderlessButton}">Success</Button>
|
||||||
|
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
||||||
|
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
||||||
|
<Button
|
||||||
|
Classes="Danger"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
|
Disabled
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock>DropDownButton</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<DropDownButton Content="Primary" />
|
||||||
|
<DropDownButton Classes="Secondary" Content="Secondary" />
|
||||||
|
<DropDownButton Classes="Tertiary" Content="Tertiary" />
|
||||||
|
<DropDownButton Classes="Success" Content="Success" />
|
||||||
|
<DropDownButton Classes="Warning" Content="Warning" />
|
||||||
|
<DropDownButton Classes="Danger" Content="Danger" />
|
||||||
|
<DropDownButton
|
||||||
|
Classes="Danger"
|
||||||
|
Content="Disabled"
|
||||||
|
IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<DropDownButton Content="Default" Classes="Success"/>
|
||||||
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
|
||||||
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
|
||||||
|
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
|
||||||
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<DropDownButton Classes="Small" Content="Small" />
|
||||||
|
<DropDownButton Content="Default" />
|
||||||
|
<DropDownButton Classes="Large" Content="Large" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock>SplitButton</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<SplitButton Content="Primary" />
|
||||||
|
<SplitButton Classes="Secondary" Content="Secondary" />
|
||||||
|
<SplitButton Classes="Tertiary" Content="Tertiary" />
|
||||||
|
<SplitButton Classes="Success" Content="Success" />
|
||||||
|
<SplitButton Classes="Warning" Content="Warning" />
|
||||||
|
<SplitButton Classes="Danger" Content="Danger" />
|
||||||
|
<SplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<SplitButton Content="Default" Classes="Success" />
|
||||||
|
<SplitButton Theme="{DynamicResource SolidSplitButton}" Content="Solid" Classes="Success" />
|
||||||
|
<SplitButton Theme="{DynamicResource BorderlessSplitButton}" Content="Borderless" Classes="Success" />
|
||||||
|
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||||
|
<SplitButton Theme="{DynamicResource SolidSplitButton}" Content="Solid" Classes="Success" IsEnabled="False" />
|
||||||
|
<SplitButton Theme="{DynamicResource BorderlessSplitButton}" Content="Borderless" Classes="Success" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<SplitButton Classes="Small" Content="Small" />
|
||||||
|
<SplitButton Content="Default" />
|
||||||
|
<SplitButton Classes="Large" Content="Large" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock>ToggleSplitButton</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<ToggleSplitButton Content="Primary" />
|
||||||
|
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
|
||||||
|
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
|
||||||
|
<ToggleSplitButton Classes="Success" Content="Success" />
|
||||||
|
<ToggleSplitButton Classes="Warning" Content="Warning" />
|
||||||
|
<ToggleSplitButton Classes="Danger" Content="Danger" />
|
||||||
|
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<ToggleSplitButton Classes="Small" Content="Small" />
|
||||||
|
<ToggleSplitButton Content="Default" />
|
||||||
|
<ToggleSplitButton Classes="Large" Content="Large" />
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Solid</TextBlock>
|
</ScrollViewer>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
|
||||||
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
|
||||||
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
|
|
||||||
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
|
|
||||||
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
|
|
||||||
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
|
||||||
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
|
||||||
<Button
|
|
||||||
Classes="Primary"
|
|
||||||
IsEnabled="False"
|
|
||||||
Theme="{DynamicResource SolidButton}">
|
|
||||||
Danger
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock>Borderless</TextBlock>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
|
||||||
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
|
||||||
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button>
|
|
||||||
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
|
|
||||||
<Button Classes="Success" Theme="{DynamicResource BorderlessButton}">Success</Button>
|
|
||||||
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
|
||||||
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
|
||||||
<Button
|
|
||||||
Classes="Primary"
|
|
||||||
IsEnabled="False"
|
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
|
||||||
Danger
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock>DropDownButton</TextBlock>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
||||||
<DropDownButton Content="Submit">
|
|
||||||
<DropDownButton.Flyout>
|
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
|
||||||
<MenuItem Header="Submit All" />
|
|
||||||
<MenuItem Header="Submit Updated" />
|
|
||||||
</MenuFlyout>
|
|
||||||
</DropDownButton.Flyout>
|
|
||||||
</DropDownButton>
|
|
||||||
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropDownButton}">
|
|
||||||
<DropDownButton.Flyout>
|
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
|
||||||
<MenuItem Header="Submit All" />
|
|
||||||
<MenuItem Header="Submit Updated" />
|
|
||||||
</MenuFlyout>
|
|
||||||
</DropDownButton.Flyout>
|
|
||||||
</DropDownButton>
|
|
||||||
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropDownButton}">
|
|
||||||
<DropDownButton.Flyout>
|
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
|
||||||
<MenuItem Header="Submit All" />
|
|
||||||
<MenuItem Header="Submit Updated" />
|
|
||||||
</MenuFlyout>
|
|
||||||
</DropDownButton.Flyout>
|
|
||||||
</DropDownButton>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
||||||
<SplitButton Content="Submit">
|
|
||||||
<SplitButton.Flyout>
|
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
|
||||||
<MenuItem Header="Submit All" />
|
|
||||||
<MenuItem Header="Submit Updated" />
|
|
||||||
</MenuFlyout>
|
|
||||||
</SplitButton.Flyout>
|
|
||||||
</SplitButton>
|
|
||||||
<SplitButton Classes="Secondary" Content="Submit" />
|
|
||||||
<SplitButton Classes="Tertiary" Content="Submit" />
|
|
||||||
<SplitButton Classes="Success" Content="Submit" />
|
|
||||||
<SplitButton Classes="Warning" Content="Submit" />
|
|
||||||
<SplitButton Classes="Danger" Content="Submit" />
|
|
||||||
<SplitButton
|
|
||||||
Classes="Danger"
|
|
||||||
Content="Submit"
|
|
||||||
IsEnabled="False" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
||||||
<ToggleSplitButton Content="Submit">
|
|
||||||
<ToggleSplitButton.Flyout>
|
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
|
||||||
<MenuItem Header="Submit All" />
|
|
||||||
<MenuItem Header="Submit Updated" />
|
|
||||||
</MenuFlyout>
|
|
||||||
</ToggleSplitButton.Flyout>
|
|
||||||
</ToggleSplitButton>
|
|
||||||
<ToggleSplitButton Classes="Secondary" Content="Submit" />
|
|
||||||
<ToggleSplitButton Classes="Tertiary" Content="Submit" />
|
|
||||||
<ToggleSplitButton Classes="Success" Content="Submit" />
|
|
||||||
<ToggleSplitButton Classes="Warning" Content="Submit" />
|
|
||||||
<ToggleSplitButton Classes="Danger" Content="Submit" />
|
|
||||||
<ToggleSplitButton
|
|
||||||
Classes="Danger"
|
|
||||||
Content="Submit"
|
|
||||||
IsEnabled="False" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -8,10 +8,22 @@
|
|||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<CalendarDatePicker />
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CalendarDatePicker Classes="Large" />
|
||||||
|
<CalendarDatePicker />
|
||||||
|
<CalendarDatePicker Classes="Small" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CalendarDatePicker IsEnabled="False" />
|
||||||
|
<CalendarDatePicker Classes="Bordered" />
|
||||||
|
<CalendarDatePicker Classes="Bordered" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<CalendarDatePicker Width="500" />
|
<CalendarDatePicker Width="500" />
|
||||||
<CalendarDatePicker Classes="Large" />
|
|
||||||
<CalendarDatePicker Classes="Small" />
|
<CalendarDatePicker Classes="ClearButton" Width="200" />
|
||||||
|
|
||||||
<CalendarDatePicker
|
<CalendarDatePicker
|
||||||
Name="DatePicker2"
|
Name="DatePicker2"
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
@@ -22,9 +34,5 @@
|
|||||||
CustomDateFormatString="ddd, MMM d"
|
CustomDateFormatString="ddd, MMM d"
|
||||||
SelectedDateFormat="Custom" />
|
SelectedDateFormat="Custom" />
|
||||||
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
||||||
|
|
||||||
<CalendarDatePicker IsEnabled="False" />
|
|
||||||
<CalendarDatePicker Classes="Bordered" />
|
|
||||||
<CalendarDatePicker Classes="Bordered" IsEnabled="False" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -52,5 +52,22 @@
|
|||||||
<TextBlock Text="Text 4" />
|
<TextBlock Text="Text 4" />
|
||||||
</Border>
|
</Border>
|
||||||
</Carousel>
|
</Carousel>
|
||||||
|
<Carousel Classes="Columnar Left" Theme="{DynamicResource FullCarousel}">
|
||||||
|
<Carousel.PageTransition>
|
||||||
|
<PageSlide Orientation="Horizontal" Duration="0.25" />
|
||||||
|
</Carousel.PageTransition>
|
||||||
|
<Border Background="#EAF5FF">
|
||||||
|
<TextBlock Text="Text 1" />
|
||||||
|
</Border>
|
||||||
|
<Border Background="#F9F9F9">
|
||||||
|
<TextBlock Text="Text 2" />
|
||||||
|
</Border>
|
||||||
|
<Border Background="#FFF8EA">
|
||||||
|
<TextBlock Text="Text 3" />
|
||||||
|
</Border>
|
||||||
|
<Border Background="#FEF2ED">
|
||||||
|
<TextBlock Text="Text 4" />
|
||||||
|
</Border>
|
||||||
|
</Carousel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -29,6 +29,12 @@
|
|||||||
<colorPicker:SemiColorLightPalette />
|
<colorPicker:SemiColorLightPalette />
|
||||||
</ColorPicker.Palette>
|
</ColorPicker.Palette>
|
||||||
</ColorPicker>
|
</ColorPicker>
|
||||||
|
|
||||||
|
<ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
|
||||||
|
<ColorPicker.Palette>
|
||||||
|
<colorPicker:SemiColorLightPalette />
|
||||||
|
</ColorPicker.Palette>
|
||||||
|
</ColorPicker>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -4,64 +4,40 @@
|
|||||||
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"
|
||||||
d:DesignHeight="450"
|
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
|
d:DesignHeight="800"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<Design.DataContext>
|
||||||
|
<pages:ComboBoxDemoViewModel />
|
||||||
|
</Design.DataContext>
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<ComboBox Width="150">
|
<StackPanel.Styles>
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
<Style Selector="ComboBox">
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
<Setter Property="Width" Value="300" />
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
<Setter Property="ItemsSource" Value="{Binding Items}" />
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
</Style>
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
</StackPanel.Styles>
|
||||||
</ComboBox>
|
|
||||||
<ComboBox Width="150" PlaceholderText="Please Select">
|
<ComboBox />
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
<ComboBox Classes="ClearButton" />
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
<ComboBox PlaceholderText="Please Select" />
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
<ComboBox IsEnabled="False" />
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
<ComboBox Classes="Large" IsEnabled="False" />
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
<ComboBox Classes="Small" />
|
||||||
</ComboBox>
|
<ComboBox Classes="Bordered" />
|
||||||
<ComboBox Width="150" IsEnabled="False">
|
<ComboBox Classes="Bordered" IsEnabled="False" />
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
<StackPanel Orientation="Horizontal">
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
<ComboBox Width="100" Classes="Large" PlaceholderText="Large" />
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
<ComboBox Width="100" PlaceholderText="Default" />
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
<ComboBox Width="100" Classes="Small" PlaceholderText="Small" />
|
||||||
</ComboBox>
|
</StackPanel>
|
||||||
<ComboBox
|
|
||||||
Width="150"
|
<StackPanel Orientation="Horizontal">
|
||||||
Classes="Large"
|
<ComboBox Width="100" IsEnabled="False" PlaceholderText="Disabled" />
|
||||||
IsEnabled="False">
|
<ComboBox Width="100" Classes="Bordered" PlaceholderText="Bordered" />
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
<ComboBox Width="100" Classes="Bordered" IsEnabled="False" />
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
</StackPanel>
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox Width="150" Classes="Small">
|
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox Width="150" Classes="Bordered">
|
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
|
||||||
</ComboBox>
|
|
||||||
<ComboBox
|
|
||||||
Width="150"
|
|
||||||
Classes="Bordered"
|
|
||||||
IsEnabled="False">
|
|
||||||
<ComboBoxItem>Ding</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Otter</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Husky</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Mr. 17</ComboBoxItem>
|
|
||||||
<ComboBoxItem>Cass</ComboBoxItem>
|
|
||||||
</ComboBox>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Avalonia;
|
using System.Collections.ObjectModel;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,5 +9,11 @@ public partial class ComboBoxDemo : UserControl
|
|||||||
public ComboBoxDemo()
|
public ComboBoxDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.DataContext = new ComboBoxDemoViewModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ComboBoxDemoViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
|
||||||
|
}
|
||||||
@@ -13,43 +13,48 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem Header="DataGrid">
|
<TabItem Header="DataGrid">
|
||||||
<DataGrid
|
<Grid RowDefinitions="Auto, *">
|
||||||
Margin="8"
|
<ToggleSwitch Grid.Row="0" Content="Disable" Name="DisableToggle"></ToggleSwitch>
|
||||||
CanUserReorderColumns="True"
|
<DataGrid Grid.Row="1"
|
||||||
CanUserResizeColumns="True"
|
Margin="8"
|
||||||
CanUserSortColumns="True"
|
CanUserReorderColumns="True"
|
||||||
HeadersVisibility="All"
|
CanUserResizeColumns="True"
|
||||||
IsReadOnly="True"
|
CanUserSortColumns="True"
|
||||||
ItemsSource="{Binding GridData1}">
|
HeadersVisibility="All"
|
||||||
<DataGrid.Columns>
|
IsReadOnly="True"
|
||||||
<DataGridTextColumn
|
IsEnabled="{Binding #DisableToggle.IsChecked}"
|
||||||
Width="6*"
|
ItemsSource="{Binding GridData1}">
|
||||||
x:DataType="vm:Song"
|
<DataGrid.Columns>
|
||||||
Binding="{Binding Title}"
|
<DataGridTextColumn
|
||||||
Header="Title" />
|
Width="6*"
|
||||||
<DataGridTextColumn
|
x:DataType="vm:Song"
|
||||||
Width="6*"
|
Binding="{Binding Title}"
|
||||||
x:DataType="vm:Song"
|
Header="Title" />
|
||||||
Binding="{Binding Artist}"
|
<DataGridTextColumn
|
||||||
Header="Artist" />
|
Width="6*"
|
||||||
<DataGridTextColumn
|
x:DataType="vm:Song"
|
||||||
Width="6*"
|
Binding="{Binding Artist}"
|
||||||
x:DataType="vm:Song"
|
Header="Artist" />
|
||||||
Binding="{Binding Album}"
|
<DataGridTextColumn
|
||||||
Header="Album" />
|
Width="6*"
|
||||||
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
|
x:DataType="vm:Song"
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
Binding="{Binding Album}"
|
||||||
<DataTemplate>
|
Header="Album" />
|
||||||
<TextBlock
|
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
|
||||||
Margin="8,0,0,0"
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
VerticalAlignment="Center"
|
<DataTemplate>
|
||||||
Text="{Binding Duration}" />
|
<TextBlock
|
||||||
</DataTemplate>
|
Margin="8,0,0,0"
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
VerticalAlignment="Center"
|
||||||
</DataGridTemplateColumn>
|
Text="{Binding Duration}" />
|
||||||
</DataGrid.Columns>
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Grouping">
|
<TabItem Header="Grouping">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
@@ -162,6 +167,7 @@
|
|||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="12,0,12,12"
|
Margin="12,0,12,12"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
|
Command="{Binding AddCommand}"
|
||||||
Content="Add" />
|
Content="Add" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
@@ -9,9 +9,21 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<DatePicker />
|
<DatePicker />
|
||||||
|
<DatePicker Classes="ClearButton" />
|
||||||
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
||||||
<DatePicker IsEnabled="False" />
|
<DatePicker IsEnabled="False" />
|
||||||
<DatePicker Classes="Large" />
|
<DatePicker Classes="Large" />
|
||||||
<DatePicker Classes="Small" />
|
<DatePicker Classes="Small" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<DatePicker Classes="Large" />
|
||||||
|
<DatePicker />
|
||||||
|
<DatePicker Classes="Small" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<DatePicker IsEnabled="False" />
|
||||||
|
<DatePicker Classes="Bordered" />
|
||||||
|
<DatePicker Classes="Bordered" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<UserControl.Styles>
|
<UserControl.Styles>
|
||||||
<Style Selector="Button">
|
<Style Selector="Button">
|
||||||
<Setter Property="Margin" Value="8" />
|
<Setter Property="Margin" Value="8" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
<Grid
|
<Grid
|
||||||
|
|||||||
@@ -6,7 +6,32 @@
|
|||||||
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
|
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<HeaderedContentControl Theme="{DynamicResource GroupBox}" Header="Semi Design" Width="400" Height="200">
|
<TextBlock>Default Theme</TextBlock>
|
||||||
|
<WrapPanel ItemWidth="400">
|
||||||
|
<HeaderedContentControl
|
||||||
|
Header="This is the text header!"
|
||||||
|
BorderBrush="Gray"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="4">
|
||||||
|
<TextBlock Text="Some content" />
|
||||||
|
</HeaderedContentControl>
|
||||||
|
<HeaderedContentControl Header="This is the image header!">
|
||||||
|
<Image Source="/Assets/WORLD.png" />
|
||||||
|
</HeaderedContentControl>
|
||||||
|
<HeaderedContentControl>
|
||||||
|
<HeaderedContentControl.Header>
|
||||||
|
<Image Source="/Assets/WORLD.png" />
|
||||||
|
</HeaderedContentControl.Header>
|
||||||
|
<TextBlock Text="This is the content. But the header can also be non textual" />
|
||||||
|
</HeaderedContentControl>
|
||||||
|
</WrapPanel>
|
||||||
|
<TextBlock>GroupBox Theme</TextBlock>
|
||||||
|
<HeaderedContentControl
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Theme="{DynamicResource GroupBox}"
|
||||||
|
Header="Semi Design"
|
||||||
|
Width="400"
|
||||||
|
Height="200">
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock>
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock>
|
||||||
</HeaderedContentControl>
|
</HeaderedContentControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
43
demo/Semi.Avalonia.Demo/Pages/HyperlinkButtonDemo.axaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<UserControl
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
x:Class="Semi.Avalonia.Demo.Pages.HyperlinkButtonDemo"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<HyperlinkButton Height="20" NavigateUri="http://www.irihi.tech/">
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Text="iRihi Homepage"
|
||||||
|
TextDecorations="Underline"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</HyperlinkButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<HyperlinkButton Height="20" IsEnabled="False">
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Text="Not Enabled"
|
||||||
|
TextDecorations="Underline"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</HyperlinkButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<HyperlinkButton
|
||||||
|
BorderThickness="1"
|
||||||
|
Classes="WithIcon"
|
||||||
|
Height="20"
|
||||||
|
NavigateUri="http://www.irihi.tech/">
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Text="Link with Icon"
|
||||||
|
TextDecorations="Underline"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</HyperlinkButton>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
14
demo/Semi.Avalonia.Demo/Pages/HyperlinkButtonDemo.axaml.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
public partial class HyperlinkButtonDemo : UserControl
|
||||||
|
{
|
||||||
|
public HyperlinkButtonDemo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,9 +38,9 @@
|
|||||||
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock>
|
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock>
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock>
|
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock>
|
||||||
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock>
|
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock>
|
||||||
<TextBlock Grid.Row="6" Grid.Column="0">Warning</TextBlock>
|
<TextBlock Grid.Row="6" Grid.Column="0">Success</TextBlock>
|
||||||
<TextBlock Grid.Row="7" Grid.Column="0">Danger</TextBlock>
|
<TextBlock Grid.Row="7" Grid.Column="0">Warning</TextBlock>
|
||||||
<TextBlock Grid.Row="8" Grid.Column="0">Success</TextBlock>
|
<TextBlock Grid.Row="8" Grid.Column="0">Danger</TextBlock>
|
||||||
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock>
|
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock>
|
||||||
<TextBlock Grid.Row="10" Grid.Column="0">Code</TextBlock>
|
<TextBlock Grid.Row="10" Grid.Column="0">Code</TextBlock>
|
||||||
<Label Grid.Row="2" Grid.Column="1">Text</Label>
|
<Label Grid.Row="2" Grid.Column="1">Text</Label>
|
||||||
@@ -65,20 +65,20 @@
|
|||||||
<Label
|
<Label
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Warning">
|
Classes="Success">
|
||||||
Warning
|
Success
|
||||||
</Label>
|
</Label>
|
||||||
<Label
|
<Label
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Danger">
|
Classes="Warning">
|
||||||
Danger
|
Warning
|
||||||
</Label>
|
</Label>
|
||||||
<Label
|
<Label
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Success">
|
Classes="Danger">
|
||||||
Success
|
Danger
|
||||||
</Label>
|
</Label>
|
||||||
<Label
|
<Label
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="10">
|
<StackPanel HorizontalAlignment="Left" Spacing="10">
|
||||||
|
<StackPanel.Styles>
|
||||||
|
<Style Selector="Button">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Styles>
|
||||||
<Button Name="openFileDialog">Open File</Button>
|
<Button Name="openFileDialog">Open File</Button>
|
||||||
<Button Name="selectFolderDialog">Select Folder</Button>
|
<Button Name="selectFolderDialog">Select Folder</Button>
|
||||||
<Button Name="saveFileDialog">Save File</Button>
|
<Button Name="saveFileDialog">Save File</Button>
|
||||||
|
|||||||
@@ -25,14 +25,30 @@
|
|||||||
<MenuItem Header="Submenu Level 2" />
|
<MenuItem Header="Submenu Level 2" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Menu Item with _Checkbox">
|
<MenuItem Header="Menu Item with _Icon">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<TextBlock>😊</TextBlock>
|
<TextBlock>😊</TextBlock>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox" ToggleType="CheckBox" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="_Second">
|
<MenuItem Header="_Second">
|
||||||
<MenuItem Header="Second _Menu Item" />
|
<MenuItem Header="Second _Menu Item" />
|
||||||
|
<MenuItem IsChecked="True" Header="Second Menu toggle item" ToggleType="CheckBox" />
|
||||||
|
<Separator />
|
||||||
|
<MenuItem GroupName="A" Header="Radio 1 - group" ToggleType="Radio" />
|
||||||
|
<MenuItem IsChecked="True" GroupName="A" Header="Radio 2 - group" ToggleType="Radio" />
|
||||||
|
<MenuItem GroupName="A" Header="Radio 3 - group" ToggleType="Radio">
|
||||||
|
<MenuItem Header="Radio 4 - group" ToggleType="Radio" GroupName="A" />
|
||||||
|
<MenuItem Header="Radio 5 - group" ToggleType="Radio" GroupName="A" />
|
||||||
|
</MenuItem>
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Radio 1" ToggleType="Radio" />
|
||||||
|
<MenuItem IsChecked="True" Header="Radio 2" ToggleType="Radio" />
|
||||||
|
<MenuItem Header="Radio 3" ToggleType="Radio">
|
||||||
|
<MenuItem Header="Radio 4" ToggleType="Radio" />
|
||||||
|
<MenuItem Header="Radio 5" ToggleType="Radio" />
|
||||||
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Parent">
|
<MenuItem Header="Parent">
|
||||||
<MenuItem Header="Child 1" />
|
<MenuItem Header="Child 1" />
|
||||||
@@ -86,7 +102,7 @@
|
|||||||
<MenuItem Header="Submenu _1" />
|
<MenuItem Header="Submenu _1" />
|
||||||
<MenuItem Header="Submenu _2" />
|
<MenuItem Header="Submenu _2" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Menu Item with _Checkbox">
|
<MenuItem Header="Menu Item with _Icon">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Padding="0"
|
Padding="0"
|
||||||
@@ -95,6 +111,7 @@
|
|||||||
IsHitTestVisible="False" />
|
IsHitTestVisible="False" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox" ToggleType="CheckBox" />
|
||||||
<MenuItem Header="Menu Item that won't close on click" StaysOpenOnClick="True" />
|
<MenuItem Header="Menu Item that won't close on click" StaysOpenOnClick="True" />
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Border.ContextMenu>
|
</Border.ContextMenu>
|
||||||
@@ -113,7 +130,7 @@
|
|||||||
<MenuItem Header="Submenu _1" />
|
<MenuItem Header="Submenu _1" />
|
||||||
<MenuItem Header="Submenu _2" />
|
<MenuItem Header="Submenu _2" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="Menu Item with _Checkbox">
|
<MenuItem Header="Menu Item with _Icon">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Padding="0"
|
Padding="0"
|
||||||
@@ -122,6 +139,7 @@
|
|||||||
IsHitTestVisible="False" />
|
IsHitTestVisible="False" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox" ToggleType="CheckBox" />
|
||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</Border.ContextFlyout>
|
</Border.ContextFlyout>
|
||||||
<TextBlock Text="Right Click to show Context Flyout" />
|
<TextBlock Text="Right Click to show Context Flyout" />
|
||||||
|
|||||||
@@ -8,9 +8,17 @@
|
|||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
|
<StackPanel.Styles>
|
||||||
|
<Style Selector="Button">
|
||||||
|
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Styles>
|
||||||
|
|
||||||
|
<Button Click="InfoButton_OnClick" Content="Default" />
|
||||||
<Button Click="InfoButton_OnClick" Content="Information" />
|
<Button Click="InfoButton_OnClick" Content="Information" />
|
||||||
<Button Click="InfoButton_OnClick" Content="Success" />
|
<Button Click="InfoButton_OnClick" Content="Success" Classes="Success" />
|
||||||
<Button Click="InfoButton_OnClick" Content="Warning" />
|
<Button Click="InfoButton_OnClick" Content="Warning" Classes="Warning" />
|
||||||
<Button Click="InfoButton_OnClick" Content="Error" />
|
<Button Click="InfoButton_OnClick" Content="Error" Classes="Danger" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -2,17 +2,14 @@ using System;
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Notifications;
|
using Avalonia.Controls.Notifications;
|
||||||
using Avalonia.Controls.Presenters;
|
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
using Avalonia.VisualTree;
|
|
||||||
using Semi.Avalonia.Demo.Views;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
public partial class NotificationDemo : UserControl
|
public partial class NotificationDemo : UserControl
|
||||||
{
|
{
|
||||||
private WindowNotificationManager? _manager;
|
private WindowNotificationManager? _manager;
|
||||||
|
|
||||||
public NotificationDemo()
|
public NotificationDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -22,14 +19,16 @@ public partial class NotificationDemo : UserControl
|
|||||||
{
|
{
|
||||||
base.OnAttachedToVisualTree(e);
|
base.OnAttachedToVisualTree(e);
|
||||||
var topLevel = TopLevel.GetTopLevel(this);
|
var topLevel = TopLevel.GetTopLevel(this);
|
||||||
_manager = new WindowNotificationManager(topLevel){ MaxItems = 3};
|
_manager = new WindowNotificationManager(topLevel) { MaxItems = 3 };
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InfoButton_OnClick(object? sender, RoutedEventArgs e)
|
private void InfoButton_OnClick(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Button b && b.Content is string s && Enum.TryParse<NotificationType>(s, out NotificationType t))
|
if (sender is Button b && b.Content is string s)
|
||||||
{
|
{
|
||||||
_manager?.Show(new Notification(t.ToString(), "This is message", t));
|
_manager?.Show(Enum.TryParse<NotificationType>(s, out NotificationType t)
|
||||||
|
? new Notification(t.ToString(), "This is message", t)
|
||||||
|
: new Notification(s, "This is message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,38 +4,53 @@
|
|||||||
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"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="800"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<NumericUpDown
|
<StackPanel.Styles>
|
||||||
Width="200"
|
<Style Selector="NumericUpDown">
|
||||||
Maximum="100"
|
<Setter Property="Width" Value="300" />
|
||||||
Minimum="0" />
|
<Setter Property="Maximum" Value="100" />
|
||||||
<NumericUpDown
|
<Setter Property="Minimum" Value="0" />
|
||||||
Width="200"
|
</Style>
|
||||||
Increment="10"
|
</StackPanel.Styles>
|
||||||
Maximum="100"
|
|
||||||
Minimum="0" />
|
<NumericUpDown />
|
||||||
<NumericUpDown
|
<NumericUpDown Increment="10" />
|
||||||
Width="200"
|
<NumericUpDown ButtonSpinnerLocation="Left" />
|
||||||
ButtonSpinnerLocation="Left"
|
<NumericUpDown ShowButtonSpinner="False" />
|
||||||
Maximum="100"
|
<NumericUpDown Classes="Large" />
|
||||||
Minimum="0" />
|
<NumericUpDown Classes="Small" />
|
||||||
<NumericUpDown
|
<NumericUpDown InnerLeftContent="Price" InnerRightContent="$" />
|
||||||
Width="200"
|
|
||||||
Maximum="100"
|
<StackPanel Orientation="Horizontal">
|
||||||
Minimum="0"
|
<NumericUpDown
|
||||||
ShowButtonSpinner="False" />
|
Width="100"
|
||||||
<NumericUpDown
|
Classes="Large"
|
||||||
Width="200"
|
Watermark="Large"
|
||||||
Classes="Large"
|
ButtonSpinnerLocation="Left" />
|
||||||
Maximum="100"
|
<NumericUpDown
|
||||||
Minimum="0" />
|
Width="100"
|
||||||
<NumericUpDown
|
Watermark="Default"
|
||||||
Width="200"
|
ShowButtonSpinner="False" />
|
||||||
Classes="Small"
|
<NumericUpDown
|
||||||
Maximum="100"
|
Width="100"
|
||||||
Minimum="0" />
|
Watermark="Small"
|
||||||
|
Classes="Small" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<NumericUpDown Width="100" ButtonSpinnerLocation="Left" />
|
||||||
|
<NumericUpDown Width="100" ShowButtonSpinner="False" />
|
||||||
|
<NumericUpDown Width="100" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<NumericUpDown Width="100" ShowButtonSpinner="False" />
|
||||||
|
<NumericUpDown Width="100" IsEnabled="False" />
|
||||||
|
<NumericUpDown Width="100" ButtonSpinnerLocation="Left" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -87,31 +87,37 @@
|
|||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Primary"
|
Classes="Primary"
|
||||||
Content="Primary"
|
Content="Primary"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Secondary"
|
Classes="Secondary"
|
||||||
Content="Secondary"
|
Content="Secondary"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Content="Tertiary"
|
Content="Tertiary"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Success"
|
Classes="Success"
|
||||||
Content="Success"
|
Content="Success"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Warning"
|
Classes="Warning"
|
||||||
Content="Warning"
|
Content="Warning"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
Classes="Danger"
|
Classes="Danger"
|
||||||
Content="Danger"
|
Content="Danger"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource SolidButton}" />
|
Theme="{DynamicResource SolidButton}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Calendar Margin="16,0" />
|
<Calendar Margin="16,0" />
|
||||||
@@ -194,26 +200,32 @@
|
|||||||
<StackPanel Margin="16,0">
|
<StackPanel Margin="16,0">
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Primary"
|
Classes="Primary"
|
||||||
Content="Primary" />
|
Content="Primary" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Secondary"
|
Classes="Secondary"
|
||||||
Content="Secondary" />
|
Content="Secondary" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Content="Tertiary" />
|
Content="Tertiary" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Success"
|
Classes="Success"
|
||||||
Content="Success" />
|
Content="Success" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Warning"
|
Classes="Warning"
|
||||||
Content="Warning" />
|
Content="Warning" />
|
||||||
<Button
|
<Button
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
Classes="Danger"
|
Classes="Danger"
|
||||||
Content="Danger" />
|
Content="Danger" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public partial class Overview : UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.0.1";
|
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.0.7";
|
||||||
|
|
||||||
public string MainStyle { get; set; } = """
|
public string MainStyle { get; set; } = """
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
@@ -21,7 +21,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.0.1";
|
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7";
|
||||||
|
|
||||||
public string ColorPickerStyle { get; set; } = """
|
public string ColorPickerStyle { get; set; } = """
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
@@ -29,7 +29,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.0.1";
|
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.0.7";
|
||||||
|
|
||||||
public string DataGridStyle { get; set; } = """
|
public string DataGridStyle { get; set; } = """
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
@@ -37,7 +37,7 @@ public partial class Overview : UserControl
|
|||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
""";
|
""";
|
||||||
|
|
||||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.1";
|
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7";
|
||||||
|
|
||||||
public string TreeDataGridStyle { get; set; } = """
|
public string TreeDataGridStyle { get; set; } = """
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
|
|||||||
22
demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Semi.Avalonia.Demo.Pages.PathIconDemo"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<StackPanel HorizontalAlignment="Left" >
|
||||||
|
<TextBlock Text="Size"></TextBlock>
|
||||||
|
<Slider Name="width" Minimum="0" Maximum="100" Value="20" Width="300"></Slider>
|
||||||
|
<ToggleSwitch Name="active" Content="Active"></ToggleSwitch>
|
||||||
|
<PathIcon
|
||||||
|
Classes.Active="{Binding ElementName=active, Path=IsChecked}"
|
||||||
|
BorderBrush="{DynamicResource SemiRed6}"
|
||||||
|
Width="{Binding #width.Value}"
|
||||||
|
Height="{Binding #width.Value}"
|
||||||
|
Data="M12 3L2 12H5V20H19V12H22L12 3M13 18H11V16H13V18M13 14H11V8H13V14Z"
|
||||||
|
Foreground="{DynamicResource SemiBlue6}" />
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
13
demo/Semi.Avalonia.Demo/Pages/PathIconDemo.axaml.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
public partial class PathIconDemo : UserControl
|
||||||
|
{
|
||||||
|
public PathIconDemo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,12 +4,24 @@
|
|||||||
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:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
|
x:DataType="pages:RefreshContainerDemoViewModel"
|
||||||
|
x:CompileBindings="True"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||||
<RefreshContainer Name="container">
|
<Label DockPanel.Dock="Top">A control that supports pull to refresh</Label>
|
||||||
<TextBlock Text="Content" />
|
<RefreshContainer Name="Refresh"
|
||||||
|
DockPanel.Dock="Bottom"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
PullDirection="TopToBottom"
|
||||||
|
RefreshRequested="RefreshContainerPage_RefreshRequested"
|
||||||
|
Margin="5">
|
||||||
|
<ListBox HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
ItemsSource="{Binding Items}" />
|
||||||
</RefreshContainer>
|
</RefreshContainer>
|
||||||
</StackPanel>
|
</DockPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,14 +1,46 @@
|
|||||||
using Avalonia;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
public partial class RefreshContainerDemo : UserControl
|
public partial class RefreshContainerDemo : UserControl
|
||||||
{
|
{
|
||||||
|
private RefreshContainerDemoViewModel _viewModel;
|
||||||
|
|
||||||
public RefreshContainerDemo()
|
public RefreshContainerDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
_viewModel = new RefreshContainerDemoViewModel();
|
||||||
|
|
||||||
|
DataContext = _viewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void RefreshContainerPage_RefreshRequested(object? sender, RefreshRequestedEventArgs e)
|
||||||
|
{
|
||||||
|
var deferral = e.GetDeferral();
|
||||||
|
|
||||||
|
await _viewModel.AddToTop();
|
||||||
|
|
||||||
|
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}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<RepeatButton Classes="Success">Success</RepeatButton>
|
<RepeatButton Classes="Success">Success</RepeatButton>
|
||||||
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
||||||
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" IsEnabled="False">Disabled</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Solid</TextBlock>
|
<TextBlock>Solid</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource SolidRepeatButton}">
|
Theme="{DynamicResource SolidRepeatButton}">
|
||||||
Danger
|
Disabled
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Borderless</TextBlock>
|
<TextBlock>Borderless</TextBlock>
|
||||||
@@ -42,11 +42,16 @@
|
|||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||||
Danger
|
Disabled
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<RepeatButton Classes="Small">Small</RepeatButton>
|
||||||
|
<RepeatButton>Default</RepeatButton>
|
||||||
|
<RepeatButton Classes="Large">Large</RepeatButton>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
<SelectableTextBlock Grid.Row="3" Grid.Column="0">Secondary</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="3" Grid.Column="0">Secondary</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="4" Grid.Column="0">Tertiary</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="4" Grid.Column="0">Tertiary</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="5" Grid.Column="0">Quaternary</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="5" Grid.Column="0">Quaternary</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="6" Grid.Column="0">Warning</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="6" Grid.Column="0">Success</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="7" Grid.Column="0">Danger</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="7" Grid.Column="0">Warning</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="8" Grid.Column="0">Success</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="8" Grid.Column="0">Danger</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="9" Grid.Column="0">Mark</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="9" Grid.Column="0">Mark</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="10" Grid.Column="0">Underline</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="10" Grid.Column="0">Underline</SelectableTextBlock>
|
||||||
<SelectableTextBlock Grid.Row="11" Grid.Column="0">Delete</SelectableTextBlock>
|
<SelectableTextBlock Grid.Row="11" Grid.Column="0">Delete</SelectableTextBlock>
|
||||||
@@ -60,20 +60,20 @@
|
|||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Warning">
|
Classes="Success">
|
||||||
Warning
|
Success
|
||||||
</SelectableTextBlock>
|
</SelectableTextBlock>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Danger">
|
Classes="Warning">
|
||||||
Danger
|
Warning
|
||||||
</SelectableTextBlock>
|
</SelectableTextBlock>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Success">
|
Classes="Danger">
|
||||||
Success
|
Danger
|
||||||
</SelectableTextBlock>
|
</SelectableTextBlock>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
|
|||||||
@@ -4,143 +4,190 @@
|
|||||||
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"
|
||||||
d:DesignHeight="450"
|
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
|
||||||
|
d:DesignHeight="1000"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<Design.DataContext>
|
||||||
|
<pages:SplitViewDemoViewModel />
|
||||||
|
</Design.DataContext>
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<StreamGeometry x:Key="NavigationMenuExpandIconGlyph">M5 2H19C20.6569 2 22 3.34315 22 5V19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V5C2 3.34315 3.34315 2 5 2ZM6 4C5.44772 4 5 4.44772 5 5V19C5 19.5523 5.44772 20 6 20H9C9.55229 20 10 19.5523 10 19V5C10 4.44772 9.55229 4 9 4H6Z</StreamGeometry>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
<Border>
|
<Border>
|
||||||
<Grid ColumnDefinitions="*,400">
|
<Grid ColumnDefinitions="*,400">
|
||||||
<StackPanel
|
<Border Grid.Column="1" VerticalAlignment="Top" Margin="10 0 0 0">
|
||||||
Grid.Column="1"
|
<Grid RowDefinitions="*, *, *, *, *, *" ColumnDefinitions="Auto, *">
|
||||||
Orientation="Vertical"
|
<Label
|
||||||
Spacing="4">
|
Grid.Row="0" Grid.Column="0"
|
||||||
<ToggleButton
|
VerticalAlignment="Center"
|
||||||
Name="PaneOpenButton"
|
Content="IsPaneOpen" />
|
||||||
Content="IsPaneOpen"
|
<ToggleSwitch
|
||||||
IsChecked="{Binding IsPaneOpen, ElementName=SplitView}" />
|
Grid.Row="0" Grid.Column="1"
|
||||||
|
Name="PaneOpenButton"
|
||||||
|
IsChecked="{Binding #SplitView.IsPaneOpen}" />
|
||||||
|
|
||||||
<ToggleButton
|
<Label
|
||||||
Name="UseLightDismissOverlayModeButton"
|
Grid.Row="1" Grid.Column="0"
|
||||||
Content="UseLightDismissOverlayMode"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding UseLightDismissOverlayMode, ElementName=SplitView}" />
|
Content="UseLightDismissOverlayMode" />
|
||||||
|
<ToggleSwitch
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
Name="UseLightDismissOverlayModeButton"
|
||||||
|
IsChecked="{Binding #SplitView.UseLightDismissOverlayMode}" />
|
||||||
|
|
||||||
<ToggleSwitch
|
<Label
|
||||||
Content="Placement"
|
Grid.Row="2" Grid.Column="0"
|
||||||
OffContent="Left"
|
VerticalAlignment="Center"
|
||||||
OnContent="Right" />
|
Content="Placement" />
|
||||||
|
<ToggleSwitch
|
||||||
|
Grid.Row="2" Grid.Column="1"
|
||||||
|
OffContent="Left"
|
||||||
|
OnContent="Right"
|
||||||
|
IsChecked="{Binding #SplitView.PanePlacement}" />
|
||||||
|
|
||||||
<TextBlock Text="DisplayMode" />
|
<Label
|
||||||
<ComboBox
|
Grid.Row="3" Grid.Column="0"
|
||||||
Name="DisplayModeSelector"
|
VerticalAlignment="Center"
|
||||||
Width="170"
|
Content="DisplayMode" />
|
||||||
Margin="10"
|
<ComboBox
|
||||||
SelectedIndex="{Binding DisplayMode}">
|
Grid.Row="3" Grid.Column="1"
|
||||||
<ComboBoxItem>Inline</ComboBoxItem>
|
Name="DisplayModeSelector"
|
||||||
<ComboBoxItem>CompactInline</ComboBoxItem>
|
HorizontalAlignment="Stretch"
|
||||||
<ComboBoxItem>Overlay</ComboBoxItem>
|
ItemsSource="{Binding DisplayModes}"
|
||||||
<ComboBoxItem>CompactOverlay</ComboBoxItem>
|
SelectedIndex="{Binding #SplitView.DisplayMode}" />
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<TextBlock Text="PaneBackground" />
|
<Label
|
||||||
<ComboBox
|
Grid.Row="4" Grid.Column="0"
|
||||||
Name="PaneBackgroundSelector"
|
VerticalAlignment="Center"
|
||||||
Width="170"
|
Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" />
|
||||||
Margin="10"
|
<Slider
|
||||||
SelectedIndex="0">
|
Grid.Row="4" Grid.Column="1"
|
||||||
<ComboBoxItem Tag="White">White</ComboBoxItem>
|
Name="CompactPaneLengthSlider"
|
||||||
<ComboBoxItem Tag="Red">Red</ComboBoxItem>
|
Maximum="128"
|
||||||
<ComboBoxItem Tag="Blue">Blue</ComboBoxItem>
|
Minimum="0"
|
||||||
<ComboBoxItem Tag="Green">Green</ComboBoxItem>
|
TickFrequency="1"
|
||||||
</ComboBox>
|
IsSnapToTickEnabled="True"
|
||||||
|
Value="{Binding #SplitView.CompactPaneLength}" />
|
||||||
|
|
||||||
<TextBlock Text="{Binding Value, ElementName=OpenPaneLengthSlider, StringFormat='{}OpenPaneLength: {0}'}" />
|
<Label
|
||||||
<Slider
|
Grid.Row="5" Grid.Column="0"
|
||||||
Name="OpenPaneLengthSlider"
|
VerticalAlignment="Center"
|
||||||
Width="150"
|
Content="{Binding #OpenPaneLengthSlider.Value,StringFormat='{}OpenPaneLength: {0}'}" />
|
||||||
Maximum="500"
|
<Slider
|
||||||
Minimum="128"
|
Grid.Row="5" Grid.Column="1"
|
||||||
Value="256" />
|
Name="OpenPaneLengthSlider"
|
||||||
|
Maximum="500"
|
||||||
<TextBlock Text="{Binding Value, ElementName=CompactPaneLengthSlider, StringFormat='{}CompactPaneLength: {0}'}" />
|
Minimum="128"
|
||||||
<Slider
|
TickFrequency="1"
|
||||||
Name="CompactPaneLengthSlider"
|
IsSnapToTickEnabled="True"
|
||||||
Width="150"
|
Value="{Binding #SplitView.OpenPaneLength}" />
|
||||||
Maximum="128"
|
</Grid>
|
||||||
Minimum="24"
|
</Border>
|
||||||
Value="48" />
|
<Border
|
||||||
</StackPanel>
|
Grid.Column="0"
|
||||||
<Border BorderBrush="{DynamicResource SystemControlHighlightBaseLowBrush}" BorderThickness="1">
|
BorderBrush="{DynamicResource SemiGrey1}"
|
||||||
<!-- {Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector} -->
|
BorderThickness="1">
|
||||||
<SplitView
|
<SplitView
|
||||||
Name="SplitView"
|
Name="SplitView"
|
||||||
CompactPaneLength="{Binding Value, ElementName=CompactPaneLengthSlider}"
|
|
||||||
DisplayMode="CompactOverlay"
|
DisplayMode="CompactOverlay"
|
||||||
OpenPaneLength="{Binding Value, ElementName=OpenPaneLengthSlider}"
|
CompactPaneLength="48"
|
||||||
PaneBackground="{Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector}"
|
OpenPaneLength="256">
|
||||||
PanePlacement="{Binding PanePlacement}">
|
<SplitView.Background>
|
||||||
|
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
|
||||||
|
<GradientStop Color="#6b4c1b" Offset="0" />
|
||||||
|
<GradientStop Color="#291e10" Offset="1" />
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</SplitView.Background>
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<Grid RowDefinitions="Auto,Auto,*,Auto">
|
<Grid RowDefinitions="Auto,*,Auto">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
Grid.Row="0"
|
||||||
Name="PaneHeader"
|
Name="PaneHeader"
|
||||||
Margin="5,12,0,0"
|
Margin="8,12"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
Text="PANE CONTENT" />
|
Text="Playlist" />
|
||||||
<ComboBox Grid.Row="1" Width="150">
|
<ListBox
|
||||||
<ComboBoxItem Content="Item1" />
|
Grid.Row="1"
|
||||||
<ComboBoxItem Content="Item2" />
|
ItemsSource="{Binding Songs}" />
|
||||||
<ComboBoxItem Content="Item3" />
|
<ToggleSwitch
|
||||||
</ComboBox>
|
|
||||||
<ListBoxItem
|
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="0,10"
|
Theme="{DynamicResource ButtonToggleSwitch}"
|
||||||
VerticalAlignment="Top">
|
IsChecked="{Binding #SplitView.IsPaneOpen}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<ToggleSwitch.OnContent>
|
||||||
<!-- Path glyph from materialdesignicons.com -->
|
<PathIcon
|
||||||
<Border Width="48">
|
Width="16"
|
||||||
<Viewbox
|
Height="16"
|
||||||
Width="24"
|
Data="{StaticResource NavigationMenuExpandIconGlyph}" />
|
||||||
Height="24"
|
</ToggleSwitch.OnContent>
|
||||||
HorizontalAlignment="Left">
|
<ToggleSwitch.OffContent>
|
||||||
<Canvas Width="24" Height="24">
|
<PathIcon
|
||||||
<Path Data="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" Fill="{DynamicResource SystemControlForegroundBaseHighBrush}" />
|
Width="16"
|
||||||
</Canvas>
|
Height="16"
|
||||||
</Viewbox>
|
Data="{StaticResource NavigationMenuExpandIconGlyph}" />
|
||||||
</Border>
|
</ToggleSwitch.OffContent>
|
||||||
<TextBlock VerticalAlignment="Center" Text="People" />
|
</ToggleSwitch>
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="3"
|
|
||||||
Margin="60,12"
|
|
||||||
Text="Item at bottom" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</SplitView.Pane>
|
</SplitView.Pane>
|
||||||
|
|
||||||
<Grid>
|
<Panel>
|
||||||
<Grid.Styles>
|
<Panel.Styles>
|
||||||
<Style Selector="TextBlock">
|
<Style Selector="Image#AlbumCover">
|
||||||
<Setter Property="FontSize" Value="14" />
|
<Style.Animations>
|
||||||
<Setter Property="FontWeight" Value="700" />
|
<Animation IterationCount="Infinite" Duration="0:0:40">
|
||||||
|
<KeyFrame Cue="0%">
|
||||||
|
<Setter Property="RotateTransform.Angle" Value="0" />
|
||||||
|
</KeyFrame>
|
||||||
|
<KeyFrame Cue="100%">
|
||||||
|
<Setter Property="RotateTransform.Angle" Value="360" />
|
||||||
|
</KeyFrame>
|
||||||
|
</Animation>
|
||||||
|
</Style.Animations>
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Styles>
|
</Panel.Styles>
|
||||||
<TextBlock
|
<Image
|
||||||
HorizontalAlignment="Center"
|
Source="/Assets/WORLD.png"
|
||||||
VerticalAlignment="Center"
|
Name="AlbumCover"
|
||||||
Text="SplitViewContent" />
|
Width="200"
|
||||||
<TextBlock Text="SplitViewContent" TextAlignment="Left" />
|
Height="200" />
|
||||||
<TextBlock
|
<Arc
|
||||||
HorizontalAlignment="Right"
|
Width="290"
|
||||||
Text="SplitViewContent"
|
Height="290"
|
||||||
TextAlignment="Left" />
|
StartAngle="0"
|
||||||
<TextBlock
|
SweepAngle="360"
|
||||||
VerticalAlignment="Bottom"
|
StrokeJoin="Round"
|
||||||
Text="SplitViewContent"
|
StrokeLineCap="Round"
|
||||||
TextAlignment="Left" />
|
StrokeThickness="45">
|
||||||
<TextBlock
|
<Arc.Stroke>
|
||||||
HorizontalAlignment="Right"
|
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
|
||||||
VerticalAlignment="Bottom"
|
<GradientStop Color="#010101" Offset="0" />
|
||||||
Text="SplitViewContent"
|
<GradientStop Color="#363636" Offset="0.5" />
|
||||||
TextAlignment="Left" />
|
<GradientStop Color="#010101" Offset="1" />
|
||||||
</Grid>
|
</LinearGradientBrush>
|
||||||
|
</Arc.Stroke>
|
||||||
|
</Arc>
|
||||||
|
<Arc
|
||||||
|
Width="294"
|
||||||
|
Height="294"
|
||||||
|
StartAngle="0"
|
||||||
|
SweepAngle="360"
|
||||||
|
StrokeJoin="Round"
|
||||||
|
StrokeLineCap="Round"
|
||||||
|
StrokeThickness="4"
|
||||||
|
Stroke="Black" />
|
||||||
|
<Arc
|
||||||
|
Width="310"
|
||||||
|
Height="310"
|
||||||
|
StartAngle="0"
|
||||||
|
SweepAngle="360"
|
||||||
|
StrokeJoin="Round"
|
||||||
|
StrokeLineCap="Round"
|
||||||
|
StrokeThickness="10"
|
||||||
|
Stroke="#C6CACD"
|
||||||
|
Opacity="0.1" />
|
||||||
|
</Panel>
|
||||||
|
|
||||||
</SplitView>
|
</SplitView>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Avalonia;
|
using System.Collections.ObjectModel;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ public partial class SplitViewDemo : UserControl
|
|||||||
public SplitViewDemo()
|
public SplitViewDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.DataContext = new SplitViewDemoViewModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
@@ -16,3 +18,27 @@ public partial class SplitViewDemo : UserControl
|
|||||||
AvaloniaXamlLoader.Load(this);
|
AvaloniaXamlLoader.Load(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SplitViewDemoViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Songs { get; set; } =
|
||||||
|
[
|
||||||
|
"320万年前",
|
||||||
|
"隐德来希",
|
||||||
|
"孔明",
|
||||||
|
"锦鲤卟噜噜",
|
||||||
|
"指鹿为马",
|
||||||
|
"热带季风Remix",
|
||||||
|
"加州梦境",
|
||||||
|
"渐近自由",
|
||||||
|
"世界所有的烂漫",
|
||||||
|
];
|
||||||
|
|
||||||
|
public ObservableCollection<SplitViewDisplayMode> DisplayModes { get; set; } =
|
||||||
|
[
|
||||||
|
SplitViewDisplayMode.Inline,
|
||||||
|
SplitViewDisplayMode.CompactInline,
|
||||||
|
SplitViewDisplayMode.Overlay,
|
||||||
|
SplitViewDisplayMode.CompactOverlay,
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -4,63 +4,92 @@
|
|||||||
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;assembly=Semi.Avalonia.Demo"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
|
x:CompileBindings="True"
|
||||||
|
x:DataType="vm:TabControlDemoViewModel"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<ScrollViewer>
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
<StackPanel Spacing="20">
|
||||||
<TabControl TabStripPlacement="Top">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
<TabControl TabStripPlacement="Top">
|
||||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||||
<TabItem Content="中文内容" Header="中文中文" />
|
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||||
<TabItem
|
<TabItem Content="中文内容" Header="中文中文" />
|
||||||
Content="Hello 4"
|
<TabItem
|
||||||
Header="Tab 4"
|
Content="Hello 4"
|
||||||
IsEnabled="False" />
|
Header="Tab 4"
|
||||||
</TabControl>
|
IsEnabled="False" />
|
||||||
</Border>
|
</TabControl>
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
</Border>
|
||||||
<TabControl TabStripPlacement="Left">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
<TabControl TabStripPlacement="Left">
|
||||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||||
<TabItem Content="中文内容" Header="中文中文" />
|
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||||
<TabItem
|
<TabItem Content="中文内容" Header="中文中文" />
|
||||||
Content="Hello 4"
|
<TabItem
|
||||||
Header="Tab 4"
|
Content="Hello 4"
|
||||||
IsEnabled="False" />
|
Header="Tab 4"
|
||||||
</TabControl>
|
IsEnabled="False" />
|
||||||
</Border>
|
</TabControl>
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
</Border>
|
||||||
<TabControl TabStripPlacement="Right">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
<TabControl TabStripPlacement="Right">
|
||||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||||
<TabItem Content="中文内容" Header="中文中文" />
|
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||||
<TabItem
|
<TabItem Content="中文内容" Header="中文中文" />
|
||||||
Content="Hello 4"
|
<TabItem
|
||||||
Header="Tab 4"
|
Content="Hello 4"
|
||||||
IsEnabled="False" />
|
Header="Tab 4"
|
||||||
</TabControl>
|
IsEnabled="False" />
|
||||||
</Border>
|
</TabControl>
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
</Border>
|
||||||
<TabControl TabStripPlacement="Bottom">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TabItem Content="Hello 1" Header="Tab 1" />
|
<TabControl TabStripPlacement="Bottom">
|
||||||
<TabItem Content="Hello 2" Header="Tab 2" />
|
<TabItem Content="Hello 1" Header="Tab 1" />
|
||||||
<TabItem Content="Hello 3" Header="Tab 3" />
|
<TabItem Content="Hello 2" Header="Tab 2" />
|
||||||
<TabItem Content="中文内容" Header="中文中文" />
|
<TabItem Content="Hello 3" Header="Tab 3" />
|
||||||
<TabItem
|
<TabItem Content="中文内容" Header="中文中文" />
|
||||||
Content="Hello 4"
|
<TabItem
|
||||||
Header="Tab 4"
|
Content="Hello 4"
|
||||||
IsEnabled="False" />
|
Header="Tab 4"
|
||||||
</TabControl>
|
IsEnabled="False" />
|
||||||
</Border>
|
</TabControl>
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
</Border>
|
||||||
<TabStrip>
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TabStripItem>Tab 1</TabStripItem>
|
<TabStrip>
|
||||||
<TabStripItem>Tab 2</TabStripItem>
|
<TabStripItem>Tab 1</TabStripItem>
|
||||||
</TabStrip>
|
<TabStripItem>Tab 2</TabStripItem>
|
||||||
</Border>
|
</TabStrip>
|
||||||
</StackPanel>
|
</Border>
|
||||||
|
<Border Height="300" Theme="{DynamicResource CardBorder}">
|
||||||
|
<TabControl
|
||||||
|
ItemsSource="{Binding Items}"
|
||||||
|
TabStripPlacement="Top"
|
||||||
|
Theme="{DynamicResource ScrollTabControl}" />
|
||||||
|
</Border>
|
||||||
|
<Border Height="300" Theme="{DynamicResource CardBorder}">
|
||||||
|
<TabControl
|
||||||
|
ItemsSource="{Binding Items}"
|
||||||
|
TabStripPlacement="Left"
|
||||||
|
Theme="{DynamicResource ScrollTabControl}" />
|
||||||
|
</Border>
|
||||||
|
<Border Height="300" Theme="{DynamicResource CardBorder}">
|
||||||
|
<TabControl
|
||||||
|
ItemsSource="{Binding Items}"
|
||||||
|
TabStripPlacement="Bottom"
|
||||||
|
Theme="{DynamicResource ScrollTabControl}" />
|
||||||
|
</Border>
|
||||||
|
<Border Height="300" Theme="{DynamicResource CardBorder}">
|
||||||
|
<TabControl
|
||||||
|
ItemsSource="{Binding Items}"
|
||||||
|
TabStripPlacement="Right"
|
||||||
|
Theme="{DynamicResource ScrollTabControl}" />
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Pages;
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
@@ -9,5 +10,6 @@ public partial class TabControlDemo : UserControl
|
|||||||
public TabControlDemo()
|
public TabControlDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.DataContext = new TabControlDemoViewModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock>
|
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock>
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock>
|
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock>
|
||||||
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock>
|
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock>
|
||||||
<TextBlock Grid.Row="6" Grid.Column="0">Warning</TextBlock>
|
<TextBlock Grid.Row="6" Grid.Column="0">Success</TextBlock>
|
||||||
<TextBlock Grid.Row="7" Grid.Column="0">Danger</TextBlock>
|
<TextBlock Grid.Row="7" Grid.Column="0">Warning</TextBlock>
|
||||||
<TextBlock Grid.Row="8" Grid.Column="0">Success</TextBlock>
|
<TextBlock Grid.Row="8" Grid.Column="0">Danger</TextBlock>
|
||||||
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock>
|
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock>
|
||||||
<TextBlock Grid.Row="10" Grid.Column="0">Underline</TextBlock>
|
<TextBlock Grid.Row="10" Grid.Column="0">Underline</TextBlock>
|
||||||
<TextBlock Grid.Row="11" Grid.Column="0">Delete</TextBlock>
|
<TextBlock Grid.Row="11" Grid.Column="0">Delete</TextBlock>
|
||||||
@@ -60,20 +60,20 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Warning">
|
Classes="Success">
|
||||||
Warning
|
Success
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Danger">
|
Classes="Warning">
|
||||||
Danger
|
Warning
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Success">
|
Classes="Danger">
|
||||||
Success
|
Danger
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
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:system="clr-namespace:System;assembly=netstandard"
|
xmlns:system="clr-namespace:System;assembly=netstandard"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="800"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
@@ -42,6 +42,41 @@
|
|||||||
InnerLeftContent="http://"
|
InnerLeftContent="http://"
|
||||||
InnerRightContent=".com"
|
InnerRightContent=".com"
|
||||||
IsEnabled="False" />
|
IsEnabled="False" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Large"
|
||||||
|
Watermark="Large" />
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
Watermark="Default" />
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Small"
|
||||||
|
Watermark="Small" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
IsEnabled="False"
|
||||||
|
Watermark="Disabled" />
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Bordered"
|
||||||
|
Watermark="Bordered" />
|
||||||
|
<TextBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Bordered"
|
||||||
|
IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
<TextBox Width="300" Classes="TextArea" />
|
||||||
|
<TextBox
|
||||||
|
Width="300"
|
||||||
|
Theme="{StaticResource LooklessTextBox}"
|
||||||
|
Watermark="Lookless TextBox"
|
||||||
|
InnerLeftContent="http://"
|
||||||
|
InnerRightContent=".com" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -9,10 +9,22 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TimePicker />
|
<TimePicker />
|
||||||
|
<TimePicker Classes="ClearButton" />
|
||||||
<TimePicker MinuteIncrement="15" />
|
<TimePicker MinuteIncrement="15" />
|
||||||
<TimePicker ClockIdentifier="24HourClock" />
|
<TimePicker ClockIdentifier="24HourClock" />
|
||||||
<TimePicker ClockIdentifier="12HourClock" IsEnabled="False" />
|
<TimePicker ClockIdentifier="12HourClock" IsEnabled="False" />
|
||||||
<TimePicker Classes="Large" />
|
<TimePicker Classes="Large" />
|
||||||
<TimePicker Classes="Small" />
|
<TimePicker Classes="Small" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TimePicker Classes="Large" ClockIdentifier="12HourClock"/>
|
||||||
|
<TimePicker ClockIdentifier="12HourClock"/>
|
||||||
|
<TimePicker Classes="Small" ClockIdentifier="12HourClock"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TimePicker IsEnabled="False" />
|
||||||
|
<TimePicker Classes="Bordered" />
|
||||||
|
<TimePicker Classes="Bordered" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<ToggleButton Classes="Success">Success</ToggleButton>
|
<ToggleButton Classes="Success">Success</ToggleButton>
|
||||||
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsEnabled="False">Disabled</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Checked State" />
|
<TextBlock Text="Toggle Button Checked State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
@@ -28,18 +28,64 @@
|
|||||||
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
|
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
|
||||||
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsChecked="True" IsEnabled="False">Danger</ToggleButton>
|
<ToggleButton
|
||||||
|
Classes="Danger"
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False">
|
||||||
|
Disabled
|
||||||
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Three State" />
|
<TextBlock Text="Toggle Button Three State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton IsThreeState="True" IsChecked="{x:Null}">Default</ToggleButton>
|
<ToggleButton IsChecked="{x:Null}" IsThreeState="True">Default</ToggleButton>
|
||||||
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
<ToggleButton
|
||||||
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
|
Classes="Primary"
|
||||||
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
|
IsChecked="{x:Null}"
|
||||||
<ToggleButton Classes="Success" IsThreeState="True" IsChecked="{x:Null}">Success</ToggleButton>
|
IsThreeState="True">
|
||||||
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
|
Primary
|
||||||
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}" IsEnabled="False">Danger</ToggleButton>
|
<ToggleButton
|
||||||
|
Classes="Secondary"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True">
|
||||||
|
Secondary
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
Classes="Tertiary"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True">
|
||||||
|
Tertiary
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
Classes="Success"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True">
|
||||||
|
Success
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
Classes="Warning"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True">
|
||||||
|
Warning
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
Classes="Danger"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True">
|
||||||
|
Danger
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton
|
||||||
|
Classes="Danger"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsEnabled="False"
|
||||||
|
IsThreeState="True">
|
||||||
|
Disabled
|
||||||
|
</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
|
||||||
|
<ToggleButton IsThreeState="True">Default</ToggleButton>
|
||||||
|
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -36,9 +36,9 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^[TabStripPlacement=Left] /template/ Border#PART_BorderSeparator">
|
<Style Selector="^[TabStripPlacement=Left] /template/ Border#PART_BorderSeparator">
|
||||||
<Setter Property="Border.Width" Value="1" />
|
<Setter Property="Width" Value="1" />
|
||||||
<Setter Property="Border.VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Border.HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Avalonia.Collections;
|
using Avalonia.Collections;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.ViewModels;
|
namespace Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
@@ -15,6 +16,8 @@ public class DataGridDemoViewModel: ObservableObject
|
|||||||
|
|
||||||
public ObservableCollection<SongViewModel> GridData3 { get; set; }
|
public ObservableCollection<SongViewModel> GridData3 { get; set; }
|
||||||
|
|
||||||
|
public RelayCommand AddCommand { get; set; }
|
||||||
|
|
||||||
public DataGridDemoViewModel()
|
public DataGridDemoViewModel()
|
||||||
{
|
{
|
||||||
GridData1 = new ObservableCollection<Song>(Song.Songs);
|
GridData1 = new ObservableCollection<Song>(Song.Songs);
|
||||||
@@ -28,6 +31,12 @@ public class DataGridDemoViewModel: ObservableObject
|
|||||||
CountOfComment = a.CountOfComment,
|
CountOfComment = a.CountOfComment,
|
||||||
IsSelected = false
|
IsSelected = false
|
||||||
}));
|
}));
|
||||||
|
AddCommand = new RelayCommand(Add);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Add()
|
||||||
|
{
|
||||||
|
GridData3.Add(new SongViewModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +121,7 @@ public class Song
|
|||||||
new("指鹿为马", "熊猫堂ProducePandas", 3, 12, "W.O.R.L.D.", 74, 2063175272),
|
new("指鹿为马", "熊猫堂ProducePandas", 3, 12, "W.O.R.L.D.", 74, 2063175272),
|
||||||
new("热带季风Remix", "熊猫堂ProducePandas", 3, 22, "W.O.R.L.D.", 23, 2063173319),
|
new("热带季风Remix", "熊猫堂ProducePandas", 3, 22, "W.O.R.L.D.", 23, 2063173319),
|
||||||
new("加州梦境", "熊猫堂ProducePandas", 2, 56, "W.O.R.L.D.", 1662, 2063173324),
|
new("加州梦境", "熊猫堂ProducePandas", 2, 56, "W.O.R.L.D.", 1662, 2063173324),
|
||||||
new("渐进自由", "熊猫堂ProducePandas", 4, 19, "W.O.R.L.D.", 124, 2063173321),
|
new("渐近自由", "熊猫堂ProducePandas", 4, 19, "W.O.R.L.D.", 124, 2063173321),
|
||||||
new("世界所有的烂漫", "熊猫堂ProducePandas", 3, 30, "W.O.R.L.D.", 335, 2053388775),
|
new("世界所有的烂漫", "熊猫堂ProducePandas", 3, 30, "W.O.R.L.D.", 335, 2053388775),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.ViewModels;
|
||||||
|
|
||||||
|
public class TabControlDemoViewModel: ObservableObject
|
||||||
|
{
|
||||||
|
public ObservableCollection<string> Items { get; set; }
|
||||||
|
|
||||||
|
public TabControlDemoViewModel()
|
||||||
|
{
|
||||||
|
Items = new ObservableCollection<string>(Enumerable.Range(1, 200).Select(a => "Tab " + a));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d"
|
||||||
x:Class="Semi.Avalonia.Demo.Views.MainView"
|
x:Class="Semi.Avalonia.Demo.Views.MainView"
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
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:pages="using:Semi.Avalonia.Demo.Pages"
|
xmlns:pages="using:Semi.Avalonia.Demo.Pages"
|
||||||
d:DesignHeight="450"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
d:DesignWidth="800"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
@@ -21,52 +21,52 @@
|
|||||||
Margin="8"
|
Margin="8"
|
||||||
Padding="12,4"
|
Padding="12,4"
|
||||||
Theme="{DynamicResource CardBorder}">
|
Theme="{DynamicResource CardBorder}">
|
||||||
<Grid VerticalAlignment="Center" ColumnDefinitions="*, Auto">
|
<Grid ColumnDefinitions="*, Auto" VerticalAlignment="Center">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
|
||||||
Classes="H6"
|
Classes="H6"
|
||||||
Text="Semi Avalonia"
|
Text="Semi Avalonia"
|
||||||
Theme="{DynamicResource TitleTextBlock}" />
|
Theme="{DynamicResource TitleTextBlock}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalAlignment="Center"
|
Text="/"
|
||||||
Text="/" />
|
VerticalAlignment="Center" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="8,0"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Classes="Secondary"
|
Classes="Secondary"
|
||||||
Text="{Binding #tab.SelectedItem.Header}" />
|
Margin="8,0"
|
||||||
|
Text="{Binding #tab.SelectedItem.Header}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Padding="4"
|
|
||||||
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
||||||
|
Padding="4"
|
||||||
Theme="{DynamicResource ButtonToggleSwitch}">
|
Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
<ToggleSwitch.OnContent>
|
<ToggleSwitch.OnContent>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="16"
|
|
||||||
Height="16"
|
|
||||||
Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
|
Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
|
||||||
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}"
|
||||||
|
Height="16"
|
||||||
|
Width="16" />
|
||||||
</ToggleSwitch.OnContent>
|
</ToggleSwitch.OnContent>
|
||||||
<ToggleSwitch.OffContent>
|
<ToggleSwitch.OffContent>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="16"
|
|
||||||
Height="16"
|
|
||||||
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
|
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
|
||||||
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}"
|
||||||
|
Height="16"
|
||||||
|
Width="16" />
|
||||||
</ToggleSwitch.OffContent>
|
</ToggleSwitch.OffContent>
|
||||||
</ToggleSwitch>
|
</ToggleSwitch>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
<TabControl
|
<TabControl
|
||||||
Name="tab"
|
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="8"
|
|
||||||
Padding="20,0,0,0"
|
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
Margin="8"
|
||||||
|
Name="tab"
|
||||||
|
Padding="20,0,0,0"
|
||||||
TabStripPlacement="Left"
|
TabStripPlacement="Left"
|
||||||
Theme="{DynamicResource NavigationTab}">
|
Theme="{DynamicResource NavigationTab}">
|
||||||
<TabItem Header="Overview">
|
<TabItem Header="Overview">
|
||||||
@@ -126,6 +126,9 @@
|
|||||||
<TabItem Header="HeaderedContentControl">
|
<TabItem Header="HeaderedContentControl">
|
||||||
<pages:HeaderedContentControlDemo />
|
<pages:HeaderedContentControlDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem Header="HyperlinkButton">
|
||||||
|
<pages:HyperlinkButtonDemo />
|
||||||
|
</TabItem>
|
||||||
<TabItem Header="Label">
|
<TabItem Header="Label">
|
||||||
<pages:LabelDemo />
|
<pages:LabelDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@@ -144,6 +147,9 @@
|
|||||||
<TabItem Header="NumericUpDown">
|
<TabItem Header="NumericUpDown">
|
||||||
<pages:NumericUpDownDemo />
|
<pages:NumericUpDownDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem Header="PathIcon">
|
||||||
|
<pages:PathIconDemo />
|
||||||
|
</TabItem>
|
||||||
<TabItem Header="ProgressBar">
|
<TabItem Header="ProgressBar">
|
||||||
<pages:ProgressBarDemo />
|
<pages:ProgressBarDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
@@ -8,14 +8,15 @@
|
|||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="../Directory.Build.props" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0" />
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0" />
|
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.0" />
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
BIN
docs/community-support.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
docs/demo.jpg
Normal file
|
After Width: | Height: | Size: 104 KiB |
7
global.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"rollForward": "latestMajor",
|
||||||
|
"allowPrerelease": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,12 +2,18 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>11</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.1</Version>
|
<Version>11.1.0-beta2</Version>
|
||||||
<Authors>IRIHI Technology</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<PackageIcon>irihi.png</PackageIcon>
|
||||||
|
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||||
|
<AvaloniaVersion>11.1.0-beta2</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -17,10 +17,33 @@
|
|||||||
<converters:ToBrushConverter x:Key="ToBrushConverter" />
|
<converters:ToBrushConverter x:Key="ToBrushConverter" />
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type ColorPicker}" TargetType="ColorPicker">
|
<ControlTheme x:Key="{x:Type ColorPicker}" TargetType="ColorPicker">
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
<Setter Property="CornerRadius" Value="3" />
|
||||||
<Setter Property="Height" Value="32" />
|
<Setter Property="Height" Value="32" />
|
||||||
<Setter Property="Width" Value="64" />
|
<Setter Property="Width" Value="64" />
|
||||||
<Setter Property="MinWidth" Value="64" />
|
<Setter Property="MinWidth" Value="64" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Content">
|
||||||
|
<Template>
|
||||||
|
<Panel>
|
||||||
|
<Border
|
||||||
|
Margin="1,1,0,1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius,
|
||||||
|
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||||
|
<Border
|
||||||
|
Margin="1,1,0,1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="{TemplateBinding HsvColor,
|
||||||
|
Converter={StaticResource ToBrushConverter}}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius,
|
||||||
|
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
||||||
|
</Panel>
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
<Setter Property="Palette">
|
<Setter Property="Palette">
|
||||||
<controls:FluentColorPalette />
|
<controls:FluentColorPalette />
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -33,6 +56,8 @@
|
|||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
UseLayoutRounding="False">
|
UseLayoutRounding="False">
|
||||||
<DropDownButton.Styles>
|
<DropDownButton.Styles>
|
||||||
@@ -40,28 +65,8 @@
|
|||||||
<Setter Property="Padding" Value="0" />
|
<Setter Property="Padding" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</DropDownButton.Styles>
|
</DropDownButton.Styles>
|
||||||
<DropDownButton.Content>
|
|
||||||
<!-- Preview color -->
|
|
||||||
<Panel>
|
|
||||||
<Border
|
|
||||||
Margin="1,1,0,1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius,
|
|
||||||
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
|
||||||
<Border
|
|
||||||
Margin="1,1,0,1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Background="{TemplateBinding HsvColor,
|
|
||||||
Converter={StaticResource ToBrushConverter}}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius,
|
|
||||||
Converter={StaticResource LeftCornerRadiusFilterConverter}}" />
|
|
||||||
</Panel>
|
|
||||||
</DropDownButton.Content>
|
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<Flyout FlyoutPresenterClasses="nopadding" Placement="AnchorAndGravity">
|
<Flyout FlyoutPresenterClasses="nopadding" Placement="{DynamicResource ColorPickerFlyoutPlacement}">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The following is copy-pasted from the ColorView's control template.
|
The following is copy-pasted from the ColorView's control template.
|
||||||
@@ -167,7 +172,7 @@
|
|||||||
Orientation="Vertical">
|
Orientation="Vertical">
|
||||||
<primitives:ColorSlider.IsVisible>
|
<primitives:ColorSlider.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</primitives:ColorSlider.IsVisible>
|
</primitives:ColorSlider.IsVisible>
|
||||||
</primitives:ColorSlider>
|
</primitives:ColorSlider>
|
||||||
@@ -238,30 +243,30 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Grid[Tag=Rgba]">
|
<Style Selector="Grid[Tag=Rgba]">
|
||||||
<Style Selector="^ NumericUpDown#Component1NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component1NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="R" />
|
<Setter Property="Tag" Value="R" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#Component2NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component2NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="G" />
|
<Setter Property="Tag" Value="G" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#Component3NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component3NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="B" />
|
<Setter Property="Tag" Value="B" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#AlphaComponentNumericUpDown">
|
<Style Selector="^ NumericUpDown#AlphaComponentNumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="A" />
|
<Setter Property="Tag" Value="A" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Grid[Tag=Hsva]">
|
<Style Selector="Grid[Tag=Hsva]">
|
||||||
<Style Selector="^ NumericUpDown#Component1NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component1NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="H" />
|
<Setter Property="Tag" Value="H" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#Component2NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component2NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="S" />
|
<Setter Property="Tag" Value="S" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#Component3NumericUpDown">
|
<Style Selector="^ NumericUpDown#Component3NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="V" />
|
<Setter Property="Tag" Value="V" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ NumericUpDown#AlphaComponentNumericUpDown">
|
<Style Selector="^ NumericUpDown#AlphaComponentNumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="A" />
|
<Setter Property="Tag" Value="A" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Styles>
|
</Grid.Styles>
|
||||||
@@ -425,8 +430,8 @@
|
|||||||
Value="{Binding Value, ElementName=AlphaComponentSlider}">
|
Value="{Binding Value, ElementName=AlphaComponentSlider}">
|
||||||
<NumericUpDown.IsVisible>
|
<NumericUpDown.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</NumericUpDown.IsVisible>
|
</NumericUpDown.IsVisible>
|
||||||
</NumericUpDown>
|
</NumericUpDown>
|
||||||
@@ -447,8 +452,8 @@
|
|||||||
TickFrequency="1">
|
TickFrequency="1">
|
||||||
<primitives:ColorSlider.IsVisible>
|
<primitives:ColorSlider.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</primitives:ColorSlider.IsVisible>
|
</primitives:ColorSlider.IsVisible>
|
||||||
</primitives:ColorSlider>
|
</primitives:ColorSlider>
|
||||||
@@ -471,4 +476,42 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="HexColorPicker"
|
||||||
|
BasedOn="{StaticResource {x:Type ColorPicker}}"
|
||||||
|
TargetType="ColorPicker">
|
||||||
|
<Setter Property="Width" Value="200" />
|
||||||
|
<Setter Property="Content">
|
||||||
|
<Template>
|
||||||
|
<Grid ColumnDefinitions="Auto, *">
|
||||||
|
<Border
|
||||||
|
Grid.Column="0"
|
||||||
|
Width="{Binding $self.Bounds.Height}"
|
||||||
|
Margin="1,1,0,1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
<Border
|
||||||
|
Grid.Column="0"
|
||||||
|
Width="{Binding $self.Bounds.Height}"
|
||||||
|
Margin="1,1,0,1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="{TemplateBinding HsvColor,
|
||||||
|
Converter={StaticResource ToBrushConverter}}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="8,0,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontWeight="Regular"
|
||||||
|
Foreground="{DynamicResource TextBlockDefaultForeground}"
|
||||||
|
Text="{Binding $parent[ColorPicker].Color}" />
|
||||||
|
</Grid>
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||||
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
||||||
|
IsDeferredScrollingEnabled="{TemplateBinding (ScrollViewer.IsDeferredScrollingEnabled)}"
|
||||||
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
Name="PART_ItemsPresenter"
|
Name="PART_ItemsPresenter"
|
||||||
@@ -137,21 +138,21 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:checked">
|
<Style Selector="^:checked">
|
||||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonCheckedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonCheckedBackground}" />
|
||||||
<Setter Property="RadioButton.Foreground" Value="{DynamicResource ColorViewRadioButtonCheckedForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ColorViewRadioButtonCheckedForeground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonCheckedPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonCheckedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonCheckedPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonCheckedPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:unchecked">
|
<Style Selector="^:unchecked">
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="RadioButton.Background" Value="{DynamicResource ColorViewRadioButtonPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ColorViewRadioButtonPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
@@ -259,7 +260,7 @@
|
|||||||
Orientation="Vertical">
|
Orientation="Vertical">
|
||||||
<primitives:ColorSlider.IsVisible>
|
<primitives:ColorSlider.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</primitives:ColorSlider.IsVisible>
|
</primitives:ColorSlider.IsVisible>
|
||||||
</primitives:ColorSlider>
|
</primitives:ColorSlider>
|
||||||
@@ -489,8 +490,8 @@
|
|||||||
Value="{Binding Value, ElementName=AlphaComponentSlider}">
|
Value="{Binding Value, ElementName=AlphaComponentSlider}">
|
||||||
<NumericUpDown.IsVisible>
|
<NumericUpDown.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</NumericUpDown.IsVisible>
|
</NumericUpDown.IsVisible>
|
||||||
</NumericUpDown>
|
</NumericUpDown>
|
||||||
@@ -511,8 +512,8 @@
|
|||||||
TickFrequency="1">
|
TickFrequency="1">
|
||||||
<primitives:ColorSlider.IsVisible>
|
<primitives:ColorSlider.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</primitives:ColorSlider.IsVisible>
|
</primitives:ColorSlider.IsVisible>
|
||||||
</primitives:ColorSlider>
|
</primitives:ColorSlider>
|
||||||
@@ -532,30 +533,30 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^[ColorModel=Rgba]">
|
<Style Selector="^[ColorModel=Rgba]">
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component1NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component1NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="R" />
|
<Setter Property="Tag" Value="R" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component2NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component2NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="G" />
|
<Setter Property="Tag" Value="G" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component3NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component3NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="B" />
|
<Setter Property="Tag" Value="B" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#AlphaComponentNumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#AlphaComponentNumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="A" />
|
<Setter Property="Tag" Value="A" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^[ColorModel=Hsva]">
|
<Style Selector="^[ColorModel=Hsva]">
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component1NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component1NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="H" />
|
<Setter Property="Tag" Value="H" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component2NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component2NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="S" />
|
<Setter Property="Tag" Value="S" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#Component3NumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#Component3NumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="V" />
|
<Setter Property="Tag" Value="V" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ NumericUpDown#AlphaComponentNumericUpDown">
|
<Style Selector="^ /template/ NumericUpDown#AlphaComponentNumericUpDown">
|
||||||
<Setter Property="NumericUpDown.Tag" Value="A" />
|
<Setter Property="Tag" Value="A" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||||
<PackageReleaseNotes>Update to 11.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
<Thickness x:Key="ColorViewRadioButtonPadding">16 4</Thickness>
|
<Thickness x:Key="ColorViewRadioButtonPadding">16 4</Thickness>
|
||||||
<x:Double x:Key="ColorViewNumericUpDownWidth">70</x:Double>
|
<x:Double x:Key="ColorViewNumericUpDownWidth">70</x:Double>
|
||||||
|
|
||||||
<PathGeometry x:Key="ColorViewSpectrumIconGlyph">
|
<StreamGeometry x:Key="ColorViewSpectrumIconGlyph">
|
||||||
M6.92,19L5,17.08L13.06,9L15,10.94M20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L13.84,6.41L11.91,4.5L10.5,5.91L11.92,7.33L3,16.25V21H7.75L16.67,12.08L18.09,13.5L19.5,12.09L17.58,10.17L20.7,7.05C21.1,6.65 21.1,6 20.71,5.63Z
|
M6.92,19L5,17.08L13.06,9L15,10.94M20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L13.84,6.41L11.91,4.5L10.5,5.91L11.92,7.33L3,16.25V21H7.75L16.67,12.08L18.09,13.5L19.5,12.09L17.58,10.17L20.7,7.05C21.1,6.65 21.1,6 20.71,5.63Z
|
||||||
</PathGeometry>
|
</StreamGeometry>
|
||||||
<PathGeometry x:Key="ColorViewPaletteIconGlyph">
|
<StreamGeometry x:Key="ColorViewPaletteIconGlyph">
|
||||||
M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z
|
M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z
|
||||||
</PathGeometry>
|
</StreamGeometry>
|
||||||
<PathGeometry x:Key="ColorViewComponentsIconGlyph">
|
<StreamGeometry x:Key="ColorViewComponentsIconGlyph">
|
||||||
M4 6.5C5.10457 6.5 6 5.60457 6 4.5C6 3.39543 5.10457 2.5 4 2.5C2.89543 2.5 2 3.39543 2 4.5C2 5.60457 2.89543 6.5 4 6.5ZM9.5 3C8.67157 3 8 3.67157 8 4.5C8 5.32843 8.67157 6 9.5 6H20.5C21.3284 6 22 5.32843 22 4.5C22 3.67157 21.3284 3 20.5 3H9.5ZM8 11.5C8 10.6716 8.67157 10 9.5 10H20.5C21.3284 10 22 10.6716 22 11.5C22 12.3284 21.3284 13 20.5 13H9.5C8.67157 13 8 12.3284 8 11.5ZM8 18.5C8 17.6716 8.67157 17 9.5 17H20.5C21.3284 17 22 17.6716 22 18.5C22 19.3284 21.3284 20 20.5 20H9.5C8.67157 20 8 19.3284 8 18.5ZM6 11.5C6 12.6046 5.10457 13.5 4 13.5C2.89543 13.5 2 12.6046 2 11.5C2 10.3954 2.89543 9.5 4 9.5C5.10457 9.5 6 10.3954 6 11.5ZM4 20.5C5.10457 20.5 6 19.6046 6 18.5C6 17.3954 5.10457 16.5 4 16.5C2.89543 16.5 2 17.3954 2 18.5C2 19.6046 2.89543 20.5 4 20.5Z
|
M4 6.5C5.10457 6.5 6 5.60457 6 4.5C6 3.39543 5.10457 2.5 4 2.5C2.89543 2.5 2 3.39543 2 4.5C2 5.60457 2.89543 6.5 4 6.5ZM9.5 3C8.67157 3 8 3.67157 8 4.5C8 5.32843 8.67157 6 9.5 6H20.5C21.3284 6 22 5.32843 22 4.5C22 3.67157 21.3284 3 20.5 3H9.5ZM8 11.5C8 10.6716 8.67157 10 9.5 10H20.5C21.3284 10 22 10.6716 22 11.5C22 12.3284 21.3284 13 20.5 13H9.5C8.67157 13 8 12.3284 8 11.5ZM8 18.5C8 17.6716 8.67157 17 9.5 17H20.5C21.3284 17 22 17.6716 22 18.5C22 19.3284 21.3284 20 20.5 20H9.5C8.67157 20 8 19.3284 8 18.5ZM6 11.5C6 12.6046 5.10457 13.5 4 13.5C2.89543 13.5 2 12.6046 2 11.5C2 10.3954 2.89543 9.5 4 9.5C5.10457 9.5 6 10.3954 6 11.5ZM4 20.5C5.10457 20.5 6 19.6046 6 18.5C6 17.3954 5.10457 16.5 4 16.5C2.89543 16.5 2 17.3954 2 18.5C2 19.6046 2.89543 20.5 4 20.5Z
|
||||||
</PathGeometry>
|
</StreamGeometry>
|
||||||
|
|
||||||
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
||||||
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
|
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
|
||||||
@@ -27,4 +27,6 @@
|
|||||||
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
||||||
|
|
||||||
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
|
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
|
||||||
|
|
||||||
|
<PlacementMode x:Key="ColorPickerFlyoutPlacement">AnchorAndGravity</PlacementMode>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
BIN
src/Semi.Avalonia.ColorPicker/irihi.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="DataGridColumnHeaderForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
|
<SolidColorBrush x:Key="DataGridColumnHeaderBackground" Color="Transparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="DataGridColumnHeaderPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackground" Opacity="0.20" Color="White" />
|
||||||
|
|
||||||
@@ -26,5 +25,5 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="White" />
|
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="White" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#E6E8EA" Opacity="0.04" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<Setter Property="MinHeight" Value="20" />
|
<Setter Property="MinHeight" Value="20" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:error:focus /template/ Border#PART_ContentPresenterBorder">
|
<Style Selector="^:error:focus /template/ Border#PART_ContentPresenterBorder">
|
||||||
<Setter Property="Border.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ DataValidationErrors">
|
<Style Selector="^ /template/ DataValidationErrors">
|
||||||
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
|
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:checked /template/ PathIcon">
|
<Style Selector="^:checked /template/ PathIcon">
|
||||||
<Setter Property="PathIcon.RenderTransform" Value="rotate(90deg)" />
|
<Setter Property="RenderTransform" Value="rotate(90deg)" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -511,9 +511,13 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3"
|
||||||
|
ScrollViewer.IsScrollInertiaEnabled="{TemplateBinding IsScrollInertiaEnabled}">
|
||||||
<DataGridRowsPresenter.GestureRecognizers>
|
<DataGridRowsPresenter.GestureRecognizers>
|
||||||
<ScrollGestureRecognizer CanHorizontallyScroll="True" CanVerticallyScroll="True" />
|
<ScrollGestureRecognizer
|
||||||
|
CanHorizontallyScroll="True"
|
||||||
|
CanVerticallyScroll="True"
|
||||||
|
IsScrollInertiaEnabled="{Binding (ScrollViewer.IsScrollInertiaEnabled), ElementName=PART_RowsPresenter}" />
|
||||||
</DataGridRowsPresenter.GestureRecognizers>
|
</DataGridRowsPresenter.GestureRecognizers>
|
||||||
</DataGridRowsPresenter>
|
</DataGridRowsPresenter>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
|||||||
@@ -18,13 +18,12 @@
|
|||||||
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
|
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Color="#EAF5FF" />
|
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Opacity="0.2" Color="#EAF5FF" />
|
||||||
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Color="#CBE7FE" />
|
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Opacity="0.3" Color="#CBE7FE" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
|
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
<SolidColorBrush x:Key="DataGridRowGroupHeaderCurrentBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="DataGridDisabledBackground" Color="#2E3238" Opacity="0.02" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.DataGrid</Title>
|
<Title>Semi.Avalonia.DataGrid</Title>
|
||||||
<PackageReleaseNotes>Update to 11.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<Thickness x:Key="DataGridColumnHeaderPadding">12 0 0 0</Thickness>
|
<Thickness x:Key="DataGridColumnHeaderPadding">12 0 0 0</Thickness>
|
||||||
<x:Double x:Key="DataGridColumnHeaderMinHeight">32</x:Double>
|
<x:Double x:Key="DataGridColumnHeaderMinHeight">32</x:Double>
|
||||||
|
|
||||||
<PathGeometry x:Key="DataGridColumnHeaderAscendingGlyph">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</PathGeometry>
|
<StreamGeometry x:Key="DataGridColumnHeaderAscendingGlyph">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</StreamGeometry>
|
||||||
<PathGeometry x:Key="DataGridColumnHeaderDescendingGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</PathGeometry>
|
<StreamGeometry x:Key="DataGridColumnHeaderDescendingGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</StreamGeometry>
|
||||||
|
|
||||||
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
|
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
|
||||||
|
|
||||||
<PathGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
<StreamGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</StreamGeometry>
|
||||||
|
|
||||||
<x:Double x:Key="DataGridRowGroupHeaderVisualStrokeThickness">1</x:Double>
|
<x:Double x:Key="DataGridRowGroupHeaderVisualStrokeThickness">1</x:Double>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
BIN
src/Semi.Avalonia.DataGrid/irihi.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -3,17 +3,20 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>11</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.1</Version>
|
<Version>11.0.1</Version>
|
||||||
<Authors>IRIHI Technology</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>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<PackageIcon>irihi.png</PackageIcon>
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||||
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
||||||
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:checked /template/ PathIcon#ChevronPath">
|
<Style Selector="^:checked /template/ PathIcon#ChevronPath">
|
||||||
<Setter Property="PathIcon.RenderTransform" Value="rotate(90deg)" />
|
<Setter Property="RenderTransform" Value="rotate(90deg)" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|||||||
BIN
src/Semi.Avalonia.TreeDataGrid/irihi.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
4
src/Semi.Avalonia/AssemblyInfo.cs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
using Avalonia.Metadata;
|
||||||
|
|
||||||
|
[assembly:XmlnsPrefix("https://irihi.tech/semi", "semi")]
|
||||||
|
[assembly:XmlnsDefinition("https://irihi.tech/semi", "Semi.Avalonia")]
|
||||||
16
src/Semi.Avalonia/Controls/AdornerLayer.axaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:ClassModifier="internal">
|
||||||
|
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
|
||||||
|
<Setter Property="DefaultFocusAdorner">
|
||||||
|
<FocusAdornerTemplate>
|
||||||
|
<Rectangle
|
||||||
|
Margin="{DynamicResource AdornerLayerMargin}"
|
||||||
|
Stroke="{DynamicResource AdornerLayerBackground}"
|
||||||
|
StrokeDashArray="1,2"
|
||||||
|
StrokeThickness="{DynamicResource AdornerLayerThickness}" />
|
||||||
|
</FocusAdornerTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
||||||
|
<Setter Property="AutoCompleteBox.VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="AutoCompleteBox.MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
|
||||||
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="AutoCompleteBox">
|
<ControlTemplate TargetType="AutoCompleteBox">
|
||||||
@@ -16,9 +18,12 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Stretch"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Theme="{DynamicResource NonErrorTextBox}"
|
Theme="{DynamicResource NonErrorTextBox}"
|
||||||
|
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||||
|
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
@@ -53,7 +58,8 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Stretch"
|
||||||
|
MinHeight="0"
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
@@ -83,15 +89,11 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Large /template/ TextBox">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small /template/ TextBox">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ThicknessCardBorderThickness}" />
|
<Setter Property="Border.BorderThickness" Value="{DynamicResource ThicknessCardBorderThickness}" />
|
||||||
<Setter Property="Border.Margin" Value="{DynamicResource ThicknessCardMargin}" />
|
<Setter Property="Border.Margin" Value="{DynamicResource ThicknessCardMargin}" />
|
||||||
<Style Selector="^.Shadow">
|
<Style Selector="^.Shadow">
|
||||||
<Setter Property="Border.BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
<Setter Property="BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Hover:pointerover">
|
<Style Selector="^.Hover:pointerover">
|
||||||
<Setter Property="Border.BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
<Setter Property="BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -8,28 +8,32 @@
|
|||||||
|
|
||||||
<!-- Button Light -->
|
<!-- Button Light -->
|
||||||
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||||
<Setter Property="Button.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||||
<Setter Property="Button.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||||
<Setter Property="Button.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||||
<Setter Property="Button.RenderTransform" Value="none" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="Button.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="Button.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="Button.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||||
<Setter Property="Button.VerticalContentAlignment" Value="Center" />
|
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||||
<Setter Property="Button.MinHeight" Value="12" />
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
<Setter Property="Button.Cursor" Value="Hand" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="Button.Template">
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
x:Name="PART_ContentPresenter"
|
x:Name="PART_ContentPresenter"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Background="{TemplateBinding Background}"
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
@@ -45,46 +49,53 @@
|
|||||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="Button.Padding" Value="{DynamicResource ButtonLargePadding}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonLargeHeight}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="Button.Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -92,102 +103,116 @@
|
|||||||
x:Key="SolidButton"
|
x:Key="SolidButton"
|
||||||
BasedOn="{StaticResource {x:Type Button}}"
|
BasedOn="{StaticResource {x:Type Button}}"
|
||||||
TargetType="Button">
|
TargetType="Button">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
|
||||||
|
|
||||||
<Style Selector="^:pointerover">
|
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed">
|
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
<Style Selector="^:pointerover">
|
</Style>
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -195,13 +220,38 @@
|
|||||||
x:Key="BorderlessButton"
|
x:Key="BorderlessButton"
|
||||||
BasedOn="{StaticResource {x:Type Button}}"
|
BasedOn="{StaticResource {x:Type Button}}"
|
||||||
TargetType="Button">
|
TargetType="Button">
|
||||||
<Setter Property="Button.Background" Value="Transparent" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.BorderBrush" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Style Selector="^:disabled">
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="Button.BorderBrush" Value="Transparent" />
|
</Style>
|
||||||
<Setter Property="Button.Background" Value="Transparent" />
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="InnerIconButton" TargetType="Button">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<ContentControl Background="Transparent">
|
||||||
|
<PathIcon
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
Data="{TemplateBinding Content}"
|
||||||
|
Foreground="{TemplateBinding Foreground}" />
|
||||||
|
</ContentControl>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerPointeroverForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerPressedForeground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonSpinnerRepeatButtonDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSpinnerRepeatButtonDisabledBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSpinnerRepeatButtonDisabledForeground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -98,7 +97,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^[ButtonSpinnerLocation=Left] /template/ Border#ButtonGroup">
|
<Style Selector="^[ButtonSpinnerLocation=Left] /template/ Border#ButtonGroup">
|
||||||
<Setter Property="Grid.Column" Value="0" />
|
<Setter Property="Grid.Column" Value="0" />
|
||||||
<Setter Property="Border.Margin" Value="0 0 4 0" />
|
<Setter Property="Margin" Value="0 0 4 0" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -170,18 +170,18 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ ContentControl">
|
<Style Selector="^:pointerover /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed /template/ ContentControl">
|
<Style Selector="^:pressed /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Style Selector="^ /template/ ContentControl">
|
<Style Selector="^ /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonSelectedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonSelectedBackground}" />
|
||||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarButtonSelectedForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonSelectedForeground}" />
|
||||||
<Setter Property="ContentControl.FontWeight" Value="{DynamicResource CalendarItemCalendarButtonSelectedFontWeight}" />
|
<Setter Property="FontWeight" Value="{DynamicResource CalendarItemCalendarButtonSelectedFontWeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -232,25 +232,25 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ ContentControl">
|
<Style Selector="^:pointerover /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarDayButtonPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed /template/ ContentControl">
|
<Style Selector="^:pressed /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarDayButtonPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:today /template/ ContentControl">
|
<Style Selector="^:today /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonTodayBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarDayButtonTodayBackground}" />
|
||||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonTodayForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonTodayForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:selected /template/ ContentControl">
|
<Style Selector="^:selected /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedBackground}" />
|
||||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonSelectedForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:inactive /template/ ContentControl">
|
<Style Selector="^:inactive /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonInactiveForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarDayButtonInactiveForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:blackout /template/ ContentControl">
|
<Style Selector="^:blackout /template/ ContentControl">
|
||||||
|
|||||||
@@ -3,38 +3,20 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="CalendarDatePickerButton" TargetType="Button">
|
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource CalendarDatePickerIconForeground}" />
|
|
||||||
<Setter Property="Button.Template">
|
|
||||||
<ControlTemplate TargetType="Button">
|
|
||||||
<Grid Margin="{TemplateBinding Padding}" Background="Transparent">
|
|
||||||
<PathIcon
|
|
||||||
Width="16"
|
|
||||||
Height="16"
|
|
||||||
Data="{DynamicResource CalendarDatePickerIconGlyph}"
|
|
||||||
Foreground="{TemplateBinding Foreground}" />
|
|
||||||
</Grid>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
<Style Selector="^:pointerover /template/ PathIcon">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerIconPointeroverForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed /template/ PathIcon">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerIconPointeroverForeground}" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
|
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
|
||||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||||
<Setter Property="CalendarDatePicker.IsTodayHighlighted" Value="True" />
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge"/>
|
||||||
|
<Setter Property="IsTodayHighlighted" Value="True" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="Padding" Value="8 0" />
|
<Setter Property="Padding" Value="8 0" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerDefaultHeight}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="CalendarDatePicker">
|
<ControlTemplate TargetType="CalendarDatePicker">
|
||||||
<DataValidationErrors>
|
<DataValidationErrors>
|
||||||
@@ -44,85 +26,96 @@
|
|||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<Border
|
<Border
|
||||||
x:Name="Background"
|
x:Name="Background"
|
||||||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}"/>
|
||||||
<Grid
|
<Grid
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ColumnDefinitions="*, Auto, Auto">
|
||||||
|
<TextBox
|
||||||
|
Name="PART_TextBox"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Stretch"
|
||||||
ColumnDefinitions="*,Auto">
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
<TextBox
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Name="PART_TextBox"
|
Background="Transparent"
|
||||||
Grid.Column="0"
|
BorderBrush="Transparent"
|
||||||
MinHeight="{DynamicResource CalendarDatePickerDefaultHeight}"
|
BorderThickness="0"
|
||||||
HorizontalAlignment="Stretch"
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
VerticalAlignment="Center"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
Theme="{DynamicResource NonErrorTextBox}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||||
|
Watermark="{TemplateBinding Watermark}">
|
||||||
|
<TextBox.Styles>
|
||||||
|
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||||
|
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder">
|
||||||
|
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBox#PART_TextBox:disabled">
|
||||||
|
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
|
||||||
|
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</TextBox.Styles>
|
||||||
|
</TextBox>
|
||||||
|
<Button
|
||||||
|
Name="ClearButton"
|
||||||
|
Grid.Column="1"
|
||||||
|
Padding="0,0,8,0"
|
||||||
|
Content="{DynamicResource IconButtonClearData}"
|
||||||
|
Command="{Binding $parent[CalendarDatePicker].Clear}"
|
||||||
|
Focusable="False"
|
||||||
|
IsVisible="False"
|
||||||
|
Theme="{DynamicResource InnerIconButton}" />
|
||||||
|
<Button
|
||||||
|
Name="PART_Button"
|
||||||
|
Grid.Column="2"
|
||||||
|
Padding="0,0,8,0"
|
||||||
|
Content="{DynamicResource CalendarDatePickerIconGlyph}"
|
||||||
|
Focusable="False"
|
||||||
|
Theme="{DynamicResource InnerIconButton}" />
|
||||||
|
<Popup
|
||||||
|
Name="PART_Popup"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalOffset="-8"
|
||||||
|
IsLightDismissEnabled="True"
|
||||||
|
PlacementTarget="{TemplateBinding}"
|
||||||
|
VerticalOffset="-4">
|
||||||
|
<Border
|
||||||
|
Margin="8"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
|
||||||
BorderThickness="0"
|
CornerRadius="{DynamicResource CalendarCornerRadius}">
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
<Calendar
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Name="PART_Calendar"
|
||||||
Theme="{DynamicResource NonErrorTextBox}"
|
BorderThickness="0"
|
||||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
CornerRadius="{Binding $parent[Border].CornerRadius}"
|
||||||
Watermark="{TemplateBinding Watermark}">
|
DisplayDate="{TemplateBinding DisplayDate}"
|
||||||
<TextBox.Styles>
|
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
||||||
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
||||||
<Setter Property="Background" Value="Transparent" />
|
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, Mode=TwoWay}">
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
</Calendar>
|
||||||
</Style>
|
</Border>
|
||||||
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder">
|
</Popup>
|
||||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
</Grid>
|
||||||
<Setter Property="Background" Value="Transparent" />
|
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="TextBox#PART_TextBox:disabled">
|
|
||||||
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
|
|
||||||
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
|
||||||
<Setter Property="Background" Value="Transparent" />
|
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
</TextBox.Styles>
|
|
||||||
</TextBox>
|
|
||||||
<Button
|
|
||||||
Name="PART_Button"
|
|
||||||
Grid.Column="1"
|
|
||||||
Padding="0,0,8,0"
|
|
||||||
Cursor="Hand"
|
|
||||||
Focusable="False"
|
|
||||||
Theme="{DynamicResource CalendarDatePickerButton}" />
|
|
||||||
<Popup
|
|
||||||
Name="PART_Popup"
|
|
||||||
HorizontalOffset="-8"
|
|
||||||
IsLightDismissEnabled="True"
|
|
||||||
PlacementTarget="{TemplateBinding}"
|
|
||||||
VerticalOffset="-4">
|
|
||||||
<Border
|
|
||||||
Margin="8"
|
|
||||||
Background="Transparent"
|
|
||||||
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
|
|
||||||
CornerRadius="{DynamicResource CalendarCornerRadius}">
|
|
||||||
<Calendar
|
|
||||||
Name="PART_Calendar"
|
|
||||||
BorderThickness="0"
|
|
||||||
CornerRadius="{Binding $parent[Border].CornerRadius}"
|
|
||||||
DisplayDate="{TemplateBinding DisplayDate}"
|
|
||||||
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
|
||||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
|
||||||
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
|
||||||
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
|
||||||
SelectedDate="{TemplateBinding SelectedDate,
|
|
||||||
Mode=TwoWay}" />
|
|
||||||
</Border>
|
|
||||||
</Popup>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</Panel>
|
</Panel>
|
||||||
</DataValidationErrors>
|
</DataValidationErrors>
|
||||||
@@ -130,15 +123,17 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
<Style Selector="^:pointerover /template/ Button#ClearButton">
|
||||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerLargeHeight}" />
|
<Setter Property="IsVisible" Value="{Binding $parent[CalendarDatePicker].SelectedDate, Converter={x:Static ObjectConverters.IsNotNull}}"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Large">
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerLargeHeight}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Small">
|
<Style Selector="^.Small">
|
||||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerSmallHeight}" />
|
||||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerSmallHeight}" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
@@ -188,21 +183,21 @@
|
|||||||
|
|
||||||
<Style Selector="^.Bordered">
|
<Style Selector="^.Bordered">
|
||||||
<Style Selector="^ Border#Background">
|
<Style Selector="^ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBorderedDefaultBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedDefaultBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#Background">
|
<Style Selector="^:pointerover /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:focus-within /template/ Border#Background">
|
<Style Selector="^:focus-within /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ Border#Background">
|
<Style Selector="^ /template/ Border#Background">
|
||||||
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerDisabledBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Button#PART_Button">
|
<Style Selector="^ /template/ Button#PART_Button">
|
||||||
@@ -215,16 +210,16 @@
|
|||||||
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ Border#Background">
|
<Style Selector="^:pointerover /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Border#Background">
|
<Style Selector="^:pressed /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:focus-within /template/ Border#Background">
|
<Style Selector="^:focus-within /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
<Border Padding="4" Background="Transparent">
|
<Border Padding="4" Background="Transparent">
|
||||||
<Ellipse
|
<Ellipse
|
||||||
Name="Container"
|
Name="Container"
|
||||||
Width="{DynamicResource CarouselIndicatorSelectedHeight}"
|
Width="{DynamicResource CarouselIndicatorWidth}"
|
||||||
Height="{DynamicResource CarouselIndicatorSelectedHeight}"
|
Height="{DynamicResource CarouselIndicatorHeight}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Fill="{TemplateBinding Foreground}" />
|
Fill="{TemplateBinding Foreground}" />
|
||||||
@@ -61,18 +61,12 @@
|
|||||||
<Setter Property="ListBoxItem.Template">
|
<Setter Property="ListBoxItem.Template">
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
<Panel Background="Transparent">
|
<Panel Background="Transparent">
|
||||||
<Border Padding="4,0" Background="Transparent">
|
<Border Padding="2,0" Background="Transparent">
|
||||||
<Border
|
<Border
|
||||||
Name="Container"
|
Name="Container"
|
||||||
Width="{DynamicResource CarouselIndicatorSelectedHeight}"
|
Width="{DynamicResource CarouselIndicatorLineWidth}"
|
||||||
Height="{DynamicResource CarouselIndicatorSelectedHeight}"
|
Height="{DynamicResource CarouselIndicatorLineHeight}"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}">
|
||||||
CornerRadius="99">
|
|
||||||
<Border.Transitions>
|
|
||||||
<Transitions>
|
|
||||||
<DoubleTransition Property="Width" Duration="0:0:0.2" />
|
|
||||||
</Transitions>
|
|
||||||
</Border.Transitions>
|
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
</Panel>
|
</Panel>
|
||||||
@@ -86,7 +80,44 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:selected /template/ Border#Container">
|
<Style Selector="^:selected /template/ Border#Container">
|
||||||
<Setter Property="Background" Value="{DynamicResource CarouselIndicatorSelectedForeground}" />
|
<Setter Property="Background" Value="{DynamicResource CarouselIndicatorSelectedForeground}" />
|
||||||
<Setter Property="Width" Value="{DynamicResource CarouselIndicatorLineSelectedWidth}" />
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem" TargetType="ListBoxItem">
|
||||||
|
<Setter Property="ListBoxItem.Cursor" Value="Hand" />
|
||||||
|
<Setter Property="ListBoxItem.Background" Value="{DynamicResource CarouselIndicatorForeground}" />
|
||||||
|
<Setter Property="ListBoxItem.Template">
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Panel Background="Transparent">
|
||||||
|
<Border Padding="2,0" Background="Transparent">
|
||||||
|
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
||||||
|
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
|
||||||
|
<Rectangle
|
||||||
|
Name="Container"
|
||||||
|
Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
||||||
|
Height="{DynamicResource CarouselIndicatorColumnarHeight}"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Fill="{TemplateBinding Background}">
|
||||||
|
<Rectangle.Transitions>
|
||||||
|
<Transitions>
|
||||||
|
<DoubleTransition Property="Height" Duration="0:0:0.2"></DoubleTransition>
|
||||||
|
</Transitions>
|
||||||
|
</Rectangle.Transitions>
|
||||||
|
</Rectangle>
|
||||||
|
</Border>
|
||||||
|
</Border>
|
||||||
|
</Panel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover /template/ Rectangle#Container">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource CarouselIndicatorPointeroverForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Rectangle#Container">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource CarouselIndicatorPressedForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:selected /template/ Rectangle#Container">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource CarouselIndicatorSelectedForeground}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -136,7 +167,7 @@
|
|||||||
Name="PART_ItemsPresenter2"
|
Name="PART_ItemsPresenter2"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MaxHeight="20"
|
MaxHeight="30"
|
||||||
Margin="0,8"
|
Margin="0,8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -178,7 +209,19 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^.Line /template/ ListBox#PART_ItemsPresenter2">
|
<Style Selector="^.Line /template/ ListBox#PART_ItemsPresenter2">
|
||||||
<Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CarouselIndicatorLineListBoxItem}" />
|
<Setter Property="ItemContainerTheme" Value="{DynamicResource CarouselIndicatorLineListBoxItem}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Columnar /template/ ListBox#PART_ItemsPresenter2">
|
||||||
|
<Setter Property="ItemContainerTheme" Value="{DynamicResource CarouselIndicatorColumnarListBoxItem}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Left /template/ ListBox#PART_ItemsPresenter2">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Center /template/ ListBox#PART_ItemsPresenter2">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Right /template/ ListBox#PART_ItemsPresenter2">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -32,7 +32,9 @@
|
|||||||
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
||||||
<Setter Property="MaxDropDownHeight" Value="504" />
|
<Setter Property="MaxDropDownHeight" Value="504" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
|
||||||
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
|
||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||||
@@ -40,26 +42,28 @@
|
|||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Top" />
|
<Setter Property="VerticalAlignment" Value="Top" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="ComboBox">
|
<ControlTemplate TargetType="ComboBox">
|
||||||
<DataValidationErrors>
|
<DataValidationErrors>
|
||||||
<Grid ColumnDefinitions="*,32">
|
<Grid ColumnDefinitions="*, Auto, 32">
|
||||||
<Border
|
<Border
|
||||||
x:Name="Background"
|
x:Name="Background"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="3"
|
||||||
MinWidth="{DynamicResource ComboBoxThemeMinWidth}"
|
|
||||||
MinHeight="{DynamicResource ComboBoxDefaultHeight}"
|
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="PlaceholderTextBlock"
|
x:Name="PlaceholderTextBlock"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{TemplateBinding Padding}"
|
Margin="{TemplateBinding Padding}"
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsVisible="{TemplateBinding SelectionBoxItem,
|
IsVisible="{TemplateBinding SelectionBoxItem,
|
||||||
Converter={x:Static ObjectConverters.IsNull}}"
|
Converter={x:Static ObjectConverters.IsNull}}"
|
||||||
@@ -73,10 +77,16 @@
|
|||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Content="{TemplateBinding SelectionBoxItem}"
|
Content="{TemplateBinding SelectionBoxItem}"
|
||||||
ContentTemplate="{TemplateBinding ItemTemplate}" />
|
ContentTemplate="{TemplateBinding ItemTemplate}" />
|
||||||
|
<Button
|
||||||
|
Name="ClearButton"
|
||||||
|
Grid.Column="1"
|
||||||
|
Command="{Binding $parent[ComboBox].Clear}"
|
||||||
|
Content="{DynamicResource IconButtonClearData}"
|
||||||
|
IsVisible="False"
|
||||||
|
Theme="{DynamicResource InnerIconButton}" />
|
||||||
<Border
|
<Border
|
||||||
x:Name="DropDownOverlay"
|
x:Name="DropDownOverlay"
|
||||||
Grid.Column="1"
|
Grid.Column="2"
|
||||||
Width="30"
|
Width="30"
|
||||||
Margin="0,1,1,1"
|
Margin="0,1,1,1"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
@@ -85,7 +95,7 @@
|
|||||||
|
|
||||||
<PathIcon
|
<PathIcon
|
||||||
x:Name="DropDownGlyph"
|
x:Name="DropDownGlyph"
|
||||||
Grid.Column="1"
|
Grid.Column="2"
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Margin="0,0,10,0"
|
Margin="0,0,10,0"
|
||||||
@@ -118,7 +128,10 @@
|
|||||||
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
|
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
CornerRadius="6">
|
CornerRadius="6">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
<ScrollViewer
|
||||||
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
|
IsDeferredScrollingEnabled="{TemplateBinding (ScrollViewer.IsDeferredScrollingEnabled)}"
|
||||||
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
Name="PART_ItemsPresenter"
|
Name="PART_ItemsPresenter"
|
||||||
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
|
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
|
||||||
@@ -131,20 +144,35 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^.Large /template/ Border#Background">
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" />
|
<Style Selector="^:pointerover /template/ Button#ClearButton">
|
||||||
|
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small /template/ Border#Background">
|
|
||||||
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" />
|
<Style Selector="^.Large">
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small">
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pointerover State -->
|
<!-- Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorPointeroverBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorPointeroverBorderBrush}" />
|
||||||
|
<Style Selector="^ /template/ PathIcon#DropDownGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointeroverForeground}" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointeroverForeground}" />
|
<!-- Focus State -->
|
||||||
|
<Style Selector="^:focus">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorFocusBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorFocusBorderBrush}" />
|
||||||
|
<Style Selector="^ /template/ PathIcon#DropDownGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconFocusForeground}" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pressed State -->
|
<!-- Pressed State -->
|
||||||
@@ -205,10 +233,14 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedPressedBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:focus /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedFocusBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedFocusBorderBrush}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ Border#Background">
|
<Style Selector="^ /template/ Border#Background">
|
||||||
<Setter Property="Border.Background" Value="{DynamicResource ComboBoxSelectorDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorDisabledBackground}" />
|
||||||
<Setter Property="Border.BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ContentControl#ContentPresenter">
|
<Style Selector="^ /template/ ContentControl#ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" />
|
||||||
@@ -267,6 +299,10 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:focus /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemFocusBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -286,5 +322,6 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<ResourceDictionary
|
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
x:CompileBindings="True">
|
|
||||||
<ControlTheme x:Key="{x:Type ContentControl}" TargetType="ContentControl">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<ControlTemplate TargetType="ContentControl">
|
|
||||||
<ContentPresenter
|
|
||||||
Name="PART_ContentPresenter"
|
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
Content="{TemplateBinding Content}"
|
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
</ControlTheme>
|
|
||||||
</ResourceDictionary>
|
|
||||||
@@ -132,14 +132,21 @@
|
|||||||
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource DateTimePickerButtonCornerRadius}" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DatePicker">
|
<ControlTemplate TargetType="DatePicker">
|
||||||
<DataValidationErrors>
|
<DataValidationErrors>
|
||||||
<Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}">
|
<Grid
|
||||||
|
Name="LayoutRoot"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
ColumnDefinitions="*, Auto">
|
||||||
<Button
|
<Button
|
||||||
Name="PART_FlyoutButton"
|
Name="PART_FlyoutButton"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
Width="298"
|
Width="298"
|
||||||
MinWidth="298"
|
MinWidth="298"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
@@ -150,7 +157,6 @@
|
|||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsEnabled="{TemplateBinding IsEnabled}"
|
IsEnabled="{TemplateBinding IsEnabled}"
|
||||||
MinHeight="{DynamicResource DateTimePickerButtonDefaultHeight}"
|
|
||||||
Theme="{StaticResource DateTimePickerFlyoutButton}">
|
Theme="{StaticResource DateTimePickerFlyoutButton}">
|
||||||
<Grid ColumnDefinitions="*, Auto">
|
<Grid ColumnDefinitions="*, Auto">
|
||||||
<Grid
|
<Grid
|
||||||
@@ -160,43 +166,45 @@
|
|||||||
ColumnDefinitions="78*,Auto,132*,Auto,78*">
|
ColumnDefinitions="78*,Auto,132*,Auto,78*">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_DayTextBlock"
|
Name="PART_DayTextBlock"
|
||||||
Padding="12,4"
|
Padding="12,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="day" />
|
Text="{DynamicResource STRING_DATEPICKER_DAY_TEXT}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_MonthTextBlock"
|
Name="PART_MonthTextBlock"
|
||||||
Padding="12,4"
|
Padding="12,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="month"
|
Text="{DynamicResource STRING_DATEPICKER_MONTH_TEXT}"
|
||||||
TextAlignment="Left" />
|
TextAlignment="Left" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_YearTextBlock"
|
Name="PART_YearTextBlock"
|
||||||
Padding="12,4"
|
Padding="12,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="year" />
|
Text="{DynamicResource STRING_DATEPICKER_YEAR_TEXT}" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
x:Name="PART_FirstSpacer"
|
x:Name="PART_FirstSpacer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="1"
|
Width="1"
|
||||||
Margin="0,4"
|
Height="{TemplateBinding Height}"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
x:Name="PART_SecondSpacer"
|
x:Name="PART_SecondSpacer"
|
||||||
Grid.Column="3"
|
Grid.Column="3"
|
||||||
Width="1"
|
Width="1"
|
||||||
Margin="0,4"
|
Height="{TemplateBinding Height}"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -210,21 +218,38 @@
|
|||||||
Foreground="{DynamicResource DateTimePickerIconForeground}" />
|
Foreground="{DynamicResource DateTimePickerIconForeground}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
Placement="Bottom"
|
Placement="Bottom"
|
||||||
PlacementTarget="{TemplateBinding}"
|
PlacementTarget="{TemplateBinding}"
|
||||||
WindowManagerAddShadowHint="False">
|
WindowManagerAddShadowHint="False">
|
||||||
<DatePickerPresenter Name="PART_PickerPresenter" />
|
<DatePickerPresenter Name="PART_PickerPresenter" />
|
||||||
</Popup>
|
</Popup>
|
||||||
|
<Button
|
||||||
|
Name="ClearButton"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Command="{Binding $parent[DatePicker].Clear}"
|
||||||
|
Content="{DynamicResource IconButtonClearData}"
|
||||||
|
IsVisible="False"
|
||||||
|
Theme="{DynamicResource InnerIconButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataValidationErrors>
|
</DataValidationErrors>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^.clearButton:pointerover, ^.ClearButton:pointerover">
|
||||||
|
<Style Selector="^:not(:hasnodate) /template/ Button#ClearButton">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:not(:hasnodate) /template/ PathIcon#PART_Icon">
|
||||||
|
<Setter Property="Opacity" Value="0" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ PathIcon#PART_Icon">
|
<Style Selector="^:disabled /template/ PathIcon#PART_Icon">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonDisabledIconForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonDisabledIconForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -233,10 +258,10 @@
|
|||||||
<Style Selector="^:hasnodate /template/ Button#PART_FlyoutButton TextBlock">
|
<Style Selector="^:hasnodate /template/ Button#PART_FlyoutButton TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Large /template/ Button#PART_FlyoutButton">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small /template/ Button#PART_FlyoutButton">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
<ControlTheme x:Key="DateTimePickerFlyoutButton" TargetType="Button">
|
<ControlTheme x:Key="DateTimePickerFlyoutButton" TargetType="Button">
|
||||||
<Setter Property="RenderTransform" Value="none" />
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="Button.VerticalAlignment" Value="Stretch" />
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
|
|||||||
@@ -4,25 +4,29 @@
|
|||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
|
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||||
<Setter Property="DropDownButton.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||||
<Setter Property="DropDownButton.RenderTransform" Value="none" />
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="DropDownButton.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.Cursor" Value="Hand" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DropDownButton">
|
<ControlTemplate TargetType="DropDownButton">
|
||||||
<Border
|
<Border
|
||||||
x:Name="RootBorder"
|
x:Name="RootBorder"
|
||||||
Background="{TemplateBinding Background}"
|
HorizontalAlignment="Stretch"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
VerticalAlignment="Stretch"
|
||||||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
@@ -35,6 +39,7 @@
|
|||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<PathIcon
|
<PathIcon
|
||||||
x:Name="DropDownGlyph"
|
x:Name="DropDownGlyph"
|
||||||
@@ -57,186 +62,180 @@
|
|||||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{TemplateBinding BorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{TemplateBinding Background}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<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">
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDangerForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
</Style>
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="DropDownButton.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="DropDownButton.Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="SolidDropDownButton" TargetType="DropDownButton">
|
<ControlTheme
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
x:Key="SolidDropDownButton"
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
TargetType="DropDownButton">
|
||||||
<Setter Property="DropDownButton.CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="DropDownButton.RenderTransform" Value="none" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
</Style>
|
||||||
<Setter Property="DropDownButton.FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
</Style>
|
||||||
<Setter Property="DropDownButton.Cursor" Value="Hand" />
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
<Setter Property="Template">
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
<ControlTemplate TargetType="DropDownButton">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
<Border
|
|
||||||
x:Name="RootBorder"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
ClipToBounds="True"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
|
||||||
<Grid x:Name="InnerGrid" ColumnDefinitions="*,Auto">
|
|
||||||
<ContentPresenter
|
|
||||||
x:Name="PART_ContentPresenter"
|
|
||||||
Grid.Column="0"
|
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
||||||
Content="{TemplateBinding Content}"
|
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
||||||
RecognizesAccessKey="True" />
|
|
||||||
<PathIcon
|
|
||||||
x:Name="DropDownGlyph"
|
|
||||||
Grid.Column="1"
|
|
||||||
Width="12"
|
|
||||||
Height="12"
|
|
||||||
Margin="0,0,8,0"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Data="{DynamicResource DropDownButtonIconGlyph}"
|
|
||||||
Foreground="{TemplateBinding Foreground}"
|
|
||||||
IsHitTestVisible="False"
|
|
||||||
UseLayoutRounding="False" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
|
|
||||||
<Style Selector="^:pressed">
|
|
||||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSecondaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidWarningPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Danger">
|
<Style Selector="^.Danger">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerBorderBrush}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDangerPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -244,12 +243,13 @@
|
|||||||
x:Key="BorderlessDropDownButton"
|
x:Key="BorderlessDropDownButton"
|
||||||
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
TargetType="DropDownButton">
|
TargetType="DropDownButton">
|
||||||
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
|
||||||
<Style Selector="^:disabled">
|
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
|
||||||
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -86,29 +86,29 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:expanded /template/ PathIcon#PART_PathIcon">
|
<Style Selector="^:expanded /template/ PathIcon#PART_PathIcon">
|
||||||
<Setter Property="PathIcon.RenderTransform" Value="rotate(180deg)" />
|
<Setter Property="RenderTransform" Value="rotate(180deg)" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:right">
|
<Style Selector="^:right">
|
||||||
<Style Selector="^ /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
<Style Selector="^ /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
||||||
<Setter Property="LayoutTransformControl.LayoutTransform">
|
<Setter Property="LayoutTransform">
|
||||||
<RotateTransform Angle="-90" />
|
<RotateTransform Angle="-90" />
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
</Style>
|
</Style>
|
||||||
<Setter Property="Expander.HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
<Setter Property="Expander.VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:left">
|
<Style Selector="^:left">
|
||||||
<Style Selector="^ /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
<Style Selector="^ /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
||||||
<Setter Property="LayoutTransformControl.LayoutTransform">
|
<Setter Property="LayoutTransform">
|
||||||
<RotateTransform Angle="90" />
|
<RotateTransform Angle="90" />
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
</Style>
|
</Style>
|
||||||
<Setter Property="Expander.HorizontalAlignment" Value="Stretch" />
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Expander.VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:left /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
<Style Selector="^:left /template/ LayoutTransformControl#ExpanderHeaderLayoutContainer">
|
||||||
@@ -125,30 +125,30 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:left /template/ Border#ExpanderContent">
|
<Style Selector="^:left /template/ Border#ExpanderContent">
|
||||||
<Setter Property="Border.MinWidth" Value="2" />
|
<Setter Property="MinWidth" Value="2" />
|
||||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ExpanderLeftContentBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderLeftContentBorderThickness}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:up /template/ Border#ExpanderContent">
|
<Style Selector="^:up /template/ Border#ExpanderContent">
|
||||||
<Setter Property="Border.MinHeight" Value="2" />
|
<Setter Property="MinHeight" Value="2" />
|
||||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ExpanderUpContentBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderUpContentBorderThickness}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:right /template/ Border#ExpanderContent">
|
<Style Selector="^:right /template/ Border#ExpanderContent">
|
||||||
<Setter Property="Border.MinWidth" Value="2" />
|
<Setter Property="MinWidth" Value="2" />
|
||||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ExpanderRightContentBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderRightContentBorderThickness}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:down /template/ Border#ExpanderContent">
|
<Style Selector="^:down /template/ Border#ExpanderContent">
|
||||||
<Setter Property="Border.MinHeight" Value="2" />
|
<Setter Property="MinHeight" Value="2" />
|
||||||
<Setter Property="Border.BorderThickness" Value="{DynamicResource ExpanderDownContentBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderDownContentBorderThickness}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:pointerover">
|
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:pointerover">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ExpanderHeaderHoverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ExpanderHeaderHoverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:pressed">
|
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:pressed">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ExpanderHeaderPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ExpanderHeaderPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:disabled">
|
<Style Selector="^ /template/ ToggleButton#ExpanderHeader:disabled">
|
||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ExpanderHeaderDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ExpanderHeaderDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -2,6 +2,47 @@
|
|||||||
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">
|
||||||
|
<ControlTheme x:Key="{x:Type HeaderedContentControl}" TargetType="HeaderedContentControl">
|
||||||
|
<Setter Property="Padding" Value="3" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Border
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
|
<Grid RowDefinitions="auto *">
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_HeaderPresenter"
|
||||||
|
Content="{TemplateBinding Header}"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
FontSize="{TemplateBinding FontSize}"
|
||||||
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
|
FontStyle="{TemplateBinding FontStyle}"
|
||||||
|
Grid.Row="0" />
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_ContentPresenter"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
FontSize="{TemplateBinding FontSize}"
|
||||||
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
|
FontStyle="{TemplateBinding FontStyle}"
|
||||||
|
Grid.Row="1" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl">
|
<ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl">
|
||||||
<Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
|||||||
118
src/Semi.Avalonia/Controls/HyperlinkButton.axaml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
x:CompileBindings="True"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<ControlTheme TargetType="HyperlinkButton" x:Key="{x:Type HyperlinkButton}">
|
||||||
|
<Setter Property="Padding" Value="0,0,0,0" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="FontSize" Value="{DynamicResource HyperlinkButtonFontSize}" />
|
||||||
|
<Setter Property="MinHeight" Value="32" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForeground}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonDefaultBackground}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="HyperlinkButton">
|
||||||
|
<Grid ColumnDefinitions="Auto,*" x:Name="RootGrid">
|
||||||
|
<Grid
|
||||||
|
Grid.Column="0"
|
||||||
|
IsVisible="False"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
x:Name="IconGrid">
|
||||||
|
<Border
|
||||||
|
Background="{DynamicResource HyperlinkButtonDefaultBackground}"
|
||||||
|
Height="{DynamicResource HyperlinkButtonIconHeight}"
|
||||||
|
Opacity="0"
|
||||||
|
UseLayoutRounding="False"
|
||||||
|
Width="{DynamicResource HyperlinkButtonIconWidth}"
|
||||||
|
x:Name="BackgroundRectangle" />
|
||||||
|
<PathIcon
|
||||||
|
Data="{DynamicResource HyperlinkButtonLinkGlyph}"
|
||||||
|
Foreground="{DynamicResource HyperlinkButtonForeground}"
|
||||||
|
Height="{DynamicResource HyperlinkButtonLinkGlyphHeight}"
|
||||||
|
Name="LinkGlyph"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Width="{DynamicResource HyperlinkButtonLinkGlyphWidth}" />
|
||||||
|
</Grid>
|
||||||
|
<ContentPresenter
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
Cursor="{TemplateBinding Cursor}"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
Padding="0,0,0,0"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
x:Name="ContentPresenter" />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ PathIcon#LinkGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unvisited Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unvisited Disabled state -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ PathIcon#LinkGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:visited">
|
||||||
|
<Style Selector="^ /template/ PathIcon#LinkGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonVisitedForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonVisitedForeground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Visited Pointerover State -->
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ PathIcon#LinkGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Visited Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Visited Disabled State -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ PathIcon#LinkGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.WithIcon">
|
||||||
|
<Style Selector="^ /template/ Grid#IconGrid">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -100,38 +100,38 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Tertiary">
|
<Style Selector="^.Tertiary">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockTertiaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockTertiaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Quaternary">
|
<Style Selector="^.Quaternary">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockQuaternaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockQuaternaryForeground}" />
|
||||||
</Style>
|
|
||||||
<Style Selector="^.Warning">
|
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockWarningForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^.Danger">
|
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDangerForeground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Success">
|
<Style Selector="^.Success">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockSuccessForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockSuccessForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Warning">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockWarningForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Danger">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockDangerForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Mark">
|
<Style Selector="^.Mark">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource TextBlockMarkBackground}" />
|
<Setter Property="Background" Value="{DynamicResource TextBlockMarkBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Code">
|
<Style Selector="^.Code">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource TextBlockCodeBackground}" />
|
<Setter Property="Background" Value="{DynamicResource TextBlockCodeBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockCodeForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockCodeForeground}" />
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource TextBlockCodeBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource TextBlockCodeBorderBrush}" />
|
||||||
<Setter Property="Label.BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="Label.Padding" Value="2" />
|
<Setter Property="Padding" Value="2" />
|
||||||
<Setter Property="Label.CornerRadius" Value="{DynamicResource TextBlockCodeCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource TextBlockCodeCornerRadius}" />
|
||||||
<Setter Property="Label.FontFamily" Value="{DynamicResource CodeFontFamily}" />
|
<Setter Property="FontFamily" Value="{DynamicResource CodeFontFamily}" />
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockCodeFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockCodeFontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
@@ -140,22 +140,22 @@
|
|||||||
TargetType="Label">
|
TargetType="Label">
|
||||||
<Setter Property="Label.FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" />
|
<Setter Property="Label.FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" />
|
||||||
<Style Selector="^.H1">
|
<Style Selector="^.H1">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.H2">
|
<Style Selector="^.H2">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH2FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH2FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.H3">
|
<Style Selector="^.H3">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH3FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH3FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.H4">
|
<Style Selector="^.H4">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH4FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH4FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.H5">
|
<Style Selector="^.H5">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH5FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH5FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.H6">
|
<Style Selector="^.H6">
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH6FontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH6FontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -193,216 +193,216 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="Label.Padding" Value="{DynamicResource LabelTagLargePadding}" />
|
<Setter Property="Padding" Value="{DynamicResource LabelTagLargePadding}" />
|
||||||
<Setter Property="Label.MinHeight" Value="{DynamicResource LabelTagLargeHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource LabelTagLargeHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Circle">
|
<Style Selector="^.Circle">
|
||||||
<Setter Property="Label.CornerRadius" Value="{DynamicResource LabelTagCircleCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource LabelTagCircleCornerRadius}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^">
|
<Style Selector="^">
|
||||||
<Setter Property="Label.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
||||||
<Style Selector="^.Red">
|
<Style Selector="^.Red">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightRedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightRedBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightRedForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightRedForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Pink">
|
<Style Selector="^.Pink">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightPinkBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightPinkBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightPinkForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightPinkForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Purple">
|
<Style Selector="^.Purple">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightPurpleBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightPurpleBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightPurpleForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightPurpleForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Violet">
|
<Style Selector="^.Violet">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightVioletBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightVioletBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightVioletForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightVioletForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Indigo">
|
<Style Selector="^.Indigo">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightIndigoBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightIndigoBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightIndigoForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightIndigoForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Blue">
|
<Style Selector="^.Blue">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightBlueBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightBlueBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightBlueForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightBlueForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightBlue">
|
<Style Selector="^.LightBlue">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLightBlueBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightLightBlueBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLightBlueForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightLightBlueForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Cyan">
|
<Style Selector="^.Cyan">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightCyanBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightCyanBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightCyanForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightCyanForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Teal">
|
<Style Selector="^.Teal">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightTealBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightTealBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightTealForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightTealForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Green">
|
<Style Selector="^.Green">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreenBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightGreenBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreenForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightGreenForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightGreen">
|
<Style Selector="^.LightGreen">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLightGreenBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightLightGreenBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLightGreenForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightLightGreenForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Lime">
|
<Style Selector="^.Lime">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLimeBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightLimeBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLimeForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightLimeForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Yellow">
|
<Style Selector="^.Yellow">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightYellowBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightYellowBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightYellowForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightYellowForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Amber">
|
<Style Selector="^.Amber">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightAmberBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightAmberBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightAmberForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightAmberForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Orange">
|
<Style Selector="^.Orange">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightOrangeBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightOrangeBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightOrangeForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightOrangeForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Grey">
|
<Style Selector="^.Grey">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.White">
|
<Style Selector="^.White">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightWhiteBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagLightWhiteBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightWhiteForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightWhiteForeground}" />
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagLightWhiteBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagLightWhiteBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Ghost">
|
<Style Selector="^.Ghost">
|
||||||
<Setter Property="Label.Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagLightGreyBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
|
||||||
<Style Selector="^.Red">
|
<Style Selector="^.Red">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostRedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostRedBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostRedForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostRedForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Pink">
|
<Style Selector="^.Pink">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostPinkBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostPinkBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostPinkForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostPinkForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Purple">
|
<Style Selector="^.Purple">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostPurpleBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostPurpleBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostPurpleForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostPurpleForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Violet">
|
<Style Selector="^.Violet">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostVioletBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostVioletBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostVioletForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostVioletForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Indigo">
|
<Style Selector="^.Indigo">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostIndigoBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostIndigoBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostIndigoForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostIndigoForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Blue">
|
<Style Selector="^.Blue">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostBlueBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostBlueBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostBlueForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostBlueForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightBlue">
|
<Style Selector="^.LightBlue">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLightBlueBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostLightBlueBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLightBlueForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostLightBlueForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Cyan">
|
<Style Selector="^.Cyan">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostCyanBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostCyanBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostCyanForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostCyanForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Teal">
|
<Style Selector="^.Teal">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostTealBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostTealBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostTealForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostTealForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Green">
|
<Style Selector="^.Green">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostGreenBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostGreenBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostGreenForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostGreenForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightGreen">
|
<Style Selector="^.LightGreen">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLightGreenBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostLightGreenBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLightGreenForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostLightGreenForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Lime">
|
<Style Selector="^.Lime">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLimeBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostLimeBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLimeForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostLimeForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Yellow">
|
<Style Selector="^.Yellow">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostYellowBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostYellowBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostYellowForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostYellowForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Amber">
|
<Style Selector="^.Amber">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostAmberBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostAmberBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostAmberForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostAmberForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Orange">
|
<Style Selector="^.Orange">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostOrangeBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostOrangeBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostOrangeForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostOrangeForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Grey">
|
<Style Selector="^.Grey">
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostGreyBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostGreyBorderBrush}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostGreyForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostGreyForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.White">
|
<Style Selector="^.White">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagGhostWhiteBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagGhostWhiteBackground}" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostWhiteForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagGhostWhiteForeground}" />
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostWhiteBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagGhostWhiteBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Solid">
|
<Style Selector="^.Solid">
|
||||||
<Setter Property="Label.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagSolidForeground}" />
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
|
||||||
<Style Selector="^.Red">
|
<Style Selector="^.Red">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidRedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidRedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Pink">
|
<Style Selector="^.Pink">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidPinkBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidPinkBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Purple">
|
<Style Selector="^.Purple">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidPurpleBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidPurpleBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Violet">
|
<Style Selector="^.Violet">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidVioletBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidVioletBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Indigo">
|
<Style Selector="^.Indigo">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidIndigoBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidIndigoBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Blue">
|
<Style Selector="^.Blue">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidBlueBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidBlueBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightBlue">
|
<Style Selector="^.LightBlue">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLightBlueBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidLightBlueBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Cyan">
|
<Style Selector="^.Cyan">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidCyanBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidCyanBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Teal">
|
<Style Selector="^.Teal">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidTealBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidTealBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Green">
|
<Style Selector="^.Green">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreenBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidGreenBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.LightGreen">
|
<Style Selector="^.LightGreen">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLightGreenBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidLightGreenBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Lime">
|
<Style Selector="^.Lime">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLimeBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidLimeBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Yellow">
|
<Style Selector="^.Yellow">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidYellowBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidYellowBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Amber">
|
<Style Selector="^.Amber">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidAmberBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidAmberBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Orange">
|
<Style Selector="^.Orange">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidOrangeBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidOrangeBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Grey">
|
<Style Selector="^.Grey">
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.White">
|
<Style Selector="^.White">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagSolidWhiteForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource LabelTagSolidWhiteForeground}" />
|
||||||
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagSolidWhiteBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelTagSolidWhiteBorderBrush}" />
|
||||||
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidWhiteBackground}" />
|
<Setter Property="Background" Value="{DynamicResource LabelTagSolidWhiteBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||||
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
||||||
|
IsDeferredScrollingEnabled="{TemplateBinding (ScrollViewer.IsDeferredScrollingEnabled)}"
|
||||||
|
IsScrollInertiaEnabled="{TemplateBinding (ScrollViewer.IsScrollInertiaEnabled)}"
|
||||||
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
Name="PART_ItemsPresenter"
|
Name="PART_ItemsPresenter"
|
||||||
@@ -63,29 +65,29 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="ListBoxItem.Foreground" Value="{DynamicResource ListBoxItemDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemDisabledForeground}" />
|
||||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ListBoxItemDisabledBackground}" />
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemSelectedDisabledBackground}" />
|
Value="{DynamicResource ListBoxItemSelectedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pointerover State -->
|
<!-- Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pressed State -->
|
<!-- Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ListBoxItemPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Selected State -->
|
<!-- Selected State -->
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemSelectedPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemSelectedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -182,7 +184,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDefaultBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Unchecked Pointerover State -->
|
<!-- Unchecked Pointerover State -->
|
||||||
@@ -193,7 +195,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -204,7 +206,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -215,7 +217,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||||
@@ -229,7 +231,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Pointerover State -->
|
<!-- Checked Pointerover State -->
|
||||||
@@ -241,7 +243,7 @@
|
|||||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -253,7 +255,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -265,7 +267,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||||
@@ -312,30 +314,30 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="ListBoxItem.Background" Value="Transparent" />
|
<Setter Property="ListBoxItem.Background" Value="Transparent" />
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="ListBoxItem.Foreground"
|
<Setter Property="Foreground"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedDisabledForeground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedBackground}" />
|
||||||
<Setter Property="ListBoxItem.Foreground"
|
<Setter Property="Foreground"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedForeground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedForeground}" />
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="ListBoxItem.Foreground"
|
<Setter Property="Foreground"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedDisabledForeground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupButtonCheckedDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonSmallFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonSmallFontSize}" />
|
||||||
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonSmallPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonSmallPadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonLargeFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonLargeFontSize}" />
|
||||||
<Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonLargePadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonLargePadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -412,31 +414,31 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDefaultBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Unchecked Pointerover State -->
|
<!-- Unchecked Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPointeroverBackground}" />
|
||||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||||
<Setter Property="Stroke"
|
<Setter Property="Stroke"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Unchecked Pressed State -->
|
<!-- Unchecked Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPressedBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPressedBackground}" />
|
||||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBorderBrush}" />
|
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -447,7 +449,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupUncheckIconDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="0" />
|
<Setter Property="Opacity" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupDisabledForeground}" />
|
||||||
@@ -456,21 +458,21 @@
|
|||||||
|
|
||||||
<!-- Checked State -->
|
<!-- Checked State -->
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckedBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckedBackground}" />
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckDefaultBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckDefaultBorderBrush}" />
|
||||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||||
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBorderBrush}" />
|
<Setter Property="Stroke" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBorderBrush}" />
|
||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Pointerover State -->
|
<!-- Checked Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPointeroverBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPointeroverBorderBrush}" />
|
||||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||||
<Setter Property="Stroke"
|
<Setter Property="Stroke"
|
||||||
@@ -485,13 +487,13 @@
|
|||||||
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCheckIconPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Pressed State -->
|
<!-- Checked Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPressedBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPressedBorderBrush}" />
|
||||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||||
<Setter Property="Stroke"
|
<Setter Property="Stroke"
|
||||||
@@ -499,7 +501,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -511,7 +513,7 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
<Setter Property="Fill" Value="{DynamicResource ListBoxItemRadioGroupCheckIconDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||||
<Setter Property="Ellipse.Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Border#RootBorder">
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
@@ -560,11 +562,11 @@
|
|||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="ListBoxItem.BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBorderBrush}" />
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPointeroverBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPressedBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardUncheckPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
@@ -573,16 +575,16 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="ListBoxItem.Background"
|
<Setter Property="Background"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckedBackground}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckedBackground}" />
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckDefaultBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckDefaultBorderBrush}" />
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPointeroverBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ListBoxItem.BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPressedBorderBrush}" />
|
Value="{DynamicResource ListBoxItemRadioGroupCardCheckPressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
|
|
||||||
<converters:KeyToPathConverter x:Key="Icons">
|
<converters:KeyToPathConverter x:Key="Icons">
|
||||||
<PathGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</PathGeometry>
|
<StreamGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</StreamGeometry>
|
||||||
<PathGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</PathGeometry>
|
<StreamGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</StreamGeometry>
|
||||||
<PathGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</PathGeometry>
|
<StreamGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</StreamGeometry>
|
||||||
</converters:KeyToPathConverter>
|
</converters:KeyToPathConverter>
|
||||||
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
|
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
|
||||||
<Setter Property="dialogs:ManagedFileChooser.Template">
|
<Setter Property="dialogs:ManagedFileChooser.Template">
|
||||||
@@ -80,11 +80,11 @@
|
|||||||
<TextBox
|
<TextBox
|
||||||
IsVisible="{Binding !SelectingFolder}"
|
IsVisible="{Binding !SelectingFolder}"
|
||||||
Text="{Binding FileName}"
|
Text="{Binding FileName}"
|
||||||
Watermark="File name" />
|
Watermark="{DynamicResource STRING_CHOOSER_FILE_NAME}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="Show hidden files"
|
Content="{DynamicResource STRING_CHOOSER_SHOW_HIDDEN_FILES}"
|
||||||
DockPanel.Dock="Left"
|
DockPanel.Dock="Left"
|
||||||
IsChecked="{Binding ShowHiddenFiles}" />
|
IsChecked="{Binding ShowHiddenFiles}" />
|
||||||
<UniformGrid
|
<UniformGrid
|
||||||
@@ -94,15 +94,13 @@
|
|||||||
<Button
|
<Button
|
||||||
Margin="8,0,0,0"
|
Margin="8,0,0,0"
|
||||||
Classes="Primary"
|
Classes="Primary"
|
||||||
Command="{Binding Ok}">
|
Command="{Binding Ok}"
|
||||||
OK
|
Content="{DynamicResource STRING_CHOOSER_DIALOG_OK}" />
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
Margin="8,0,0,0"
|
Margin="8,0,0,0"
|
||||||
Classes="Danger"
|
Classes="Danger"
|
||||||
Command="{Binding Cancel}">
|
Command="{Binding Cancel}"
|
||||||
Cancel
|
Content="{DynamicResource STRING_CHOOSER_DIALOG_CANCEL}" />
|
||||||
</Button>
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<Border
|
<Border
|
||||||
@@ -133,13 +131,13 @@
|
|||||||
<ColumnDefinition Width="200" SharedSizeGroup="Size" />
|
<ColumnDefinition Width="200" SharedSizeGroup="Size" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<GridSplitter Grid.Column="1" Width="1" />
|
<GridSplitter Grid.Column="1" Width="1" />
|
||||||
<TextBlock Grid.Column="2" Text="Name" />
|
<TextBlock Grid.Column="2" Text="{DynamicResource STRING_CHOOSER_NAME_COLUMN}" />
|
||||||
<GridSplitter Grid.Column="3" Width="1" />
|
<GridSplitter Grid.Column="3" Width="1" />
|
||||||
<TextBlock Grid.Column="4" Text="Date Modified" />
|
<TextBlock Grid.Column="4" Text="{DynamicResource STRING_CHOOSER_DATEMODIFIED_COLUMN}" />
|
||||||
<GridSplitter Grid.Column="5" Width="1" />
|
<GridSplitter Grid.Column="5" Width="1" />
|
||||||
<TextBlock Grid.Column="6" Text="Type" />
|
<TextBlock Grid.Column="6" Text="{DynamicResource STRING_CHOOSER_TYPE_COLUMN}" />
|
||||||
<GridSplitter Grid.Column="7" Width="1" />
|
<GridSplitter Grid.Column="7" Width="1" />
|
||||||
<TextBlock Grid.Column="8" Text="Size" />
|
<TextBlock Grid.Column="8" Text="{DynamicResource STRING_CHOOSER_SIZE_COLUMN}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<ListBox
|
<ListBox
|
||||||
Name="PART_Files"
|
Name="PART_Files"
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
RenderTransform="{x:Null}">
|
RenderTransform="{x:Null}">
|
||||||
<RepeatButton.IsVisible>
|
<RepeatButton.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0">
|
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0">
|
||||||
<ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</RepeatButton.IsVisible>
|
</RepeatButton.IsVisible>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
@@ -50,10 +50,10 @@
|
|||||||
RenderTransform="{x:Null}">
|
RenderTransform="{x:Null}">
|
||||||
<RepeatButton.IsVisible>
|
<RepeatButton.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100">
|
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100">
|
||||||
<ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
<ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</RepeatButton.IsVisible>
|
</RepeatButton.IsVisible>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
@@ -120,14 +120,26 @@
|
|||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="ToggleIcon" />
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIcon" />
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIcon" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT" />
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT" />
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemChevron" />
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemChevron" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ContentControl
|
||||||
|
Name="PART_ToggleIconPresenter"
|
||||||
|
Grid.Column="0"
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Margin="{DynamicResource MenuItemIconMargin}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsVisible="False" />
|
||||||
|
|
||||||
<Viewbox
|
<Viewbox
|
||||||
Name="PART_IconPresenter"
|
Name="PART_IconPresenter"
|
||||||
|
Grid.Column="1"
|
||||||
Width="16"
|
Width="16"
|
||||||
Height="16"
|
Height="16"
|
||||||
Margin="{DynamicResource MenuItemIconMargin}"
|
Margin="{DynamicResource MenuItemIconMargin}"
|
||||||
@@ -143,14 +155,14 @@
|
|||||||
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="PART_HeaderPresenter"
|
Name="PART_HeaderPresenter"
|
||||||
Grid.Column="1"
|
Grid.Column="2"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="PART_InputGestureText"
|
x:Name="PART_InputGestureText"
|
||||||
Grid.Column="2"
|
Grid.Column="3"
|
||||||
Margin="{DynamicResource MenuItemInputGestureTextMargin}"
|
Margin="{DynamicResource MenuItemInputGestureTextMargin}"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -159,7 +171,7 @@
|
|||||||
Converter={StaticResource KeyGestureConverter}}" />
|
Converter={StaticResource KeyGestureConverter}}" />
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Name="PART_ExpandIcon"
|
Name="PART_ExpandIcon"
|
||||||
Grid.Column="3"
|
Grid.Column="4"
|
||||||
Width="8"
|
Width="8"
|
||||||
Height="8"
|
Height="8"
|
||||||
Margin="{DynamicResource MenuItemExpandIconMargin}"
|
Margin="{DynamicResource MenuItemExpandIconMargin}"
|
||||||
@@ -244,6 +256,27 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:checked:toggle /template/ ContentControl#PART_ToggleIconPresenter">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
<Setter Property="Content">
|
||||||
|
<Template>
|
||||||
|
<PathIcon
|
||||||
|
Foreground="{Binding $parent[MenuItem].Foreground}"
|
||||||
|
Data="{StaticResource MenuCheckGlyph}" />
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:checked:radio /template/ ContentControl#PART_ToggleIconPresenter">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
<Setter Property="Content">
|
||||||
|
<Template>
|
||||||
|
<Ellipse Fill="{Binding $parent[MenuItem].Foreground}"
|
||||||
|
Margin="4" Width="8" Height="8" />
|
||||||
|
</Template>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="TopLevelMenuItem" TargetType="MenuItem">
|
<ControlTheme x:Key="TopLevelMenuItem" TargetType="MenuItem">
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
Height="16"
|
Height="16"
|
||||||
Margin="16,16,12,0"
|
Margin="16,16,12,0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Data="{DynamicResource InformationIconPathData}"
|
IsVisible="False"
|
||||||
IsVisible="False" />
|
Data="{DynamicResource NotificationCardInformationIconPathData}"/>
|
||||||
<ContentControl
|
<ContentControl
|
||||||
Name="PART_Content"
|
Name="PART_Content"
|
||||||
MinHeight="64"
|
MinHeight="64"
|
||||||
@@ -134,24 +134,24 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:information /template/ PathIcon#NotificationIcon">
|
<Style Selector="^:information /template/ PathIcon#NotificationIcon">
|
||||||
<Setter Property="PathIcon.IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="PathIcon.Foreground" Value="{DynamicResource NotificationCardInformationIconForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource NotificationCardInformationIconForeground}" />
|
||||||
<Setter Property="PathIcon.Data" Value="{DynamicResource NotificationCardInformationIconPathData}" />
|
<Setter Property="Data" Value="{DynamicResource NotificationCardInformationIconPathData}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:success /template/ PathIcon#NotificationIcon">
|
<Style Selector="^:success /template/ PathIcon#NotificationIcon">
|
||||||
<Setter Property="PathIcon.IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="PathIcon.Foreground" Value="{DynamicResource NotificationCardSuccessIconForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource NotificationCardSuccessIconForeground}" />
|
||||||
<Setter Property="PathIcon.Data" Value="{DynamicResource NotificationCardSuccessIconPathData}" />
|
<Setter Property="Data" Value="{DynamicResource NotificationCardSuccessIconPathData}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:warning /template/ PathIcon#NotificationIcon">
|
<Style Selector="^:warning /template/ PathIcon#NotificationIcon">
|
||||||
<Setter Property="PathIcon.IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="PathIcon.Foreground" Value="{DynamicResource NotificationCardWarningIconForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource NotificationCardWarningIconForeground}" />
|
||||||
<Setter Property="PathIcon.Data" Value="{DynamicResource NotificationCardWarningIconPathData}" />
|
<Setter Property="Data" Value="{DynamicResource NotificationCardWarningIconPathData}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:error /template/ PathIcon#NotificationIcon">
|
<Style Selector="^:error /template/ PathIcon#NotificationIcon">
|
||||||
<Setter Property="PathIcon.IsVisible" Value="True" />
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="PathIcon.Foreground" Value="{DynamicResource NotificationCardErrorIconForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource NotificationCardErrorIconForeground}" />
|
||||||
<Setter Property="PathIcon.Data" Value="{DynamicResource NotificationCardErrorIconPathData}" />
|
<Setter Property="Data" Value="{DynamicResource NotificationCardErrorIconPathData}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
|
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
|
||||||
|
<Setter Property="NumericUpDown.VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />
|
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
||||||
|
<Setter Property="NumericUpDown.MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" />
|
||||||
<Setter Property="NumericUpDown.Template">
|
<Setter Property="NumericUpDown.Template">
|
||||||
<ControlTemplate TargetType="NumericUpDown">
|
<ControlTemplate TargetType="NumericUpDown">
|
||||||
<DataValidationErrors>
|
<DataValidationErrors>
|
||||||
@@ -23,29 +25,32 @@
|
|||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
Height="{TemplateBinding Height}"
|
Height="{TemplateBinding Height}"
|
||||||
MinHeight="{DynamicResource NumericUpDownWrapperDefaultHeight}"
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
AcceptsReturn="False"
|
AcceptsReturn="False"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
DataValidationErrors.Errors="{ReflectionBinding $parent[NumericUpDown].(DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{Binding $parent[NumericUpDown].(DataValidationErrors.Errors)}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsReadOnly="{TemplateBinding IsReadOnly}"
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
||||||
Text="{TemplateBinding Text}"
|
Text="{TemplateBinding Text}"
|
||||||
TextWrapping="NoWrap"
|
TextWrapping="NoWrap"
|
||||||
Theme="{DynamicResource NonErrorTextBox}"
|
Theme="{DynamicResource NonErrorTextBox}"
|
||||||
|
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||||
|
InnerRightContent="{TemplateBinding InnerRightContent}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
</ButtonSpinner>
|
</ButtonSpinner>
|
||||||
</DataValidationErrors>
|
</DataValidationErrors>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^.Large /template/ TextBox#PART_TextBox">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperLargeHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownLargeHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small /template/ TextBox#PART_TextBox">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperSmallHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:error">
|
<Style Selector="^:error">
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<Border Background="{TemplateBinding Background}">
|
<Border Background="{TemplateBinding Background}">
|
||||||
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||||
<Path
|
<Path
|
||||||
|
Name="PART_Path"
|
||||||
Data="{TemplateBinding Data}"
|
Data="{TemplateBinding Data}"
|
||||||
Fill="{TemplateBinding Foreground}"
|
Fill="{TemplateBinding Foreground}"
|
||||||
Stretch="Uniform" />
|
Stretch="Uniform" />
|
||||||
@@ -18,5 +19,8 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Style Selector="^.Active /template/ Path#PART_Path">
|
||||||
|
<Setter Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}"></Setter>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||