mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-14 13:16:36 +08:00
Compare commits
160 Commits
v0.1.0-pre
...
v0.1.0-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17676823ff | ||
|
|
bd0d0f261a | ||
|
|
8cb67d94e2 | ||
|
|
29f7af5bd0 | ||
|
|
39b17f52d1 | ||
|
|
95df47eeba | ||
|
|
2c41fe862b | ||
|
|
593d0d3fa2 | ||
|
|
a425bceddb | ||
|
|
80c6380ce9 | ||
|
|
0ae04b69f5 | ||
|
|
d952f901f2 | ||
|
|
566cec65be | ||
|
|
0af182680f | ||
|
|
efe00ebcf4 | ||
|
|
2662059c6d | ||
|
|
04dbe2d9ce | ||
|
|
4db7bbf522 | ||
|
|
97a0f21186 | ||
|
|
698866ab43 | ||
|
|
6cafdd6e1c | ||
|
|
fd49eef668 | ||
|
|
2cf623ddf9 | ||
|
|
7a89d503d7 | ||
|
|
31ba4c9fbe | ||
|
|
f30e027a19 | ||
|
|
ffd1c7d89a | ||
|
|
2bb175bb16 | ||
|
|
3124c5e2cc | ||
|
|
e79044b040 | ||
|
|
f63abf6901 | ||
|
|
fa9250540b | ||
|
|
08c06199ae | ||
|
|
a4713ca21b | ||
|
|
cc2ab6ee9a | ||
|
|
0cee18f507 | ||
|
|
a015bbe3e0 | ||
|
|
afb0fbcea6 | ||
|
|
5f7e84bf08 | ||
|
|
2ad76cd737 | ||
|
|
60a3fb6019 | ||
|
|
6d338fa31c | ||
|
|
f026431ca9 | ||
|
|
e6531d89eb | ||
|
|
fd33972dda | ||
|
|
0e76c09b8e | ||
|
|
d1739cc88f | ||
|
|
6f4c0dd5cd | ||
|
|
1a512e589d | ||
|
|
43305be6bf | ||
|
|
15ce60bcdb | ||
|
|
3639239dfe | ||
|
|
9f43baa039 | ||
|
|
c34d240874 | ||
|
|
a3571192a9 | ||
|
|
c1a9a49cd7 | ||
|
|
016160dee8 | ||
|
|
6885575c85 | ||
|
|
2ce3dd7445 | ||
|
|
28e70736b2 | ||
|
|
e193bfc697 | ||
|
|
41e57b5034 | ||
|
|
117fce4a61 | ||
|
|
c852219f39 | ||
|
|
f9ae36b7e1 | ||
|
|
48ea283c65 | ||
|
|
318f9fb510 | ||
|
|
153109c0ca | ||
|
|
3afa528cac | ||
|
|
799875e38b | ||
|
|
49e234bf30 | ||
|
|
1ddf35b25b | ||
|
|
c90f541228 | ||
|
|
ed1b417332 | ||
|
|
c28ff754f5 | ||
|
|
2aea7b3e84 | ||
|
|
c7fc804ec1 | ||
|
|
cd533c65bc | ||
|
|
b0cba0e5a9 | ||
|
|
5a9596a2be | ||
|
|
33db3bf0d4 | ||
|
|
3473c754a2 | ||
|
|
34f0e53627 | ||
|
|
4f28569781 | ||
|
|
874c4ab260 | ||
|
|
3fd209f180 | ||
|
|
7c93f635e3 | ||
|
|
0e3170eba2 | ||
|
|
6376d11a25 | ||
|
|
e48e72ec37 | ||
|
|
9f61d67141 | ||
|
|
eca7d32ba9 | ||
|
|
2461c4a5c1 | ||
|
|
0657c99f31 | ||
|
|
ba2089aed9 | ||
|
|
1505eacb78 | ||
|
|
869d4cf5e9 | ||
|
|
a3eb8ec90e | ||
|
|
d5d3e085f7 | ||
|
|
261e17abcd | ||
|
|
309dc7ed23 | ||
|
|
f0d0ed918a | ||
|
|
4b7920909c | ||
|
|
feb67c312e | ||
|
|
0d0ee168a1 | ||
|
|
bcfed4d251 | ||
|
|
5dc7bbe8ee | ||
|
|
e101609534 | ||
|
|
4a8f24767b | ||
|
|
354be7e207 | ||
|
|
fc036395cc | ||
|
|
ffc5b120b8 | ||
|
|
dd45da715a | ||
|
|
224a759874 | ||
|
|
ad697b1091 | ||
|
|
95efcf063e | ||
|
|
cbcedd6bdd | ||
|
|
1b50bc5437 | ||
|
|
efa0ff28e7 | ||
|
|
37737866ec | ||
|
|
ddc886e52e | ||
|
|
b92e2d18f7 | ||
|
|
e1aa133155 | ||
|
|
ea5f717da6 | ||
|
|
e51b497f2a | ||
|
|
ec4bf729b4 | ||
|
|
e675699f9c | ||
|
|
5b352b6f81 | ||
|
|
ef9455c6da | ||
|
|
4fc1dc5949 | ||
|
|
6af2d9008d | ||
|
|
c8e58e3dbf | ||
|
|
fa19b9e89a | ||
|
|
20f421f6fc | ||
|
|
4e48f28e1c | ||
|
|
f4d6f7f025 | ||
|
|
bc55f2e321 | ||
|
|
c2a309abc8 | ||
|
|
21e8f09934 | ||
|
|
303b7dbf49 | ||
|
|
7b94727b59 | ||
|
|
8a68f7793d | ||
|
|
8911e52963 | ||
|
|
032f62da42 | ||
|
|
24248f7d04 | ||
|
|
6e5512e429 | ||
|
|
df217f3c82 | ||
|
|
7b16b5a36a | ||
|
|
4e5a6c327d | ||
|
|
068f1e36cc | ||
|
|
07debbb6f4 | ||
|
|
46efeebf76 | ||
|
|
73e2ebc316 | ||
|
|
1bfe7a6744 | ||
|
|
ada894e456 | ||
|
|
7762eff214 | ||
|
|
3ecebc0387 | ||
|
|
3fe0effc9b | ||
|
|
ff4f691fbf | ||
|
|
aab33b15f3 |
55
.github/workflows/Pack.yml
vendored
Normal file
55
.github/workflows/Pack.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Pack
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "release" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "release" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nuget_desktop:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Nuget Semi.Avalonia
|
||||||
|
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
|
||||||
|
|
||||||
|
- name: Nuget Semi.Avalonia.DataGrid
|
||||||
|
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
|
||||||
|
|
||||||
|
- name: Nuget Semi.Avalonia.ColorPicker
|
||||||
|
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
|
||||||
|
|
||||||
|
- name: Desktop
|
||||||
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: nuget_desktop
|
||||||
|
path: |
|
||||||
|
./nugets
|
||||||
|
./**/publish/*.exe
|
||||||
|
|
||||||
|
android:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: CD Android
|
||||||
|
run: cd ./demo/Semi.Avalonia.Demo.Android
|
||||||
|
|
||||||
|
- name: Restore Dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: android
|
||||||
|
path: ./**/publish/*Signed.apk
|
||||||
6
.run/SC-Single.run.xml
Normal file
6
.run/SC-Single.run.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
|
||||||
|
<riderPublish configuration="Release" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/demo/Semi.Avalonia.Demo.Desktop/bin/Release/net7.0/win-x64/publish" target_framework="net7.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
50
README.md
50
README.md
@@ -11,30 +11,64 @@ Avalonia Theme inspired by Semi Design
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 0.1.0-preview5
|
dotnet add package Semi.Avalonia --version 0.1.0-preview7
|
||||||
```
|
```
|
||||||
Include Semi Design Styles in application:
|
Include Semi Design Styles in application:
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/DarkTheme.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
```
|
```
|
||||||
|
|
||||||
That's all.
|
That's all.
|
||||||
|
|
||||||
|
DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
|
||||||
|
```bash
|
||||||
|
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview7
|
||||||
|
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview7
|
||||||
|
```
|
||||||
|
```xaml
|
||||||
|
<Application.Styles>
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
|
</Application.Styles>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
You can always download demo executable to play around with Semi Avalonia Themes.
|
||||||
|
https://github.com/irihitech/Semi.Avalonia/releases
|
||||||
|
|
||||||
## Version compatibility
|
## Version compatibility
|
||||||
|
|
||||||
|Semi Design Version| Avalonia Version|
|
| Semi Design Version | Avalonia Version |
|
||||||
|:---|:---|
|
|:--------------------|:-----------------|
|
||||||
|0.1.0-preview3|11.0-preview4|
|
| 0.1.0-preview3 | 11.0-preview4 |
|
||||||
|0.1.0-preview5|11.0-preview5|
|
| 0.1.0-preview5.x | 11.0-preview5 |
|
||||||
|
| 0.1.0-preview6.x | 11.0-preview6 |
|
||||||
|
| 0.1.0-preview7.x | 11.0-preview7 |
|
||||||
|
|
||||||
|
**NOTE**
|
||||||
|
|
||||||
|
Semi Avalonia theme is moving forward together with Avalonia preview versions now. So new feature/fixes are not backported to previous preview versions. If you need a feature/fix for outdated avalonia preview version, please raise an issue so we can do that for you.
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
* DataValidationErrors
|
* DataValidationErrors
|
||||||
* FocusAdorner
|
* FocusAdorner
|
||||||
* DataGrid
|
|
||||||
* ColorPicker
|
## Credits
|
||||||
|
|
||||||
|
[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)
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution
|
|||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
demo\Directory.Build.props = demo\Directory.Build.props
|
demo\Directory.Build.props = demo\Directory.Build.props
|
||||||
demo\global.json = demo\global.json
|
demo\global.json = demo\global.json
|
||||||
|
src\Package.props = src\Package.props
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}"
|
||||||
@@ -19,9 +20,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Web", "d
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Android", "demo\Semi.Avalonia.Demo.Android\Semi.Avalonia.Demo.Android.csproj", "{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -53,6 +56,11 @@ Global
|
|||||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -61,6 +69,7 @@ Global
|
|||||||
{2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
{2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||||
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||||
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||||
|
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F} = {43091528-9509-43CB-A003-9C5C11E96DD6}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86}
|
SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AvaloniaVersion>11.0.0-preview4</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
11
demo/Semi.Avalonia.Demo.Android/App.axaml
Normal file
11
demo/Semi.Avalonia.Demo.Android/App.axaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<Application
|
||||||
|
x:Class="Semi.Avalonia.Demo.Android.App"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:Semi.Avalonia.Demo.Android">
|
||||||
|
<Application.Styles>
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||||
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
||||||
27
demo/Semi.Avalonia.Demo.Android/App.axaml.cs
Normal file
27
demo/Semi.Avalonia.Demo.Android/App.axaml.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Semi.Avalonia.Demo.Views;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Android;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is ISingleViewApplicationLifetime single)
|
||||||
|
{
|
||||||
|
single.MainView = new MainView()
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
12
demo/Semi.Avalonia.Demo.Android/MainActivity.cs
Normal file
12
demo/Semi.Avalonia.Demo.Android/MainActivity.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Android.App;
|
||||||
|
using Android.Content.PM;
|
||||||
|
using Avalonia.Android;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Android;
|
||||||
|
|
||||||
|
[Activity(Label = "Semi.Avalonia.Demo.Android", Icon = "@drawable/Icon", Theme = "@style/MyTheme.NoActionBar",
|
||||||
|
LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
|
||||||
|
public class MainActivity : AvaloniaMainActivity
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<application android:label="Semi.Avalonia" android:icon="@drawable/Icon" />
|
||||||
|
</manifest>
|
||||||
BIN
demo/Semi.Avalonia.Demo.Android/Resources/drawable/Icon.png
Normal file
BIN
demo/Semi.Avalonia.Demo.Android/Resources/drawable/Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<color android:color="@color/splash_background"/>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/Icon"
|
||||||
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="splash_background">#FFFFFF</color>
|
||||||
|
</resources>
|
||||||
17
demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml
Normal file
17
demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="MyTheme">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MyTheme.NoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
|
||||||
|
<item name="android:windowActionBar">false</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MyTheme.Splash" parent ="MyTheme.NoActionBar">
|
||||||
|
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||||
|
<item name="android:windowContentOverlay">@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0-android</TargetFramework>
|
||||||
|
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||||
|
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
||||||
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||||
|
<AndroidPackageFormat>apk</AndroidPackageFormat>
|
||||||
|
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
|
||||||
|
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||||
|
<RootNamespace>Semi.Avalonia.Demo.Android</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="../Directory.Build.props" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
22
demo/Semi.Avalonia.Demo.Android/SplashActivity.cs
Normal file
22
demo/Semi.Avalonia.Demo.Android/SplashActivity.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Android.App;
|
||||||
|
using Android.Content;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Android;
|
||||||
|
using Application = Android.App.Application;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Android;
|
||||||
|
|
||||||
|
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
|
||||||
|
public class SplashActivity: AvaloniaSplashActivity<App>
|
||||||
|
{
|
||||||
|
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
||||||
|
{
|
||||||
|
return base.CustomizeAppBuilder(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnResume()
|
||||||
|
{
|
||||||
|
base.OnResume();
|
||||||
|
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
|
||||||
|
}
|
||||||
|
}
|
||||||
11
demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml
Normal file
11
demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Semi.Avalonia.Demo.Android.Views.MainView"
|
||||||
|
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">
|
||||||
|
Welcome to Avalonia!
|
||||||
|
</UserControl>
|
||||||
18
demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo.Android/Views/MainView.axaml.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Android.Views;
|
||||||
|
|
||||||
|
public partial class MainView : UserControl
|
||||||
|
{
|
||||||
|
public MainView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,11 @@
|
|||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<!-- Uncomment below to enable Native AOT compilation-->
|
||||||
|
<!--
|
||||||
|
<PublishAot>true</PublishAot>
|
||||||
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||||
|
-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -11,9 +16,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
|
<RdXmlFile Include="rd.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia.Desktop" 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-preview5" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
16
demo/Semi.Avalonia.Demo.Desktop/rd.xml
Normal file
16
demo/Semi.Avalonia.Demo.Desktop/rd.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?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"/>
|
||||||
|
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
|
||||||
|
<Assembly Name="Semi.Avalonia.Demo" Dynamic="Required All"/>
|
||||||
|
</Application>
|
||||||
|
</Directives>
|
||||||
@@ -10,7 +10,7 @@ internal partial class Program
|
|||||||
{
|
{
|
||||||
private static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
BuildAvaloniaApp().SetupBrowserApp("out");
|
BuildAvaloniaApp(); //.SetupBrowserApp("out");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls">
|
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||||
|
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
|
x:CompileBindings="True"
|
||||||
|
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>
|
<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>
|
||||||
<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 -->
|
||||||
@@ -18,8 +21,8 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
CornerRadius="6" />
|
CornerRadius="6" />
|
||||||
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*, *, *, *, *, *">
|
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*, *, *, *, *, *, *">
|
||||||
<!-- Row 0-1 ResourceKey -->
|
<!-- Row 0-1-2 ResourceKey -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
@@ -45,23 +48,43 @@
|
|||||||
Data="{StaticResource CopyIcon}"
|
Data="{StaticResource CopyIcon}"
|
||||||
Foreground="{Binding $parent[Button].Foreground}" />
|
Foreground="{Binding $parent[Button].Foreground}" />
|
||||||
</Button>
|
</Button>
|
||||||
|
<SelectableTextBlock
|
||||||
<!-- Row 2-3 HEX -->
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorResourceKey, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
|
Text="{TemplateBinding ColorResourceKey}" />
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Classes="Tertiary"
|
||||||
|
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
|
||||||
|
CommandParameter="{x:Static controls:ColorDetailControl.KEY_ColorResourceKey}"
|
||||||
|
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorResourceKey, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{StaticResource CopyIcon}"
|
||||||
|
Foreground="{Binding $parent[Button].Foreground}" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- Row 3-4 HEX -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="4,8,0,0"
|
Margin="4,8,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Text="ARGB" />
|
Text="ARGB" />
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="4"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{TemplateBinding Hex}" />
|
Text="{TemplateBinding Hex}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="3"
|
Grid.Row="4"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
|
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
|
||||||
@@ -74,9 +97,9 @@
|
|||||||
Foreground="{Binding $parent[Button].Foreground}" />
|
Foreground="{Binding $parent[Button].Foreground}" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Row 4-5 Opacity -->
|
<!-- Row 5-6 Opacity -->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="4"
|
Grid.Row="5"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="4,8,0,0"
|
Margin="4,8,0,0"
|
||||||
@@ -84,12 +107,12 @@
|
|||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Text="Opacity" />
|
Text="Opacity" />
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="6"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{TemplateBinding OpacityNumber}" />
|
Text="{TemplateBinding OpacityNumber}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="5"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Classes="Tertiary"
|
Classes="Tertiary"
|
||||||
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
|
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Primitives;
|
using Avalonia.Controls.Primitives;
|
||||||
using Avalonia.Input.Platform;
|
using Avalonia.Input.Platform;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
@@ -12,6 +13,7 @@ public class ColorDetailControl: TemplatedControl
|
|||||||
public const string KEY_ResourceKey = "ResourceKey";
|
public const string KEY_ResourceKey = "ResourceKey";
|
||||||
public const string KEY_Hex = "Hex";
|
public const string KEY_Hex = "Hex";
|
||||||
public const string KEY_Opacity = "Opacity";
|
public const string KEY_Opacity = "Opacity";
|
||||||
|
public const string KEY_ColorResourceKey = "ColorResourceKey";
|
||||||
|
|
||||||
public static readonly StyledProperty<string?> ResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>(
|
public static readonly StyledProperty<string?> ResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>(
|
||||||
nameof(ResourceKey));
|
nameof(ResourceKey));
|
||||||
@@ -30,6 +32,15 @@ public class ColorDetailControl: TemplatedControl
|
|||||||
set => SetValue(ResourceNameProperty, value);
|
set => SetValue(ResourceNameProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly StyledProperty<string?> ColorResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>(
|
||||||
|
nameof(ColorResourceKey));
|
||||||
|
|
||||||
|
public string? ColorResourceKey
|
||||||
|
{
|
||||||
|
get => GetValue(ColorResourceKeyProperty);
|
||||||
|
set => SetValue(ColorResourceKeyProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
public static readonly DirectProperty<ColorDetailControl, string?> HexProperty = AvaloniaProperty.RegisterDirect<ColorDetailControl, string?>(
|
public static readonly DirectProperty<ColorDetailControl, string?> HexProperty = AvaloniaProperty.RegisterDirect<ColorDetailControl, string?>(
|
||||||
nameof(Hex), o => o.Hex);
|
nameof(Hex), o => o.Hex);
|
||||||
private string? _hex;
|
private string? _hex;
|
||||||
@@ -49,6 +60,8 @@ public class ColorDetailControl: TemplatedControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static ColorDetailControl()
|
static ColorDetailControl()
|
||||||
{
|
{
|
||||||
BackgroundProperty.Changed.AddClassHandler<ColorDetailControl>((o, e) => o.OnBackgroundChanged(e));
|
BackgroundProperty.Changed.AddClassHandler<ColorDetailControl>((o, e) => o.OnBackgroundChanged(e));
|
||||||
@@ -77,11 +90,14 @@ public class ColorDetailControl: TemplatedControl
|
|||||||
break;
|
break;
|
||||||
case KEY_Opacity: text = OpacityNumber;
|
case KEY_Opacity: text = OpacityNumber;
|
||||||
break;
|
break;
|
||||||
|
case KEY_ColorResourceKey: text = ColorResourceKey;
|
||||||
|
break;
|
||||||
default: text = string.Empty; break;
|
default: text = string.Empty; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Application.Current is { Clipboard: { } c })
|
var toplevel = TopLevel.GetTopLevel(this);
|
||||||
|
if (toplevel?.Clipboard is { } c)
|
||||||
{
|
{
|
||||||
await c.SetTextAsync(text??string.Empty);
|
await c.SetTextAsync(text??string.Empty);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="using:Semi.Avalonia.Demo.Controls">
|
xmlns:controls="using:Semi.Avalonia.Demo.Controls"
|
||||||
|
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
|
x:CompileBindings="True"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<controls:ColorItemControl />
|
<controls:ColorItemControl />
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
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:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
|
||||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels">
|
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
|
x:CompileBindings="True"
|
||||||
|
x:DataType="viewModels:FunctionalColorGroupViewModel">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl">
|
<ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
Theme="{DynamicResource TitleTextBlock}" />
|
Theme="{DynamicResource TitleTextBlock}" />
|
||||||
<TabControl Grid.Row="1">
|
<TabControl Grid.Row="1">
|
||||||
<TabItem Header="Light">
|
<TabItem Header="Light">
|
||||||
<DataGrid IsReadOnly="True" Items="{TemplateBinding LightColors}">
|
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightColors}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn Width="70" Header="Color">
|
<DataGridTemplateColumn Width="70" Header="Color">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -25,6 +27,7 @@
|
|||||||
<controls:ColorItemControl
|
<controls:ColorItemControl
|
||||||
Width="40"
|
Width="40"
|
||||||
Height="20"
|
Height="20"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Background="{Binding Brush}"
|
Background="{Binding Brush}"
|
||||||
CornerRadius="3" />
|
CornerRadius="3" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -33,12 +36,17 @@
|
|||||||
<DataGridTemplateColumn Width="*" Header="ResourceKey">
|
<DataGridTemplateColumn Width="*" Header="ResourceKey">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock VerticalAlignment="Center" Text="{Binding ResourceKey}" />
|
<SelectableTextBlock
|
||||||
|
Margin="12,0,12,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
|
Text="{Binding ResourceKey}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Binding="{Binding ColorDisplayName}"
|
Binding="{Binding ColorDisplayName}"
|
||||||
CanUserSort="False"
|
CanUserSort="False"
|
||||||
Header="Name" />
|
Header="Name" />
|
||||||
@@ -46,8 +54,9 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Margin="8,0,0,0"
|
Margin="12,0,12,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Text="{Binding Hex}" />
|
Text="{Binding Hex}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -56,9 +65,10 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Margin="8,0,0,0"
|
Margin="12,0,12,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Text="{Binding Brush.Opacity}" />
|
Text="{Binding Brush.Opacity}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -67,7 +77,7 @@
|
|||||||
</DataGrid>
|
</DataGrid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Dark">
|
<TabItem Header="Dark">
|
||||||
<DataGrid IsReadOnly="True" Items="{TemplateBinding DarkColors}">
|
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkColors}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn Width="70" Header="Color">
|
<DataGridTemplateColumn Width="70" Header="Color">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -75,6 +85,7 @@
|
|||||||
<controls:ColorItemControl
|
<controls:ColorItemControl
|
||||||
Width="40"
|
Width="40"
|
||||||
Height="20"
|
Height="20"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Background="{Binding Brush}"
|
Background="{Binding Brush}"
|
||||||
CornerRadius="3" />
|
CornerRadius="3" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -83,12 +94,17 @@
|
|||||||
<DataGridTemplateColumn Width="*" Header="ResourceKey">
|
<DataGridTemplateColumn Width="*" Header="ResourceKey">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock VerticalAlignment="Center" Text="{Binding ResourceKey}" />
|
<SelectableTextBlock
|
||||||
|
Margin="12,0,12,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
|
Text="{Binding ResourceKey}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="*"
|
Width="*"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Binding="{Binding ColorDisplayName}"
|
Binding="{Binding ColorDisplayName}"
|
||||||
CanUserSort="False"
|
CanUserSort="False"
|
||||||
Header="Name" />
|
Header="Name" />
|
||||||
@@ -96,8 +112,9 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Margin="8,0,0,0"
|
Margin="12,0,12,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Text="{Binding Hex}" />
|
Text="{Binding Hex}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
@@ -106,9 +123,10 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<SelectableTextBlock
|
<SelectableTextBlock
|
||||||
Margin="8,0,0,0"
|
Margin="12,0,12,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="viewModels:ColorItemViewModel"
|
||||||
Text="{Binding Brush.Opacity}" />
|
Text="{Binding Brush.Opacity}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
|||||||
@@ -14,19 +14,19 @@ public class FunctionalColorGroupControl: TemplatedControl
|
|||||||
set => SetValue(TitleProperty, value);
|
set => SetValue(TitleProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable> LightColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable>(
|
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> LightColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
|
||||||
nameof(LightColors), o => o.LightColors, (o, v) => o.LightColors = v);
|
nameof(LightColors), o => o.LightColors, (o, v) => o.LightColors = v);
|
||||||
private IEnumerable _lightColors;
|
private IEnumerable? _lightColors;
|
||||||
public IEnumerable LightColors
|
public IEnumerable? LightColors
|
||||||
{
|
{
|
||||||
get => _lightColors;
|
get => _lightColors;
|
||||||
set => SetAndRaise(LightColorsProperty, ref _lightColors, value);
|
set => SetAndRaise(LightColorsProperty, ref _lightColors, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable> DarkColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable>(
|
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> DarkColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
|
||||||
nameof(DarkColors), o => o.DarkColors, (o, v) => o.DarkColors = v);
|
nameof(DarkColors), o => o.DarkColors, (o, v) => o.DarkColors = v);
|
||||||
private IEnumerable _darkColors;
|
private IEnumerable? _darkColors;
|
||||||
public IEnumerable DarkColors
|
public IEnumerable? DarkColors
|
||||||
{
|
{
|
||||||
get => _darkColors;
|
get => _darkColors;
|
||||||
set => SetAndRaise(DarkColorsProperty, ref _darkColors, value);
|
set => SetAndRaise(DarkColorsProperty, ref _darkColors, value);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
|
x:CompileBindings="False"
|
||||||
|
x:DataType="local:AutoCompleteBoxDemoViewModel"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<local:AutoCompleteBoxDemoViewModel />
|
<local:AutoCompleteBoxDemoViewModel />
|
||||||
@@ -17,7 +19,10 @@
|
|||||||
<Setter Property="Width" Value="300" />
|
<Setter Property="Width" Value="300" />
|
||||||
</Style>
|
</Style>
|
||||||
</StackPanel.Styles>
|
</StackPanel.Styles>
|
||||||
<AutoCompleteBox Items="{Binding States}" ValueMemberBinding="{Binding Name, x:DataType=local:StateData}">
|
<AutoCompleteBox
|
||||||
|
ItemsSource="{Binding States}"
|
||||||
|
ValueMemberBinding="{Binding Name}"
|
||||||
|
Watermark="Please select a State">
|
||||||
<AutoCompleteBox.ItemTemplate>
|
<AutoCompleteBox.ItemTemplate>
|
||||||
<DataTemplate DataType="local:StateData">
|
<DataTemplate DataType="local:StateData">
|
||||||
<TextBlock Text="{Binding Name}" />
|
<TextBlock Text="{Binding Name}" />
|
||||||
@@ -25,9 +30,40 @@
|
|||||||
</AutoCompleteBox.ItemTemplate>
|
</AutoCompleteBox.ItemTemplate>
|
||||||
</AutoCompleteBox>
|
</AutoCompleteBox>
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
Items="{Binding States}"
|
Classes="Large"
|
||||||
Theme="{StaticResource BorderlessAutoCompleteBox}"
|
ItemsSource="{Binding States}"
|
||||||
ValueMemberBinding="{Binding Name, x:DataType=local:StateData}">
|
ValueMemberBinding="{ReflectionBinding Name}">
|
||||||
|
<AutoCompleteBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</AutoCompleteBox.ItemTemplate>
|
||||||
|
</AutoCompleteBox>
|
||||||
|
<AutoCompleteBox
|
||||||
|
Classes="Small"
|
||||||
|
ItemsSource="{Binding States}"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}">
|
||||||
|
<AutoCompleteBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</AutoCompleteBox.ItemTemplate>
|
||||||
|
</AutoCompleteBox>
|
||||||
|
<AutoCompleteBox
|
||||||
|
Classes="Bordered"
|
||||||
|
ItemsSource="{Binding States}"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}">
|
||||||
|
<AutoCompleteBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</AutoCompleteBox.ItemTemplate>
|
||||||
|
</AutoCompleteBox>
|
||||||
|
<AutoCompleteBox
|
||||||
|
IsEnabled="False"
|
||||||
|
ItemsSource="{Binding States}"
|
||||||
|
ValueMemberBinding="{ReflectionBinding Name}"
|
||||||
|
Watermark="Disabled">
|
||||||
<AutoCompleteBox.ItemTemplate>
|
<AutoCompleteBox.ItemTemplate>
|
||||||
<DataTemplate DataType="local:StateData">
|
<DataTemplate DataType="local:StateData">
|
||||||
<TextBlock Text="{Binding Name}" />
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
Danger
|
Danger
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>DropdownButton</TextBlock>
|
<TextBlock>DropDownButton</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<DropDownButton Content="Submit">
|
<DropDownButton Content="Submit">
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</DropDownButton.Flyout>
|
</DropDownButton.Flyout>
|
||||||
</DropDownButton>
|
</DropDownButton>
|
||||||
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropdownButton}">
|
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropDownButton}">
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
<MenuItem Header="Submit All" />
|
<MenuItem Header="Submit All" />
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</DropDownButton.Flyout>
|
</DropDownButton.Flyout>
|
||||||
</DropDownButton>
|
</DropDownButton>
|
||||||
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropdownButton}">
|
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropDownButton}">
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
<MenuItem Header="Submit All" />
|
<MenuItem Header="Submit All" />
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<CalendarDatePicker />
|
<CalendarDatePicker />
|
||||||
|
<CalendarDatePicker Width="500" />
|
||||||
|
<CalendarDatePicker Classes="Large" />
|
||||||
|
<CalendarDatePicker Classes="Small" />
|
||||||
<CalendarDatePicker
|
<CalendarDatePicker
|
||||||
Name="DatePicker2"
|
Name="DatePicker2"
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
@@ -21,5 +24,7 @@
|
|||||||
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
||||||
|
|
||||||
<CalendarDatePicker IsEnabled="False" />
|
<CalendarDatePicker IsEnabled="False" />
|
||||||
|
<CalendarDatePicker Classes="Bordered" />
|
||||||
|
<CalendarDatePicker Classes="Bordered" IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<Style Selector="TextBlock">
|
<Style Selector="TextBlock">
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="Foreground" Value="#1C1F23" />
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
|
|||||||
@@ -7,18 +7,146 @@
|
|||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||||
<CheckBox>Unchecked</CheckBox>
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<CheckBox IsEnabled="False">Unchecked</CheckBox>
|
<TextBlock Text="CheckBox" />
|
||||||
<CheckBox IsChecked="True">Checked</CheckBox>
|
<StackPanel Orientation="Horizontal">
|
||||||
<CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox>
|
<CheckBox>Unchecked</CheckBox>
|
||||||
<CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox>
|
<CheckBox IsChecked="True">Checked</CheckBox>
|
||||||
<CheckBox
|
<CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox>
|
||||||
IsChecked="{x:Null}"
|
</StackPanel>
|
||||||
IsEnabled="False"
|
<StackPanel Orientation="Horizontal">
|
||||||
IsThreeState="True">
|
<CheckBox IsEnabled="False">Unchecked</CheckBox>
|
||||||
Indeterminate
|
<CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox>
|
||||||
</CheckBox>
|
<CheckBox
|
||||||
<CheckBox Width="120">Checkbox should wrap its text</CheckBox>
|
IsChecked="{x:Null}"
|
||||||
</StackPanel>
|
IsEnabled="False"
|
||||||
|
IsThreeState="True">
|
||||||
|
Indeterminate
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox>
|
||||||
|
<TextBlock Margin="0,16" Text="CardCheckBox" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox Width="300" Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="True"
|
||||||
|
Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsEnabled="False"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{DynamicResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Margin="0,16" Text="PureCardCheckBox" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox Width="300" Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="True"
|
||||||
|
Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsEnabled="True"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Width="300"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsEnabled="False"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{DynamicResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
|
x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
|
||||||
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:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker;assembly=Semi.Avalonia.ColorPicker"
|
||||||
xmlns:controls="using:Avalonia.Controls"
|
xmlns:controls="using:Avalonia.Controls"
|
||||||
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"
|
||||||
@@ -15,11 +16,7 @@
|
|||||||
Spacing="20">
|
Spacing="20">
|
||||||
<ColorView ColorSpectrumShape="Ring" />
|
<ColorView ColorSpectrumShape="Ring" />
|
||||||
<ColorView ColorSpectrumShape="Box" />
|
<ColorView ColorSpectrumShape="Box" />
|
||||||
<ColorView>
|
<ColorView Palette="{DynamicResource SemiColorPalette}" />
|
||||||
<ColorView.Palette>
|
|
||||||
<controls:MaterialColorPalette />
|
|
||||||
</ColorView.Palette>
|
|
||||||
</ColorView>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||||
<ColorPicker ColorSpectrumShape="Ring">
|
<ColorPicker ColorSpectrumShape="Ring">
|
||||||
@@ -29,7 +26,7 @@
|
|||||||
</ColorPicker>
|
</ColorPicker>
|
||||||
<ColorPicker ColorSpectrumShape="Box">
|
<ColorPicker ColorSpectrumShape="Box">
|
||||||
<ColorPicker.Palette>
|
<ColorPicker.Palette>
|
||||||
<controls:MaterialColorPalette />
|
<colorPicker:SemiColorLightPalette />
|
||||||
</ColorPicker.Palette>
|
</ColorPicker.Palette>
|
||||||
</ColorPicker>
|
</ColorPicker>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -23,5 +23,31 @@
|
|||||||
<ComboBoxItem>BBB</ComboBoxItem>
|
<ComboBoxItem>BBB</ComboBoxItem>
|
||||||
<ComboBoxItem>CCC</ComboBoxItem>
|
<ComboBoxItem>CCC</ComboBoxItem>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
<ComboBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Large"
|
||||||
|
IsEnabled="False">
|
||||||
|
<ComboBoxItem>AAA</ComboBoxItem>
|
||||||
|
<ComboBoxItem>BBB</ComboBoxItem>
|
||||||
|
<ComboBoxItem>CCC</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox Width="150" Classes="Small">
|
||||||
|
<ComboBoxItem>AAA</ComboBoxItem>
|
||||||
|
<ComboBoxItem>BBB</ComboBoxItem>
|
||||||
|
<ComboBoxItem>CCC</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox Width="150" Classes="Bordered">
|
||||||
|
<ComboBoxItem>AAA</ComboBoxItem>
|
||||||
|
<ComboBoxItem>BBB</ComboBoxItem>
|
||||||
|
<ComboBoxItem>CCC</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox
|
||||||
|
Width="150"
|
||||||
|
Classes="Bordered"
|
||||||
|
IsEnabled="False">
|
||||||
|
<ComboBoxItem>AAA</ComboBoxItem>
|
||||||
|
<ComboBoxItem>BBB</ComboBoxItem>
|
||||||
|
<ComboBoxItem>CCC</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
Name="dataGridEdit"
|
Name="dataGridEdit"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="12"
|
Margin="12"
|
||||||
Items="{Binding DataGrid3Source}">
|
ItemsSource="{Binding DataGrid3Source}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="2*"
|
Width="2*"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public partial class DataGridDemo : UserControl
|
|||||||
collectionView1.SortDescriptions.Add(dataGridSortDescription);
|
collectionView1.SortDescriptions.Add(dataGridSortDescription);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dg1.Items = collectionView1;
|
dg1.ItemsSource = collectionView1;
|
||||||
|
|
||||||
var dg2 = this.Get<DataGrid>("dataGridGrouping");
|
var dg2 = this.Get<DataGrid>("dataGridGrouping");
|
||||||
dg2.IsReadOnly = true;
|
dg2.IsReadOnly = true;
|
||||||
@@ -46,7 +46,7 @@ public partial class DataGridDemo : UserControl
|
|||||||
var collectionView2 = new DataGridCollectionView(Countries.All);
|
var collectionView2 = new DataGridCollectionView(Countries.All);
|
||||||
collectionView2.GroupDescriptions.Add(new DataGridPathGroupDescription("Region"));
|
collectionView2.GroupDescriptions.Add(new DataGridPathGroupDescription("Region"));
|
||||||
|
|
||||||
dg2.Items = collectionView2;
|
dg2.ItemsSource = collectionView2;
|
||||||
|
|
||||||
var dg3 = this.Get<DataGrid>("dataGridEdit");
|
var dg3 = this.Get<DataGrid>("dataGridEdit");
|
||||||
dg3.IsReadOnly = false;
|
dg3.IsReadOnly = false;
|
||||||
|
|||||||
@@ -11,5 +11,7 @@
|
|||||||
<DatePicker />
|
<DatePicker />
|
||||||
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
<DatePicker DayFormat="d (ddd)" YearVisible="False" />
|
||||||
<DatePicker IsEnabled="False" />
|
<DatePicker IsEnabled="False" />
|
||||||
|
<DatePicker Classes="Large" />
|
||||||
|
<DatePicker Classes="Small" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<Button Content="Hello Avalonia World!" />
|
<Button Content="Hello Avalonia World!" />
|
||||||
</Expander>
|
</Expander>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid ColumnDefinitions="* *">
|
<Grid ColumnDefinitions="*, *">
|
||||||
<Expander
|
<Expander
|
||||||
Height="200"
|
Height="200"
|
||||||
ExpandDirection="Right"
|
ExpandDirection="Right"
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<Grid
|
<Grid
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
ColumnDefinitions="* * * * *"
|
ColumnDefinitions="*, *, *, *, *"
|
||||||
RowDefinitions="* * * * *">
|
RowDefinitions="*, *, *, *, *">
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<MenuItem Header="Child 19" />
|
<MenuItem Header="Child 19" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Border>
|
<Border Theme="{DynamicResource CardBorder}">
|
||||||
<Border.ContextMenu>
|
<Border.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</Border.ContextMenu>
|
</Border.ContextMenu>
|
||||||
<TextBlock Text="Right Click to show Context Menu" />
|
<TextBlock Text="Right Click to show Context Menu" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border>
|
<Border Theme="{DynamicResource CardBorder}">
|
||||||
<Border.ContextFlyout>
|
<Border.ContextFlyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
||||||
|
|||||||
@@ -27,5 +27,15 @@
|
|||||||
Maximum="100"
|
Maximum="100"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
ShowButtonSpinner="False" />
|
ShowButtonSpinner="False" />
|
||||||
|
<NumericUpDown
|
||||||
|
Width="200"
|
||||||
|
Classes="Large"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0" />
|
||||||
|
<NumericUpDown
|
||||||
|
Width="200"
|
||||||
|
Classes="Small"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -47,27 +47,101 @@
|
|||||||
<RadioButton Theme="{StaticResource ButtonRadioButton}">选项 2</RadioButton>
|
<RadioButton Theme="{StaticResource ButtonRadioButton}">选项 2</RadioButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<RadioButton Margin="4" Theme="{StaticResource CardRadioButton}">
|
<StackPanel Orientation="Horizontal">
|
||||||
<StackPanel>
|
<RadioButton Margin="4" Theme="{StaticResource CardRadioButton}">
|
||||||
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
<StackPanel>
|
||||||
<TextBlock Classes="Tertiary">Description 1</TextBlock>
|
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
||||||
</StackPanel>
|
<TextBlock Classes="Tertiary">Description 1</TextBlock>
|
||||||
</RadioButton>
|
</StackPanel>
|
||||||
<RadioButton
|
</RadioButton>
|
||||||
Margin="4"
|
<RadioButton
|
||||||
IsChecked="True"
|
Margin="4"
|
||||||
Theme="{StaticResource CardRadioButton}">
|
IsChecked="True"
|
||||||
<StackPanel>
|
Theme="{StaticResource CardRadioButton}">
|
||||||
<TextBlock FontWeight="Bold">Option 2</TextBlock>
|
<StackPanel>
|
||||||
<TextBlock Classes="Tertiary">Description 2</TextBlock>
|
<TextBlock FontWeight="Bold">Option 2</TextBlock>
|
||||||
</StackPanel>
|
<TextBlock Classes="Tertiary">Description 2</TextBlock>
|
||||||
</RadioButton>
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Margin="4" Theme="{StaticResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 1</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Margin="4"
|
||||||
|
IsChecked="True"
|
||||||
|
Theme="{StaticResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 2</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 2</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" />
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<CheckBox Margin="0,0,8,0">Avalonia</CheckBox>
|
<StackPanel Orientation="Horizontal">
|
||||||
<CheckBox Margin="0,0,8,0" IsChecked="True">WPF</CheckBox>
|
<CheckBox Margin="0,0,8,0">Avalonia</CheckBox>
|
||||||
<CheckBox IsChecked="{x:Null}" IsThreeState="True">UWP</CheckBox>
|
<CheckBox Margin="0,0,8,0" IsChecked="True">WPF</CheckBox>
|
||||||
|
<CheckBox IsChecked="{x:Null}" IsThreeState="True">UWP</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox Margin="4" Theme="{StaticResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 1</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Margin="4"
|
||||||
|
IsChecked="True"
|
||||||
|
Theme="{StaticResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 2</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 2</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Margin="4"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{StaticResource CardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 3</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 3</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<CheckBox Margin="4" Theme="{StaticResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 1</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 1</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Margin="4"
|
||||||
|
IsChecked="True"
|
||||||
|
Theme="{StaticResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 2</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 2</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
<CheckBox
|
||||||
|
Margin="4"
|
||||||
|
IsChecked="{x:Null}"
|
||||||
|
IsThreeState="True"
|
||||||
|
Theme="{StaticResource PureCardCheckBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">Option 3</TextBlock>
|
||||||
|
<TextBlock Classes="Tertiary">Description 3</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
@@ -96,12 +170,16 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ComboBox Width="200" PlaceholderText="Please Select" />
|
<ComboBox Width="200" PlaceholderText="Please Select">
|
||||||
|
<ComboBoxItem>Item 1</ComboBoxItem>
|
||||||
|
<ComboBoxItem>Item 2</ComboBoxItem>
|
||||||
|
<ComboBoxItem>Item 3</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
<DatePicker />
|
<DatePicker />
|
||||||
<TimePicker />
|
<TimePicker />
|
||||||
<CalendarDatePicker />
|
<CalendarDatePicker />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid ColumnDefinitions="* * *">
|
<Grid ColumnDefinitions="*, *, *">
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
<TextBlock>Card</TextBlock>
|
<TextBlock>Card</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
|
x:CompileBindings="True"
|
||||||
|
x:DataType="viewModels:PaletteDemoViewModel"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:PaletteDemoViewModel />
|
<viewModels:PaletteDemoViewModel />
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
<controls:ColorDetailControl
|
<controls:ColorDetailControl
|
||||||
Background="{Binding SelectedColor.Brush}"
|
Background="{Binding SelectedColor.Brush}"
|
||||||
|
ColorResourceKey="{Binding SelectedColor.ColorResourceKey}"
|
||||||
IsVisible="{Binding SelectedColor, Converter={x:Static ObjectConverters.IsNotNull}}"
|
IsVisible="{Binding SelectedColor, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
ResourceKey="{Binding SelectedColor.ResourceKey}"
|
ResourceKey="{Binding SelectedColor.ResourceKey}"
|
||||||
ResourceName="{Binding SelectedColor.ColorDisplayName}" />
|
ResourceName="{Binding SelectedColor.ColorDisplayName}" />
|
||||||
@@ -60,7 +63,7 @@
|
|||||||
Theme="{DynamicResource TitleTextBlock}" />
|
Theme="{DynamicResource TitleTextBlock}" />
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem Header="Light">
|
<TabItem Header="Light">
|
||||||
<ItemsControl Margin="16" Items="{Binding LightLists}">
|
<ItemsControl Margin="16" ItemsSource="{Binding LightLists}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel Orientation="Horizontal" />
|
<WrapPanel Orientation="Horizontal" />
|
||||||
@@ -68,7 +71,7 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewModels:ColorListViewModel">
|
<DataTemplate x:DataType="viewModels:ColorListViewModel">
|
||||||
<ItemsControl Margin="4,0" Items="{Binding Color}">
|
<ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
|
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
|
||||||
<controls:ColorItemControl
|
<controls:ColorItemControl
|
||||||
@@ -84,7 +87,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Dark">
|
<TabItem Header="Dark">
|
||||||
<ItemsControl Margin="16" Items="{Binding DarkLists}">
|
<ItemsControl Margin="16" ItemsSource="{Binding DarkLists}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel Orientation="Horizontal" />
|
<WrapPanel Orientation="Horizontal" />
|
||||||
@@ -92,7 +95,7 @@
|
|||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewModels:ColorListViewModel">
|
<DataTemplate x:DataType="viewModels:ColorListViewModel">
|
||||||
<ItemsControl Margin="4,0" Items="{Binding Color}">
|
<ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
|
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
|
||||||
<controls:ColorItemControl
|
<controls:ColorItemControl
|
||||||
@@ -109,7 +112,7 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<ItemsControl Items="{Binding FunctionalColors}">
|
<ItemsControl ItemsSource="{Binding FunctionalColors}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
|||||||
@@ -5,73 +5,163 @@
|
|||||||
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"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<ScrollViewer>
|
||||||
<TextBlock Text="Radio Buttons" />
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<StackPanel>
|
<TextBlock Text="Radio Buttons" />
|
||||||
<RadioButton>111</RadioButton>
|
|
||||||
<RadioButton>222</RadioButton>
|
|
||||||
<RadioButton>333</RadioButton>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="Radio Button as Button" />
|
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton>
|
<RadioButton>Unchecked</RadioButton>
|
||||||
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小2</RadioButton>
|
<RadioButton IsChecked="True">Checked</RadioButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton>
|
<RadioButton IsEnabled="False">Unchecked</RadioButton>
|
||||||
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认2</RadioButton>
|
<RadioButton IsChecked="True" IsEnabled="False">Checked</RadioButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
<TextBlock Text="Radio Button as Button" />
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton>
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大2</RadioButton>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Classes="Small"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsChecked="True">
|
||||||
|
小2
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton
|
||||||
|
Classes="Small"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsEnabled="False">
|
||||||
|
小1
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Classes="Small"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False">
|
||||||
|
小2
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton>
|
||||||
|
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsChecked="True">默认2</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsEnabled="False">默认1</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsEnabled="False"
|
||||||
|
IsChecked="True">
|
||||||
|
默认2
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Classes="Large"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsChecked="True">
|
||||||
|
大2
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton
|
||||||
|
Classes="Large"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsEnabled="False">
|
||||||
|
大1
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
Classes="Large"
|
||||||
|
Theme="{DynamicResource ButtonRadioButton}"
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False">
|
||||||
|
大2
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="Radio Button as Card" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource CardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource CardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False"
|
||||||
|
Width="300"
|
||||||
|
Theme="{DynamicResource CardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="Radio Button as Pure Card" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
|
<RadioButton
|
||||||
|
IsChecked="True"
|
||||||
|
IsEnabled="False"
|
||||||
|
Width="300"
|
||||||
|
Theme="{DynamicResource PureCardRadioButton}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
||||||
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</RadioButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
|
||||||
<TextBlock Text="Radio Button as Card" />
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="Radio Button as Pure Card" />
|
</ScrollViewer>
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
|
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</RadioButton>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -62,6 +62,15 @@
|
|||||||
TickFrequency="10"
|
TickFrequency="10"
|
||||||
TickPlacement="TopLeft"
|
TickPlacement="TopLeft"
|
||||||
Value="0" />
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsSnapToTickEnabled="True"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
TickPlacement="Outside"
|
||||||
|
Value="0" />
|
||||||
<Slider
|
<Slider
|
||||||
Height="300"
|
Height="300"
|
||||||
Classes="ToolTip"
|
Classes="ToolTip"
|
||||||
@@ -71,6 +80,22 @@
|
|||||||
TickFrequency="10"
|
TickFrequency="10"
|
||||||
TickPlacement="TopLeft"
|
TickPlacement="TopLeft"
|
||||||
Value="0" />
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsDirectionReversed="True"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
Value="0" />
|
||||||
|
<Slider
|
||||||
|
Height="300"
|
||||||
|
IsEnabled="False"
|
||||||
|
Maximum="100"
|
||||||
|
Minimum="0"
|
||||||
|
Orientation="Vertical"
|
||||||
|
TickFrequency="10"
|
||||||
|
Value="30" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
Content="Placement"
|
Content="Placement"
|
||||||
IsChecked="{Binding !IsLeft}"
|
|
||||||
OffContent="Left"
|
OffContent="Left"
|
||||||
OnContent="Right" />
|
OnContent="Right" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.TextBlockDemo" xmlns="https://github.com/avaloniaui"
|
x:Class="Semi.Avalonia.Demo.Pages.TextBlockDemo"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="600"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
d:DesignWidth="800" mc:Ignorable="d">
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="600"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="20" HorizontalAlignment="Left"
|
Margin="20"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Spacing="5">
|
Spacing="5">
|
||||||
<TextBlock>Styles for TextBlock</TextBlock>
|
<TextBlock>Styles for TextBlock</TextBlock>
|
||||||
<TextBlock Classes="H1" Theme="{StaticResource TitleTextBlock}">Header 1</TextBlock>
|
<TextBlock Classes="H1" Theme="{StaticResource TitleTextBlock}">Header 1</TextBlock>
|
||||||
@@ -20,15 +25,18 @@
|
|||||||
<TextBlock Classes="Tertiary">Tertiary</TextBlock>
|
<TextBlock Classes="Tertiary">Tertiary</TextBlock>
|
||||||
<TextBlock Classes="Quaternary">Quaternary</TextBlock>
|
<TextBlock Classes="Quaternary">Quaternary</TextBlock>
|
||||||
<TextBlock Classes="Warning">Warning</TextBlock>
|
<TextBlock Classes="Warning">Warning</TextBlock>
|
||||||
|
<TextBlock Classes="Warning" IsEnabled="False">Warning disabled</TextBlock>
|
||||||
<TextBlock Classes="Danger">Danger</TextBlock>
|
<TextBlock Classes="Danger">Danger</TextBlock>
|
||||||
<TextBlock Classes="Success">Success</TextBlock>
|
<TextBlock Classes="Success">Success</TextBlock>
|
||||||
<TextBlock IsEnabled="False">Disabled</TextBlock>
|
<TextBlock IsEnabled="False">Disabled</TextBlock>
|
||||||
<TextBlock Classes="Mark">Default Mark</TextBlock>
|
<TextBlock Classes="Mark">Default Mark</TextBlock>
|
||||||
<TextBlock Classes="Underline">Underline</TextBlock>
|
<TextBlock Classes="Underline">Underline</TextBlock>
|
||||||
<TextBlock Classes="Delete">Delete</TextBlock>
|
<TextBlock Classes="Delete">Delete</TextBlock>
|
||||||
|
<TextBlock Classes="Underline Delete">Underline and Delete</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="20" HorizontalAlignment="Left"
|
Margin="20"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Spacing="5">
|
Spacing="5">
|
||||||
<TextBlock>Styles for SelectableTextBlock</TextBlock>
|
<TextBlock>Styles for SelectableTextBlock</TextBlock>
|
||||||
<SelectableTextBlock Classes="H1" Theme="{StaticResource TitleSelectableTextBlock}">Header 1</SelectableTextBlock>
|
<SelectableTextBlock Classes="H1" Theme="{StaticResource TitleSelectableTextBlock}">Header 1</SelectableTextBlock>
|
||||||
@@ -43,15 +51,18 @@
|
|||||||
<SelectableTextBlock Classes="Tertiary">Tertiary</SelectableTextBlock>
|
<SelectableTextBlock Classes="Tertiary">Tertiary</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Quaternary">Quaternary</SelectableTextBlock>
|
<SelectableTextBlock Classes="Quaternary">Quaternary</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Warning">Warning</SelectableTextBlock>
|
<SelectableTextBlock Classes="Warning">Warning</SelectableTextBlock>
|
||||||
|
<SelectableTextBlock Classes="Warning" IsEnabled="False">Warning disabled</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Danger">Danger</SelectableTextBlock>
|
<SelectableTextBlock Classes="Danger">Danger</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Success">Success</SelectableTextBlock>
|
<SelectableTextBlock Classes="Success">Success</SelectableTextBlock>
|
||||||
<SelectableTextBlock IsEnabled="False">Disabled</SelectableTextBlock>
|
<SelectableTextBlock IsEnabled="False">Disabled</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Mark">Default Mark</SelectableTextBlock>
|
<SelectableTextBlock Classes="Mark">Default Mark</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Underline">Underline</SelectableTextBlock>
|
<SelectableTextBlock Classes="Underline">Underline</SelectableTextBlock>
|
||||||
<SelectableTextBlock Classes="Delete">Delete</SelectableTextBlock>
|
<SelectableTextBlock Classes="Delete">Delete</SelectableTextBlock>
|
||||||
|
<SelectableTextBlock Classes="Underline Delete">Underline and Delete</SelectableTextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="20" HorizontalAlignment="Left"
|
Margin="20"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Spacing="5">
|
Spacing="5">
|
||||||
<TextBlock>Styles for Label</TextBlock>
|
<TextBlock>Styles for Label</TextBlock>
|
||||||
<Label Classes="H1" Theme="{StaticResource TitleLabel}">Header 1</Label>
|
<Label Classes="H1" Theme="{StaticResource TitleLabel}">Header 1</Label>
|
||||||
@@ -66,6 +77,7 @@
|
|||||||
<Label Classes="Tertiary">Tertiary</Label>
|
<Label Classes="Tertiary">Tertiary</Label>
|
||||||
<Label Classes="Quaternary">Quaternary</Label>
|
<Label Classes="Quaternary">Quaternary</Label>
|
||||||
<Label Classes="Warning">Warning</Label>
|
<Label Classes="Warning">Warning</Label>
|
||||||
|
<Label Classes="Warning" IsEnabled="False">Warning disabled</Label>
|
||||||
<Label Classes="Danger">Danger</Label>
|
<Label Classes="Danger">Danger</Label>
|
||||||
<Label Classes="Success">Success</Label>
|
<Label Classes="Success">Success</Label>
|
||||||
<Label IsEnabled="False">Disabled</Label>
|
<Label IsEnabled="False">Disabled</Label>
|
||||||
|
|||||||
@@ -1,26 +1,46 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.TextBoxDemo" xmlns="https://github.com/avaloniaui"
|
x:Class="Semi.Avalonia.Demo.Pages.TextBoxDemo"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="450"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
d:DesignWidth="800" mc:Ignorable="d">
|
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">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<TextBox Width="300" />
|
<TextBox Width="300" />
|
||||||
|
<TextBox Width="300" Classes="Large" />
|
||||||
|
<TextBox Width="300" Classes="Small" />
|
||||||
<TextBox Width="300" Watermark="Please use this" />
|
<TextBox Width="300" Watermark="Please use this" />
|
||||||
<TextBox Width="300" InnerLeftContent="http://" />
|
<TextBox Width="300" InnerLeftContent="http://" />
|
||||||
<TextBox Width="300" InnerRightContent=".com" />
|
<TextBox Width="300" InnerRightContent=".com" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="500" InnerLeftContent="http://"
|
Width="500"
|
||||||
|
InnerLeftContent="http://"
|
||||||
InnerRightContent=".com" />
|
InnerRightContent=".com" />
|
||||||
<TextBox Width="300" Classes="clearButton" />
|
<TextBox Width="300" Classes="clearButton" />
|
||||||
<TextBox Width="300" PasswordChar="*" />
|
<TextBox Width="300" PasswordChar="*" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="300" Classes="revealPasswordButton"
|
Width="300"
|
||||||
|
Classes="revealPasswordButton"
|
||||||
PasswordChar="*" />
|
PasswordChar="*" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="500" InnerLeftContent="http://"
|
Width="500"
|
||||||
|
InnerLeftContent="http://"
|
||||||
InnerRightContent=".com"
|
InnerRightContent=".com"
|
||||||
Theme="{StaticResource BorderlessTextBox}" />
|
IsEnabled="False" />
|
||||||
|
<TextBox
|
||||||
|
Width="500"
|
||||||
|
Classes="Bordered"
|
||||||
|
InnerLeftContent="http://"
|
||||||
|
InnerRightContent=".com" />
|
||||||
|
<TextBox
|
||||||
|
Width="500"
|
||||||
|
Classes="Bordered"
|
||||||
|
InnerLeftContent="http://"
|
||||||
|
InnerRightContent=".com"
|
||||||
|
IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace Semi.Avalonia.Demo.Pages;
|
|||||||
|
|
||||||
public partial class ThemeVariantDemo : UserControl
|
public partial class ThemeVariantDemo : UserControl
|
||||||
{
|
{
|
||||||
private ThemeVariant _variant = ThemeVariant.Default;
|
|
||||||
public ThemeVariantDemo()
|
public ThemeVariantDemo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -16,15 +15,6 @@ public partial class ThemeVariantDemo : UserControl
|
|||||||
|
|
||||||
private void Switch_OnIsCheckedChanged(object sender, RoutedEventArgs e)
|
private void Switch_OnIsCheckedChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (_variant == ThemeVariant.Dark)
|
scope.RequestedThemeVariant = scope.ActualThemeVariant == ThemeVariant.Dark ? ThemeVariant.Light : ThemeVariant.Dark;
|
||||||
{
|
|
||||||
scope.RequestedThemeVariant = ThemeVariant.Default;
|
|
||||||
_variant = ThemeVariant.Default;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
scope.RequestedThemeVariant = ThemeVariant.Dark;
|
|
||||||
_variant = ThemeVariant.Dark;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,5 +12,7 @@
|
|||||||
<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="Small" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -7,23 +7,36 @@
|
|||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel>
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Toggle Button" />
|
<TextBlock Text="Toggle Button (Default)" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton>Primary</ToggleButton>
|
<ToggleButton>Default</ToggleButton>
|
||||||
|
<ToggleButton Classes="Primary">Primary</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
|
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
|
||||||
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Error">Error</ToggleButton>
|
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<TextBlock Text="Toggle Button Checked State" />
|
||||||
<TextBlock Margin="0,20,0,0" Text="Toggle Button Three State" />
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton Name="button" IsThreeState="True">Primary</ToggleButton>
|
<ToggleButton IsChecked="True">Default</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary" IsThreeState="True">Secondary</ToggleButton>
|
<ToggleButton Classes="Primary" IsChecked="True">Primary</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary" IsThreeState="True">Tertiary</ToggleButton>
|
<ToggleButton Classes="Secondary" IsChecked="True">Secondary</ToggleButton>
|
||||||
<ToggleButton Classes="Warning" IsThreeState="True">Warning</ToggleButton>
|
<ToggleButton Classes="Tertiary" IsChecked="True">Tertiary</ToggleButton>
|
||||||
<ToggleButton Classes="Error" IsThreeState="True">Error</ToggleButton>
|
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsChecked="True" IsEnabled="False">Danger</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="Toggle Button Three State" />
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<ToggleButton IsThreeState="True" IsChecked="{x:Null}">Default</ToggleButton>
|
||||||
|
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}" IsEnabled="False">Danger</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -24,5 +24,26 @@
|
|||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
OffContent="OffContent"
|
OffContent="OffContent"
|
||||||
OnContent="OnContent" />
|
OnContent="OnContent" />
|
||||||
|
<ToggleSwitch
|
||||||
|
Theme="{DynamicResource SimpleToggleSwitch}"
|
||||||
|
Content="Content"
|
||||||
|
OffContent="OffContent"
|
||||||
|
OnContent="OnContent" />
|
||||||
|
<ToggleSwitch Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
|
<ToggleSwitch.OnContent>
|
||||||
|
<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"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OnContent>
|
||||||
|
<ToggleSwitch.OffContent>
|
||||||
|
<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"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OffContent>
|
||||||
|
</ToggleSwitch>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Tip="This is a ToolTip">
|
ToolTip.Tip="This is a ToolTip">
|
||||||
<TextBlock>Hover Here</TextBlock>
|
<TextBlock>Hover Here</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -23,7 +24,8 @@
|
|||||||
Name="Border"
|
Name="Border"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Bottom">
|
ToolTip.Placement="Bottom">
|
||||||
<ToolTip.Tip>
|
<ToolTip.Tip>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@@ -36,7 +38,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Top"
|
ToolTip.Placement="Top"
|
||||||
ToolTip.Tip="Hello">
|
ToolTip.Tip="Hello">
|
||||||
<Border.Styles>
|
<Border.Styles>
|
||||||
@@ -60,7 +63,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Top"
|
ToolTip.Placement="Top"
|
||||||
ToolTip.Tip="Hello">
|
ToolTip.Tip="Hello">
|
||||||
<TextBlock>Top</TextBlock>
|
<TextBlock>Top</TextBlock>
|
||||||
@@ -68,7 +72,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Left"
|
ToolTip.Placement="Left"
|
||||||
ToolTip.Tip="Hello">
|
ToolTip.Tip="Hello">
|
||||||
<TextBlock>Left</TextBlock>
|
<TextBlock>Left</TextBlock>
|
||||||
@@ -76,7 +81,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Right"
|
ToolTip.Placement="Right"
|
||||||
ToolTip.Tip="Hello">
|
ToolTip.Tip="Hello">
|
||||||
<TextBlock>Right</TextBlock>
|
<TextBlock>Right</TextBlock>
|
||||||
@@ -84,7 +90,8 @@
|
|||||||
<Border
|
<Border
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="50,10"
|
Padding="50,10"
|
||||||
Background="Yellow"
|
Classes="Hover"
|
||||||
|
Theme="{StaticResource CardBorder}"
|
||||||
ToolTip.Placement="Bottom"
|
ToolTip.Placement="Bottom"
|
||||||
ToolTip.Tip="Hello">
|
ToolTip.Tip="Hello">
|
||||||
<TextBlock>Bottom</TextBlock>
|
<TextBlock>Bottom</TextBlock>
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo" xmlns="https://github.com/avaloniaui"
|
x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="450"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
d:DesignWidth="800" mc:Ignorable="d">
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
<Panel>
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Panel HorizontalAlignment="Left">
|
||||||
<TreeView>
|
<TreeView>
|
||||||
<TreeViewItem Header="Level 1">
|
<TreeViewItem Header="Level 1">
|
||||||
<TreeViewItem Header="Level 2" />
|
<TreeViewItem Header="Level 2" />
|
||||||
|
|||||||
@@ -11,12 +11,11 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia.Controls.DataGrid" 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-preview5" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
||||||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,35 +1,5 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="ThemeToggleButton" TargetType="ToggleButton">
|
|
||||||
<Setter Property="ToggleButton.Template">
|
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
|
||||||
<Border
|
|
||||||
Name="Background"
|
|
||||||
Padding="8"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
CornerRadius="3">
|
|
||||||
<PathIcon
|
|
||||||
Name="Icon"
|
|
||||||
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"
|
|
||||||
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
<Style Selector="^:pointerover">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:checked">
|
|
||||||
<Style Selector="^ /template/ PathIcon">
|
|
||||||
<Setter Property="PathIcon.Data" Value="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" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
|
|
||||||
<ControlTheme x:Key="SplitViewToggleButton" TargetType="ToggleButton">
|
<ControlTheme x:Key="SplitViewToggleButton" TargetType="ToggleButton">
|
||||||
<Setter Property="ToggleButton.Template">
|
<Setter Property="ToggleButton.Template">
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
|||||||
@@ -11,11 +11,17 @@ namespace Semi.Avalonia.Demo.ViewModels;
|
|||||||
|
|
||||||
public class PaletteDemoViewModel: ObservableObject
|
public class PaletteDemoViewModel: ObservableObject
|
||||||
{
|
{
|
||||||
private readonly string[] _predefinedColorNames = { "Amber","Blue","Cyan","Green","Grey","Indigo","LightBlue","LightGreen","Lime","Orange","Pink","Purple","Red","Teal","Violet","Yellow" };
|
private readonly string[] _predefinedColorNames =
|
||||||
private IResourceDictionary _lightResourceDictionary;
|
{
|
||||||
private IResourceDictionary _darkResourceDictionary;
|
"Red", "Pink", "Purple", "Violet", "Indigo",
|
||||||
|
"Blue", "LightBlue", "Cyan", "Teal", "Green",
|
||||||
|
"LightGreen", "Lime", "Yellow", "Amber", "Orange",
|
||||||
|
"Grey"
|
||||||
|
};
|
||||||
|
private readonly IResourceDictionary? _lightResourceDictionary;
|
||||||
|
private readonly IResourceDictionary? _darkResourceDictionary;
|
||||||
|
|
||||||
private ColorItemViewModel _selectedColor;
|
private ColorItemViewModel _selectedColor = null!;
|
||||||
|
|
||||||
public ColorItemViewModel SelectedColor
|
public ColorItemViewModel SelectedColor
|
||||||
{
|
{
|
||||||
@@ -24,14 +30,14 @@ public class PaletteDemoViewModel: ObservableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ObservableCollection<ColorListViewModel> _lightLists;
|
private ObservableCollection<ColorListViewModel>? _lightLists;
|
||||||
public ObservableCollection<ColorListViewModel> LightLists
|
public ObservableCollection<ColorListViewModel>? LightLists
|
||||||
{
|
{
|
||||||
get => _lightLists;
|
get => _lightLists;
|
||||||
set => SetProperty(ref _lightLists, value);
|
set => SetProperty(ref _lightLists, value);
|
||||||
}
|
}
|
||||||
private ObservableCollection<ColorListViewModel> _darkLists;
|
private ObservableCollection<ColorListViewModel>? _darkLists;
|
||||||
public ObservableCollection<ColorListViewModel> DarkLists
|
public ObservableCollection<ColorListViewModel>? DarkLists
|
||||||
{
|
{
|
||||||
get => _darkLists;
|
get => _darkLists;
|
||||||
set => SetProperty(ref _darkLists, value);
|
set => SetProperty(ref _darkLists, value);
|
||||||
@@ -41,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
|
|||||||
|
|
||||||
public PaletteDemoViewModel()
|
public PaletteDemoViewModel()
|
||||||
{
|
{
|
||||||
_lightResourceDictionary = (ResourceDictionary)AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml"));
|
_lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
|
||||||
_darkResourceDictionary = (ResourceDictionary)AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml"));
|
_darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
|
||||||
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,8 +116,12 @@ public class ColorListViewModel: ObservableObject
|
|||||||
set => SetProperty(ref _seriesName, value);
|
set => SetProperty(ref _seriesName, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Initialize(IResourceDictionary resourceDictionary, string color, bool light)
|
internal void Initialize(IResourceDictionary? resourceDictionary, string color, bool light)
|
||||||
{
|
{
|
||||||
|
if (resourceDictionary is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
SeriesName = color;
|
SeriesName = color;
|
||||||
Color = new ObservableCollection<ColorItemViewModel>();
|
Color = new ObservableCollection<ColorItemViewModel>();
|
||||||
|
|
||||||
@@ -124,6 +134,7 @@ public class ColorListViewModel: ObservableObject
|
|||||||
{
|
{
|
||||||
string name = color + " " + i;
|
string name = color + " " + i;
|
||||||
var item = new ColorItemViewModel(name, brush, key, light, i);
|
var item = new ColorItemViewModel(name, brush, key, light, i);
|
||||||
|
item.ColorResourceKey = item.ResourceKey + "Color";
|
||||||
Color.Add(item);
|
Color.Add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,28 +145,28 @@ public class ColorListViewModel: ObservableObject
|
|||||||
public class ColorItemViewModel : ObservableObject
|
public class ColorItemViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
|
|
||||||
private IBrush _brush;
|
private IBrush _brush = null!;
|
||||||
public IBrush Brush
|
public IBrush Brush
|
||||||
{
|
{
|
||||||
get => _brush;
|
get => _brush;
|
||||||
set => SetProperty(ref _brush, value);
|
set => SetProperty(ref _brush, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBrush _textBrush;
|
private IBrush _textBrush = null!;
|
||||||
public IBrush TextBrush
|
public IBrush TextBrush
|
||||||
{
|
{
|
||||||
get => _textBrush;
|
get => _textBrush;
|
||||||
set => SetProperty(ref _textBrush, value);
|
set => SetProperty(ref _textBrush, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _colorDisplayName;
|
private string _colorDisplayName = null!;
|
||||||
public string ColorDisplayName
|
public string ColorDisplayName
|
||||||
{
|
{
|
||||||
get => _colorDisplayName;
|
get => _colorDisplayName;
|
||||||
set => SetProperty(ref _colorDisplayName, value);
|
set => SetProperty(ref _colorDisplayName, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _resourceKey;
|
private string _resourceKey = null!;
|
||||||
|
|
||||||
public string ResourceKey
|
public string ResourceKey
|
||||||
{
|
{
|
||||||
@@ -163,7 +174,15 @@ public class ColorItemViewModel : ObservableObject
|
|||||||
set => SetProperty(ref _resourceKey, value);
|
set => SetProperty(ref _resourceKey, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _hex;
|
private string _colorResourceKey = null!;
|
||||||
|
|
||||||
|
public string ColorResourceKey
|
||||||
|
{
|
||||||
|
get => _colorResourceKey;
|
||||||
|
set => SetProperty(ref _colorResourceKey, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _hex = null!;
|
||||||
|
|
||||||
public string Hex
|
public string Hex
|
||||||
{
|
{
|
||||||
@@ -177,7 +196,7 @@ public class ColorItemViewModel : ObservableObject
|
|||||||
Brush = brush;
|
Brush = brush;
|
||||||
ResourceKey = resourceKey;
|
ResourceKey = resourceKey;
|
||||||
Hex = brush.ToString().ToUpperInvariant();
|
Hex = brush.ToString().ToUpperInvariant();
|
||||||
if ((light && index < 5) || (!light && index > 5))
|
if ((light && index < 5) || (!light && index >= 5))
|
||||||
{
|
{
|
||||||
TextBrush = Brushes.Black;
|
TextBrush = Brushes.Black;
|
||||||
}
|
}
|
||||||
@@ -190,7 +209,7 @@ public class ColorItemViewModel : ObservableObject
|
|||||||
|
|
||||||
public class FunctionalColorGroupViewModel : ObservableObject
|
public class FunctionalColorGroupViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
private string _title;
|
private string _title = null!;
|
||||||
public string Title
|
public string Title
|
||||||
{
|
{
|
||||||
get => _title;
|
get => _title;
|
||||||
@@ -200,21 +219,22 @@ public class FunctionalColorGroupViewModel : ObservableObject
|
|||||||
public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = new();
|
public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = new();
|
||||||
public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = new();
|
public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = new();
|
||||||
|
|
||||||
public FunctionalColorGroupViewModel(string title, IResourceDictionary lightDictionary, IResourceDictionary darkDictionary, IReadOnlyList<Tuple<string, string>> tokens)
|
public FunctionalColorGroupViewModel(string title, IResourceDictionary? lightDictionary, IResourceDictionary? darkDictionary, IReadOnlyList<Tuple<string, string>> tokens)
|
||||||
{
|
{
|
||||||
Title = title;
|
Title = title;
|
||||||
foreach (var token in tokens)
|
foreach (var token in tokens)
|
||||||
{
|
{
|
||||||
string key = token.Item1;
|
string key = token.Item1;
|
||||||
string name = token.Item2;
|
string name = token.Item2;
|
||||||
if (lightDictionary.TryGetValue(key, out var lightValue))
|
if (lightDictionary?.TryGetValue(key, out var lightValue) ?? false)
|
||||||
{
|
{
|
||||||
if (lightValue is ISolidColorBrush lightBrush)
|
if (lightValue is ISolidColorBrush lightBrush)
|
||||||
{
|
{
|
||||||
LightColors.Add(new ColorItemViewModel(name, lightBrush, key, true, 0));
|
LightColors.Add(new ColorItemViewModel(name, lightBrush, key, true, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (darkDictionary.TryGetValue(key, out var darkValue))
|
|
||||||
|
if (darkDictionary?.TryGetValue(key, out var darkValue) ?? false)
|
||||||
{
|
{
|
||||||
if (darkValue is ISolidColorBrush darkBrush)
|
if (darkValue is ISolidColorBrush darkBrush)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,10 +38,26 @@
|
|||||||
Classes="Secondary"
|
Classes="Secondary"
|
||||||
Text="{Binding #tab.SelectedItem.Header}" />
|
Text="{Binding #tab.SelectedItem.Header}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ToggleButton
|
<ToggleSwitch
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Padding="4"
|
||||||
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
||||||
Theme="{DynamicResource ThemeToggleButton}" />
|
Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
|
<ToggleSwitch.OnContent>
|
||||||
|
<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"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OnContent>
|
||||||
|
<ToggleSwitch.OffContent>
|
||||||
|
<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"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OffContent>
|
||||||
|
</ToggleSwitch>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
BIN
docs/Dark.png
BIN
docs/Dark.png
Binary file not shown.
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 189 KiB |
BIN
docs/Light.png
BIN
docs/Light.png
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 148 KiB |
13
src/Package.props
Normal file
13
src/Package.props
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<LangVersion>10</LangVersion>
|
||||||
|
<Version>0.1.0-preview7</Version>
|
||||||
|
<Authors>IRIHI Technology</Authors>
|
||||||
|
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
||||||
|
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||||
|
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="using:Avalonia.Controls"
|
xmlns:controls="using:Avalonia.Controls"
|
||||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
xmlns:primitives="using:Avalonia.Controls.Primitives">
|
xmlns:primitives="using:Avalonia.Controls.Primitives"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
|
||||||
@@ -60,7 +61,7 @@
|
|||||||
</Panel>
|
</Panel>
|
||||||
</DropDownButton.Content>
|
</DropDownButton.Content>
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton.Flyout>
|
||||||
<Flyout FlyoutPresenterClasses="nopadding" Placement="Auto">
|
<Flyout FlyoutPresenterClasses="nopadding" Placement="AnchorAndGravity">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The following is copy-pasted from the ColorView's control template.
|
The following is copy-pasted from the ColorView's control template.
|
||||||
@@ -187,7 +188,7 @@
|
|||||||
Margin="12"
|
Margin="12"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
ItemContainerTheme="{DynamicResource ColorViewPaletteListBoxItemTheme}"
|
ItemContainerTheme="{DynamicResource ColorViewPaletteListBoxItemTheme}"
|
||||||
Items="{TemplateBinding PaletteColors}"
|
ItemsSource="{TemplateBinding PaletteColors}"
|
||||||
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
|
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
|
||||||
Theme="{DynamicResource ColorViewPaletteListBoxTheme}"
|
Theme="{DynamicResource ColorViewPaletteListBoxTheme}"
|
||||||
UseLayoutRounding="False">
|
UseLayoutRounding="False">
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
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:converters="using:Avalonia.Controls.Converters"
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
xmlns:pc="using:Avalonia.Controls.Primitives.Converters">
|
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<pc:AccentColorConverter x:Key="AccentColorConverter" />
|
<pc:AccentColorConverter x:Key="AccentColorConverter" />
|
||||||
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
|
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
|
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
|
||||||
@@ -9,6 +10,7 @@
|
|||||||
|
|
||||||
<ControlTheme x:Key="ColorSliderThumbTheme" TargetType="Thumb">
|
<ControlTheme x:Key="ColorSliderThumbTheme" TargetType="Thumb">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="UseLayoutRounding" Value="False" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" />
|
||||||
<Setter Property="CornerRadius" Value="999" />
|
<Setter Property="CornerRadius" Value="999" />
|
||||||
@@ -16,9 +18,11 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<Border
|
<Border
|
||||||
|
Margin="1"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource ColorSliderBoxShadow}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -38,6 +42,8 @@
|
|||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid Margin="{TemplateBinding Padding}">
|
<Grid Margin="{TemplateBinding Padding}">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
Width="{Binding #PART_Track.Bounds.Width}"
|
||||||
|
Height="{Binding #PART_Track.Bounds.Height}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||||
@@ -46,6 +52,8 @@
|
|||||||
RadiusY="{TemplateBinding CornerRadius,
|
RadiusY="{TemplateBinding CornerRadius,
|
||||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
Width="{Binding #PART_Track.Bounds.Width}"
|
||||||
|
Height="{Binding #PART_Track.Bounds.Height}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Fill="{TemplateBinding Background}"
|
Fill="{TemplateBinding Background}"
|
||||||
@@ -55,6 +63,7 @@
|
|||||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||||
<Track
|
<Track
|
||||||
Name="PART_Track"
|
Name="PART_Track"
|
||||||
|
Height="12"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||||
@@ -124,6 +133,8 @@
|
|||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid Margin="{TemplateBinding Padding}">
|
<Grid Margin="{TemplateBinding Padding}">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
Width="{Binding #PART_Track.Bounds.Width}"
|
||||||
|
Height="{Binding #PART_Track.Bounds.Height}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
|
||||||
@@ -132,6 +143,8 @@
|
|||||||
RadiusY="{TemplateBinding CornerRadius,
|
RadiusY="{TemplateBinding CornerRadius,
|
||||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
Width="{Binding #PART_Track.Bounds.Width}"
|
||||||
|
Height="{Binding #PART_Track.Bounds.Height}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Fill="{TemplateBinding Background}"
|
Fill="{TemplateBinding Background}"
|
||||||
@@ -141,6 +154,7 @@
|
|||||||
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
Converter={StaticResource BottomRightCornerRadiusConverter}}" />
|
||||||
<Track
|
<Track
|
||||||
Name="PART_Track"
|
Name="PART_Track"
|
||||||
|
Width="12"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
|
||||||
@@ -211,9 +225,11 @@
|
|||||||
|
|
||||||
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb">
|
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDarkBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDarkBorderBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ColorSliderLightBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb">
|
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderLightBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderLightBorderBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ColorSliderDarkBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
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:controls="using:Avalonia.Controls"
|
xmlns:controls="using:Avalonia.Controls"
|
||||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
|
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
|
||||||
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
|
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
xmlns:globalization="using:System.Globalization"
|
xmlns:globalization="using:System.Globalization"
|
||||||
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
|
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
|
||||||
xmlns:primitives="using:Avalonia.Controls.Primitives">
|
xmlns:primitives="using:Avalonia.Controls.Primitives"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
|
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
|
||||||
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
|
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
|
||||||
@@ -279,7 +280,7 @@
|
|||||||
Margin="12"
|
Margin="12"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
ItemContainerTheme="{StaticResource ColorViewPaletteListBoxItemTheme}"
|
ItemContainerTheme="{StaticResource ColorViewPaletteListBoxItemTheme}"
|
||||||
Items="{TemplateBinding PaletteColors}"
|
ItemsSource="{TemplateBinding PaletteColors}"
|
||||||
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
|
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
|
||||||
Theme="{StaticResource ColorViewPaletteListBoxTheme}"
|
Theme="{StaticResource ColorViewPaletteListBoxTheme}"
|
||||||
UseLayoutRounding="False">
|
UseLayoutRounding="False">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" />
|
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" />
|
||||||
@@ -29,8 +32,9 @@
|
|||||||
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
||||||
|
|
||||||
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
||||||
<CornerRadius x:Key="ColorSliderCornerRadius">8</CornerRadius>
|
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
|
||||||
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
|
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
|
||||||
|
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
|
||||||
@@ -40,4 +44,6 @@
|
|||||||
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
||||||
|
|
||||||
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
|
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
|
||||||
|
|
||||||
|
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
||||||
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" />
|
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" />
|
||||||
@@ -29,8 +32,9 @@
|
|||||||
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
|
||||||
|
|
||||||
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
<x:Double x:Key="ColorSliderWidth">16</x:Double>
|
||||||
<CornerRadius x:Key="ColorSliderCornerRadius">8</CornerRadius>
|
<CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
|
||||||
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
|
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
|
||||||
|
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #1A000000</BoxShadows>
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
|
||||||
@@ -40,4 +44,5 @@
|
|||||||
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
|
||||||
|
|
||||||
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1A000000</BoxShadows>
|
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1A000000</BoxShadows>
|
||||||
|
<colorPicker:SemiColorLightPalette x:Key="SemiColorPalette" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="../Package.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
|
||||||
<LangVersion>10</LangVersion>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<Version>0.1.0-preview5.1</Version>
|
|
||||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||||
<Authors>IRIHI Technology</Authors>
|
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview7</PackageReleaseNotes>
|
||||||
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
|
||||||
<PackageReleaseNotes>Initial Release</PackageReleaseNotes>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
231
src/Semi.Avalonia.ColorPicker/SemiColorDarkPalette.cs
Normal file
231
src/Semi.Avalonia.ColorPicker/SemiColorDarkPalette.cs
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Utilities;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.ColorPicker;
|
||||||
|
|
||||||
|
public class SemiColorDarkPalette: IColorPalette
|
||||||
|
{
|
||||||
|
private static readonly Color[,] Colors = new Color[,]
|
||||||
|
{
|
||||||
|
{
|
||||||
|
//Red
|
||||||
|
Color.FromUInt32(0xFF6C090B),
|
||||||
|
Color.FromUInt32(0xFF901110),
|
||||||
|
Color.FromUInt32(0xFFB42019),
|
||||||
|
Color.FromUInt32(0xFFD73324),
|
||||||
|
Color.FromUInt32(0xFFFB4932),
|
||||||
|
Color.FromUInt32(0xFFFC725A),
|
||||||
|
Color.FromUInt32(0xFFFD9983),
|
||||||
|
Color.FromUInt32(0xFFFDBEAC),
|
||||||
|
Color.FromUInt32(0xFFFEE0D5),
|
||||||
|
Color.FromUInt32(0xFFFFF3EF),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Pink
|
||||||
|
Color.FromUInt32(0xFF5C0730),
|
||||||
|
Color.FromUInt32(0xFF800E41),
|
||||||
|
Color.FromUInt32(0xFFA41751),
|
||||||
|
Color.FromUInt32(0xFFC72261),
|
||||||
|
Color.FromUInt32(0xFFEB2F71),
|
||||||
|
Color.FromUInt32(0xFFEF5686),
|
||||||
|
Color.FromUInt32(0xFFF37E9F),
|
||||||
|
Color.FromUInt32(0xFFF7A8BC),
|
||||||
|
Color.FromUInt32(0xFFFBD3DC),
|
||||||
|
Color.FromUInt32(0xFFFDEEF1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Purple
|
||||||
|
Color.FromUInt32(0xFF4A1061),
|
||||||
|
Color.FromUInt32(0xFF5E1776),
|
||||||
|
Color.FromUInt32(0xFF731F8A),
|
||||||
|
Color.FromUInt32(0xFF89289F),
|
||||||
|
Color.FromUInt32(0xFFA033B3),
|
||||||
|
Color.FromUInt32(0xFFB553C2),
|
||||||
|
Color.FromUInt32(0xFFCA78D1),
|
||||||
|
Color.FromUInt32(0xFFDDA0E1),
|
||||||
|
Color.FromUInt32(0xFFEFCEF0),
|
||||||
|
Color.FromUInt32(0xFFF7EBF7),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Violet
|
||||||
|
Color.FromUInt32(0xFF401B77),
|
||||||
|
Color.FromUInt32(0xFF4C248C),
|
||||||
|
Color.FromUInt32(0xFF582EA0),
|
||||||
|
Color.FromUInt32(0xFF6439B5),
|
||||||
|
Color.FromUInt32(0xFF7246C9),
|
||||||
|
Color.FromUInt32(0xFF8865D4),
|
||||||
|
Color.FromUInt32(0xFFA288DF),
|
||||||
|
Color.FromUInt32(0xFFBEADE9),
|
||||||
|
Color.FromUInt32(0xFFDDD4F4),
|
||||||
|
Color.FromUInt32(0xFFF1EEFA),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Indigo
|
||||||
|
Color.FromUInt32(0xFF171E65),
|
||||||
|
Color.FromUInt32(0xFF20297A),
|
||||||
|
Color.FromUInt32(0xFF29368E),
|
||||||
|
Color.FromUInt32(0xFF3444A3),
|
||||||
|
Color.FromUInt32(0xFF4053B7),
|
||||||
|
Color.FromUInt32(0xFF5F71C5),
|
||||||
|
Color.FromUInt32(0xFF8191D4),
|
||||||
|
Color.FromUInt32(0xFFA7B4E2),
|
||||||
|
Color.FromUInt32(0xFFD1D8F1),
|
||||||
|
Color.FromUInt32(0xFFEDEFF8),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Blue
|
||||||
|
Color.FromUInt32(0xFF053170),
|
||||||
|
Color.FromUInt32(0xFF0A4694),
|
||||||
|
Color.FromUInt32(0xFF135CB8),
|
||||||
|
Color.FromUInt32(0xFF1D75DB),
|
||||||
|
Color.FromUInt32(0xFF2990FF),
|
||||||
|
Color.FromUInt32(0xFF54A9FF),
|
||||||
|
Color.FromUInt32(0xFF7FC1FF),
|
||||||
|
Color.FromUInt32(0xFFA9D7FF),
|
||||||
|
Color.FromUInt32(0xFFD4ECFF),
|
||||||
|
Color.FromUInt32(0xFFEFF8FF),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//LightBlue
|
||||||
|
Color.FromUInt32(0xFF003761),
|
||||||
|
Color.FromUInt32(0xFF004D85),
|
||||||
|
Color.FromUInt32(0xFF0366A9),
|
||||||
|
Color.FromUInt32(0xFF0A81CC),
|
||||||
|
Color.FromUInt32(0xFF139FF0),
|
||||||
|
Color.FromUInt32(0xFF40B4F3),
|
||||||
|
Color.FromUInt32(0xFF6EC8F6),
|
||||||
|
Color.FromUInt32(0xFF9DDCF9),
|
||||||
|
Color.FromUInt32(0xFFCEEEFC),
|
||||||
|
Color.FromUInt32(0xFFEBF8FE),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Cyan
|
||||||
|
Color.FromUInt32(0xFF04343D),
|
||||||
|
Color.FromUInt32(0xFF074F5C),
|
||||||
|
Color.FromUInt32(0xFF0A6C7B),
|
||||||
|
Color.FromUInt32(0xFF0E8999),
|
||||||
|
Color.FromUInt32(0xFF13A8B8),
|
||||||
|
Color.FromUInt32(0xFF38BBC6),
|
||||||
|
Color.FromUInt32(0xFF62CDD4),
|
||||||
|
Color.FromUInt32(0xFF91DFE3),
|
||||||
|
Color.FromUInt32(0xFFC6EFF1),
|
||||||
|
Color.FromUInt32(0xFFE7F7F8),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Teal
|
||||||
|
Color.FromUInt32(0xFF023C39),
|
||||||
|
Color.FromUInt32(0xFF045A55),
|
||||||
|
Color.FromUInt32(0xFF07776F),
|
||||||
|
Color.FromUInt32(0xFF0A9588),
|
||||||
|
Color.FromUInt32(0xFF0EB3A1),
|
||||||
|
Color.FromUInt32(0xFF33C2B0),
|
||||||
|
Color.FromUInt32(0xFF5ED1C1),
|
||||||
|
Color.FromUInt32(0xFF8EE1D3),
|
||||||
|
Color.FromUInt32(0xFFC4F0E8),
|
||||||
|
Color.FromUInt32(0xFFE6F7F4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Green
|
||||||
|
Color.FromUInt32(0xFF123C19),
|
||||||
|
Color.FromUInt32(0xFF1C5A25),
|
||||||
|
Color.FromUInt32(0xFF277731),
|
||||||
|
Color.FromUInt32(0xFF32953D),
|
||||||
|
Color.FromUInt32(0xFF3EB349),
|
||||||
|
Color.FromUInt32(0xFF5DC264),
|
||||||
|
Color.FromUInt32(0xFF7FD184),
|
||||||
|
Color.FromUInt32(0xFFA6E1A8),
|
||||||
|
Color.FromUInt32(0xFFD0F0D1),
|
||||||
|
Color.FromUInt32(0xFFECF7EC),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//LightGreen
|
||||||
|
Color.FromUInt32(0xFF263D13),
|
||||||
|
Color.FromUInt32(0xFF3B5C1D),
|
||||||
|
Color.FromUInt32(0xFF517B28),
|
||||||
|
Color.FromUInt32(0xFF679934),
|
||||||
|
Color.FromUInt32(0xFF7FB840),
|
||||||
|
Color.FromUInt32(0xFF97C65F),
|
||||||
|
Color.FromUInt32(0xFFB0D481),
|
||||||
|
Color.FromUInt32(0xFFC9E3A7),
|
||||||
|
Color.FromUInt32(0xFFE4F1D1),
|
||||||
|
Color.FromUInt32(0xFFF3F8ED),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Lime
|
||||||
|
Color.FromUInt32(0xFF314603),
|
||||||
|
Color.FromUInt32(0xFF4B6905),
|
||||||
|
Color.FromUInt32(0xFF678D09),
|
||||||
|
Color.FromUInt32(0xFF84B00C),
|
||||||
|
Color.FromUInt32(0xFFA2D311),
|
||||||
|
Color.FromUInt32(0xFFAEDC3A),
|
||||||
|
Color.FromUInt32(0xFFBDE566),
|
||||||
|
Color.FromUInt32(0xFFCFED96),
|
||||||
|
Color.FromUInt32(0xFFE5F6C9),
|
||||||
|
Color.FromUInt32(0xFFF3FBE9),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Yellow
|
||||||
|
Color.FromUInt32(0xFF544903),
|
||||||
|
Color.FromUInt32(0xFF7E6C06),
|
||||||
|
Color.FromUInt32(0xFFA88E0A),
|
||||||
|
Color.FromUInt32(0xFFD2AF0F),
|
||||||
|
Color.FromUInt32(0xFFFCCE14),
|
||||||
|
Color.FromUInt32(0xFFFDDE43),
|
||||||
|
Color.FromUInt32(0xFFFDEB71),
|
||||||
|
Color.FromUInt32(0xFFFEF5A0),
|
||||||
|
Color.FromUInt32(0xFFFEFBD0),
|
||||||
|
Color.FromUInt32(0xFFFFFEEC),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Amber
|
||||||
|
Color.FromUInt32(0xFF512E09),
|
||||||
|
Color.FromUInt32(0xFF794B0F),
|
||||||
|
Color.FromUInt32(0xFFA16B16),
|
||||||
|
Color.FromUInt32(0xFFCA8F1E),
|
||||||
|
Color.FromUInt32(0xFFF2B726),
|
||||||
|
Color.FromUInt32(0xFFF5CA50),
|
||||||
|
Color.FromUInt32(0xFFF7DB7A),
|
||||||
|
Color.FromUInt32(0xFFFAEAA6),
|
||||||
|
Color.FromUInt32(0xFFFCF6D2),
|
||||||
|
Color.FromUInt32(0xFFFEFBED),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Orange
|
||||||
|
Color.FromUInt32(0xFF551F03),
|
||||||
|
Color.FromUInt32(0xFF803506),
|
||||||
|
Color.FromUInt32(0xFFAA500A),
|
||||||
|
Color.FromUInt32(0xFFD56F0F),
|
||||||
|
Color.FromUInt32(0xFFFF9214),
|
||||||
|
Color.FromUInt32(0xFFFFAE43),
|
||||||
|
Color.FromUInt32(0xFFFFC772),
|
||||||
|
Color.FromUInt32(0xFFFFDDA1),
|
||||||
|
Color.FromUInt32(0xFFFFEFD0),
|
||||||
|
Color.FromUInt32(0xFFFFF9ED),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Grey
|
||||||
|
Color.FromUInt32(0xFF1C1F23),
|
||||||
|
Color.FromUInt32(0xFF2E3238),
|
||||||
|
Color.FromUInt32(0xFF41464C),
|
||||||
|
Color.FromUInt32(0xFF555B61),
|
||||||
|
Color.FromUInt32(0xFF6B7075),
|
||||||
|
Color.FromUInt32(0xFF888D92),
|
||||||
|
Color.FromUInt32(0xFFA7ABB0),
|
||||||
|
Color.FromUInt32(0xFFC6CACD),
|
||||||
|
Color.FromUInt32(0xFFE6E8EA),
|
||||||
|
Color.FromUInt32(0xFFF9F9F9),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
public Color GetColor(int colorIndex, int shadeIndex)
|
||||||
|
{
|
||||||
|
return Colors[
|
||||||
|
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
|
||||||
|
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ColorCount => Colors.GetLength(0);
|
||||||
|
|
||||||
|
public int ShadeCount => Colors.GetLength(1);
|
||||||
|
}
|
||||||
231
src/Semi.Avalonia.ColorPicker/SemiColorLightPalette.cs
Normal file
231
src/Semi.Avalonia.ColorPicker/SemiColorLightPalette.cs
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Utilities;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.ColorPicker;
|
||||||
|
|
||||||
|
public class SemiColorLightPalette: IColorPalette
|
||||||
|
{
|
||||||
|
private static readonly Color[,] Colors = new Color[,]
|
||||||
|
{
|
||||||
|
{
|
||||||
|
//Red
|
||||||
|
Color.FromUInt32(0xFFFEF2ED),
|
||||||
|
Color.FromUInt32(0xFFFEDDD2),
|
||||||
|
Color.FromUInt32(0xFFFDB7A5),
|
||||||
|
Color.FromUInt32(0xFFFB9078),
|
||||||
|
Color.FromUInt32(0xFFFA664C),
|
||||||
|
Color.FromUInt32(0xFFF93920),
|
||||||
|
Color.FromUInt32(0xFFD52515),
|
||||||
|
Color.FromUInt32(0xFFB2140C),
|
||||||
|
Color.FromUInt32(0xFF8E0805),
|
||||||
|
Color.FromUInt32(0xFF6A0103),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Pink
|
||||||
|
Color.FromUInt32(0xFFFDECEF),
|
||||||
|
Color.FromUInt32(0xFFFBCFD8),
|
||||||
|
Color.FromUInt32(0xFFF6A0B5),
|
||||||
|
Color.FromUInt32(0xFFF27396),
|
||||||
|
Color.FromUInt32(0xFFED487B),
|
||||||
|
Color.FromUInt32(0xFFE91E63),
|
||||||
|
Color.FromUInt32(0xFFC51356),
|
||||||
|
Color.FromUInt32(0xFFA20B48),
|
||||||
|
Color.FromUInt32(0xFF7E053A),
|
||||||
|
Color.FromUInt32(0xFF5A012B),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Purple
|
||||||
|
Color.FromUInt32(0xFFF7E9F7),
|
||||||
|
Color.FromUInt32(0xFFEFCAF0),
|
||||||
|
Color.FromUInt32(0xFFDD9BE0),
|
||||||
|
Color.FromUInt32(0xFFC96FD1),
|
||||||
|
Color.FromUInt32(0xFFB449C2),
|
||||||
|
Color.FromUInt32(0xFF9E28B3),
|
||||||
|
Color.FromUInt32(0xFF871E9E),
|
||||||
|
Color.FromUInt32(0xFF71168A),
|
||||||
|
Color.FromUInt32(0xFF5C0F75),
|
||||||
|
Color.FromUInt32(0xFF490A61),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Violet
|
||||||
|
Color.FromUInt32(0xFFF3EDF9),
|
||||||
|
Color.FromUInt32(0xFFE2D1F4),
|
||||||
|
Color.FromUInt32(0xFFC4A7E9),
|
||||||
|
Color.FromUInt32(0xFFA67FDD),
|
||||||
|
Color.FromUInt32(0xFF885BD2),
|
||||||
|
Color.FromUInt32(0xFF6A3AC7),
|
||||||
|
Color.FromUInt32(0xFF572FB3),
|
||||||
|
Color.FromUInt32(0xFF46259E),
|
||||||
|
Color.FromUInt32(0xFF361C8A),
|
||||||
|
Color.FromUInt32(0xFF281475),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Indigo
|
||||||
|
Color.FromUInt32(0xFFECEFF8),
|
||||||
|
Color.FromUInt32(0xFFD1D8F0),
|
||||||
|
Color.FromUInt32(0xFFA7B3E1),
|
||||||
|
Color.FromUInt32(0xFF8090D3),
|
||||||
|
Color.FromUInt32(0xFF5E6FC4),
|
||||||
|
Color.FromUInt32(0xFF3F51B5),
|
||||||
|
Color.FromUInt32(0xFF3342A1),
|
||||||
|
Color.FromUInt32(0xFF28348C),
|
||||||
|
Color.FromUInt32(0xFF1F2878),
|
||||||
|
Color.FromUInt32(0xFF171D63),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Blue
|
||||||
|
Color.FromUInt32(0xFFEAF5FF),
|
||||||
|
Color.FromUInt32(0xFFCBE7FE),
|
||||||
|
Color.FromUInt32(0xFF98CDFD),
|
||||||
|
Color.FromUInt32(0xFF65B2FC),
|
||||||
|
Color.FromUInt32(0xFF3295FB),
|
||||||
|
Color.FromUInt32(0xFF0077FA),
|
||||||
|
Color.FromUInt32(0xFF0062D6),
|
||||||
|
Color.FromUInt32(0xFF004FB3),
|
||||||
|
Color.FromUInt32(0xFF003D8F),
|
||||||
|
Color.FromUInt32(0xFF002C6B),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//LightBlue
|
||||||
|
Color.FromUInt32(0xFFE9F7FD),
|
||||||
|
Color.FromUInt32(0xFFC9ECFC),
|
||||||
|
Color.FromUInt32(0xFF95D8F8),
|
||||||
|
Color.FromUInt32(0xFF62C3F5),
|
||||||
|
Color.FromUInt32(0xFF30ACF1),
|
||||||
|
Color.FromUInt32(0xFF0095EE),
|
||||||
|
Color.FromUInt32(0xFF007BCA),
|
||||||
|
Color.FromUInt32(0xFF0063A7),
|
||||||
|
Color.FromUInt32(0xFF004B83),
|
||||||
|
Color.FromUInt32(0xFF00355F),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Cyan
|
||||||
|
Color.FromUInt32(0xFFE5F7F8),
|
||||||
|
Color.FromUInt32(0xFFC2EFF0),
|
||||||
|
Color.FromUInt32(0xFF8ADDE2),
|
||||||
|
Color.FromUInt32(0xFF58CBD3),
|
||||||
|
Color.FromUInt32(0xFF2CB8C5),
|
||||||
|
Color.FromUInt32(0xFF05A4B6),
|
||||||
|
Color.FromUInt32(0xFF038698),
|
||||||
|
Color.FromUInt32(0xFF016979),
|
||||||
|
Color.FromUInt32(0xFF004D5B),
|
||||||
|
Color.FromUInt32(0xFF00323D),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Teal
|
||||||
|
Color.FromUInt32(0xFFE4F7F4),
|
||||||
|
Color.FromUInt32(0xFFC0F0E8),
|
||||||
|
Color.FromUInt32(0xFF87E0D3),
|
||||||
|
Color.FromUInt32(0xFF54D1C1),
|
||||||
|
Color.FromUInt32(0xFF27C2B0),
|
||||||
|
Color.FromUInt32(0xFF00B3A1),
|
||||||
|
Color.FromUInt32(0xFF009589),
|
||||||
|
Color.FromUInt32(0xFF00776F),
|
||||||
|
Color.FromUInt32(0xFF005955),
|
||||||
|
Color.FromUInt32(0xFF003C3A),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Green
|
||||||
|
Color.FromUInt32(0xFFECF7EC),
|
||||||
|
Color.FromUInt32(0xFFD0F0D1),
|
||||||
|
Color.FromUInt32(0xFFA4E0A7),
|
||||||
|
Color.FromUInt32(0xFF7DD182),
|
||||||
|
Color.FromUInt32(0xFF5AC262),
|
||||||
|
Color.FromUInt32(0xFF3BB346),
|
||||||
|
Color.FromUInt32(0xFF30953B),
|
||||||
|
Color.FromUInt32(0xFF25772F),
|
||||||
|
Color.FromUInt32(0xFF1B5924),
|
||||||
|
Color.FromUInt32(0xFF113C18),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//LightGreen
|
||||||
|
Color.FromUInt32(0xFFF3F8EC),
|
||||||
|
Color.FromUInt32(0xFFE3F0D0),
|
||||||
|
Color.FromUInt32(0xFFC8E2A5),
|
||||||
|
Color.FromUInt32(0xFFADD37E),
|
||||||
|
Color.FromUInt32(0xFF93C55B),
|
||||||
|
Color.FromUInt32(0xFF7BB63C),
|
||||||
|
Color.FromUInt32(0xFF649830),
|
||||||
|
Color.FromUInt32(0xFF4E7926),
|
||||||
|
Color.FromUInt32(0xFF395B1B),
|
||||||
|
Color.FromUInt32(0xFF253D12),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Lime
|
||||||
|
Color.FromUInt32(0xFFF2FAE6),
|
||||||
|
Color.FromUInt32(0xFFE3F6C5),
|
||||||
|
Color.FromUInt32(0xFFCBED8E),
|
||||||
|
Color.FromUInt32(0xFFB7E35B),
|
||||||
|
Color.FromUInt32(0xFFA7DA2C),
|
||||||
|
Color.FromUInt32(0xFF9BD100),
|
||||||
|
Color.FromUInt32(0xFF7EAE00),
|
||||||
|
Color.FromUInt32(0xFF638B00),
|
||||||
|
Color.FromUInt32(0xFF486800),
|
||||||
|
Color.FromUInt32(0xFF2F4600),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Yellow
|
||||||
|
Color.FromUInt32(0xFFFFFDEA),
|
||||||
|
Color.FromUInt32(0xFFFEFBCB),
|
||||||
|
Color.FromUInt32(0xFFFDF398),
|
||||||
|
Color.FromUInt32(0xFFFCE865),
|
||||||
|
Color.FromUInt32(0xFFFBDA32),
|
||||||
|
Color.FromUInt32(0xFFFAC800),
|
||||||
|
Color.FromUInt32(0xFFD0AA00),
|
||||||
|
Color.FromUInt32(0xFFA78B00),
|
||||||
|
Color.FromUInt32(0xFF7D6A00),
|
||||||
|
Color.FromUInt32(0xFF534800),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Amber
|
||||||
|
Color.FromUInt32(0xFFFEFBEB),
|
||||||
|
Color.FromUInt32(0xFFFCF5CE),
|
||||||
|
Color.FromUInt32(0xFFF9E89E),
|
||||||
|
Color.FromUInt32(0xFFF6D86F),
|
||||||
|
Color.FromUInt32(0xFFF3C641),
|
||||||
|
Color.FromUInt32(0xFFF0B114),
|
||||||
|
Color.FromUInt32(0xFFC88A0F),
|
||||||
|
Color.FromUInt32(0xFFA0660A),
|
||||||
|
Color.FromUInt32(0xFF784606),
|
||||||
|
Color.FromUInt32(0xFF502B03),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Orange
|
||||||
|
Color.FromUInt32(0xFFFFF8EA),
|
||||||
|
Color.FromUInt32(0xFFFEEECC),
|
||||||
|
Color.FromUInt32(0xFFFED998),
|
||||||
|
Color.FromUInt32(0xFFFDC165),
|
||||||
|
Color.FromUInt32(0xFFFDA633),
|
||||||
|
Color.FromUInt32(0xFFFC8800),
|
||||||
|
Color.FromUInt32(0xFFD26700),
|
||||||
|
Color.FromUInt32(0xFFA84A00),
|
||||||
|
Color.FromUInt32(0xFF7E3100),
|
||||||
|
Color.FromUInt32(0xFF541D00),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
//Grey
|
||||||
|
Color.FromUInt32(0xFFF9F9F9),
|
||||||
|
Color.FromUInt32(0xFFE6E8EA),
|
||||||
|
Color.FromUInt32(0xFFC6CACD),
|
||||||
|
Color.FromUInt32(0xFFA7ABB0),
|
||||||
|
Color.FromUInt32(0xFF888D92),
|
||||||
|
Color.FromUInt32(0xFF6B7075),
|
||||||
|
Color.FromUInt32(0xFF555B61),
|
||||||
|
Color.FromUInt32(0xFF41464C),
|
||||||
|
Color.FromUInt32(0xFF2E3238),
|
||||||
|
Color.FromUInt32(0xFF1C1F23),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
public Color GetColor(int colorIndex, int shadeIndex)
|
||||||
|
{
|
||||||
|
return Colors[
|
||||||
|
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
|
||||||
|
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ColorCount => Colors.GetLength(0);
|
||||||
|
|
||||||
|
public int ShadeCount => Colors.GetLength(1);
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:collections="using:Avalonia.Collections">
|
xmlns:collections="using:Avalonia.Collections"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="DataGridCellTextBlockTheme" TargetType="TextBlock">
|
<ControlTheme x:Key="DataGridCellTextBlockTheme" TargetType="TextBlock">
|
||||||
<Setter Property="Margin" Value="{DynamicResource DataGridCellTextBlockDefaultMargin}" />
|
<Setter Property="Margin" Value="{DynamicResource DataGridCellTextBlockDefaultMargin}" />
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
||||||
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<Import Project="../Package.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
|
||||||
<LangVersion>10</LangVersion>
|
|
||||||
<Version>0.1.0-preview5.1</Version>
|
|
||||||
<Title>Semi.Avalonia.DataGrid</Title>
|
<Title>Semi.Avalonia.DataGrid</Title>
|
||||||
<Authors>IRIHI Technology</Authors>
|
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview7</PackageReleaseNotes>
|
||||||
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
|
||||||
<PackageReleaseNotes>Initial Release </PackageReleaseNotes>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview5" />
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20" Spacing="20">
|
<StackPanel Margin="20" Spacing="20">
|
||||||
<TextBox Text="Hello" />
|
<TextBox Text="Hello" />
|
||||||
@@ -6,23 +9,15 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
||||||
<Setter Property="Background" Value="{DynamicResource AutoCompleteBoxDefaultBackground}" />
|
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource AutoCompleteBoxDefaultBorderBrush}" />
|
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource AutoCompleteBoxCornerRadius}" />
|
|
||||||
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="600" />
|
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="AutoCompleteBox">
|
<ControlTemplate TargetType="AutoCompleteBox">
|
||||||
<Panel>
|
<Panel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
Background="{TemplateBinding Background}"
|
VerticalAlignment="Center"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
|
||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
|
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
@@ -48,18 +43,52 @@
|
|||||||
</Panel>
|
</Panel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^.Bordered">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="AutoCompleteBox">
|
||||||
|
<Panel>
|
||||||
|
<TextBox
|
||||||
|
Name="PART_TextBox"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Classes="Bordered"
|
||||||
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
|
<Popup
|
||||||
|
Name="PART_Popup"
|
||||||
|
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||||
|
IsLightDismissEnabled="True"
|
||||||
|
PlacementTarget="{TemplateBinding}">
|
||||||
|
<Border
|
||||||
|
Margin="{DynamicResource AutoCompleteBoxPopupMargin}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource AutoCompleteBoxPopupBackground}"
|
||||||
|
BorderBrush="{DynamicResource AutoCompleteBoxPopupBorderBrush}"
|
||||||
|
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
|
||||||
|
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
|
||||||
|
<ListBox
|
||||||
|
Name="PART_SelectingItemsControl"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</Panel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Large /template/ TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small /template/ TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
|
||||||
x:Key="BorderlessAutoCompleteBox"
|
|
||||||
BasedOn="{StaticResource {x:Type AutoCompleteBox}}"
|
|
||||||
TargetType="AutoCompleteBox">
|
|
||||||
<ControlTheme.Children>
|
|
||||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
|
||||||
<Setter Property="Theme" Value="{StaticResource BorderlessTextBox}" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme.Children>
|
|
||||||
<Setter Property="Background" Value="{DynamicResource AutoCompleteBoxBorderlessBackground}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource AutoCompleteBoxBorderlessBorderBrush}" />
|
|
||||||
</ControlTheme>
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20" Spacing="20">
|
<StackPanel Margin="20" Spacing="20">
|
||||||
<Border Theme="{StaticResource CardBorder}">
|
<Border Theme="{StaticResource CardBorder}">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Button Theme Key: Solid Light Border Borderless; Default is Light -->
|
<!-- Button Theme Key: Solid Light Border Borderless; Default is Light -->
|
||||||
<!-- Button Default Classes: Primary Secondary, Tertiary, Warning, Danger; Default is Primary -->
|
<!-- Button Default Classes: Primary Secondary, Tertiary, Warning, Danger; Default is Primary -->
|
||||||
<!-- State: default pointerover pressed disabled -->
|
<!-- State: default pointerover pressed disabled -->
|
||||||
@@ -17,6 +20,7 @@
|
|||||||
<Setter Property="Button.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="Button.HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="Button.VerticalContentAlignment" Value="Center" />
|
<Setter Property="Button.VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="Button.MinHeight" Value="12" />
|
<Setter Property="Button.MinHeight" Value="12" />
|
||||||
|
<Setter Property="Button.Cursor" Value="Hand" />
|
||||||
<Setter Property="Button.Template">
|
<Setter Property="Button.Template">
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20" Spacing="20">
|
<StackPanel Margin="20" Spacing="20">
|
||||||
<ButtonSpinner Content="Hello World" />
|
<ButtonSpinner Content="Hello World" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
||||||
@@ -28,11 +31,13 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
||||||
|
<Setter Property="CalendarItem.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
|
||||||
<Setter Property="CalendarItem.DayTitleTemplate">
|
<Setter Property="CalendarItem.DayTitleTemplate">
|
||||||
<Template>
|
<Template>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
x:DataType="x:String"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
|
Foreground="{DynamicResource CalendarItemWeekDayNameForeground}"
|
||||||
Text="{Binding}" />
|
Text="{Binding}" />
|
||||||
@@ -47,25 +52,19 @@
|
|||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<!--
|
|
||||||
To keep calendar from resizing when switching DisplayMode
|
|
||||||
In WinUI Min-Width from TemplateSettings
|
|
||||||
basically...MinWidth of DayItem = 40, 40 * 7 = 280 + margins/padding = ~294
|
|
||||||
Viewport height is set from # of rows displayed (2-8) in Month mode, = ~290 for 6 weeks (+ day names)
|
|
||||||
-->
|
|
||||||
<Grid
|
<Grid
|
||||||
MinWidth="{DynamicResource CalendarMinWidth}"
|
MinWidth="{DynamicResource CalendarMinWidth}"
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
RowDefinitions="Auto,*">
|
RowDefinitions="Auto,*">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||||
<Button
|
<Button
|
||||||
Name="PART_PreviousButton"
|
Name="PART_PreviousButton"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
<!-- Path mimics Segoe MDL2 Assets font glyph used in WinUI -->
|
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
@@ -86,7 +85,6 @@
|
|||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
<!-- Path mimics Segoe MDL2 Assets font glyph used in WinUI -->
|
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
@@ -94,15 +92,12 @@
|
|||||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!-- Border below is used only for MonthView but it can't be moved inside of Grid because CalendarItem expects it to be empty and it will cause side-effects -->
|
|
||||||
<Grid
|
<Grid
|
||||||
Name="PART_MonthView"
|
Name="PART_MonthView"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
MinHeight="200"
|
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
IsVisible="False">
|
IsVisible="False">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!-- This should always be the week day names?? -->
|
|
||||||
<RowDefinition Height="{DynamicResource CalendarItemWeekDayNameHeight}" />
|
<RowDefinition Height="{DynamicResource CalendarItemWeekDayNameHeight}" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
@@ -124,7 +119,6 @@
|
|||||||
<Grid
|
<Grid
|
||||||
Name="PART_YearView"
|
Name="PART_YearView"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
MinHeight="200"
|
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
IsVisible="False">
|
IsVisible="False">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -148,7 +142,6 @@
|
|||||||
<ControlTheme x:Key="{x:Type CalendarButton}" TargetType="CalendarButton">
|
<ControlTheme x:Key="{x:Type CalendarButton}" TargetType="CalendarButton">
|
||||||
<Setter Property="ClickMode" Value="Release" />
|
<Setter Property="ClickMode" Value="Release" />
|
||||||
<Setter Property="Margin" Value="2" />
|
<Setter Property="Margin" Value="2" />
|
||||||
<!-- These are actually set on the CalendarView in WinUI -->
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarButtonBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarButtonBorderBrush}" />
|
||||||
@@ -184,7 +177,6 @@
|
|||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPressedBackground}" />
|
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Adjusted :selected to look like :today from DayItem -->
|
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Style Selector="^ /template/ ContentControl">
|
<Style Selector="^ /template/ ContentControl">
|
||||||
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonSelectedBackground}" />
|
<Setter Property="ContentControl.Background" Value="{DynamicResource CalendarItemCalendarButtonSelectedBackground}" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="CalendarDatePickerButton" TargetType="Button">
|
<ControlTheme x:Key="CalendarDatePickerButton" TargetType="Button">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource CalendarDatePickerIconForeground}" />
|
<Setter Property="Button.Foreground" Value="{DynamicResource CalendarDatePickerIconForeground}" />
|
||||||
@@ -31,7 +34,8 @@
|
|||||||
<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="4 0" />
|
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerDefaultHeight}" />
|
||||||
|
<Setter Property="Padding" Value="8 0" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="CalendarDatePicker">
|
<ControlTemplate TargetType="CalendarDatePicker">
|
||||||
<Panel
|
<Panel
|
||||||
@@ -45,12 +49,13 @@
|
|||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid
|
<Grid
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
ColumnDefinitions="*,Auto">
|
ColumnDefinitions="*,Auto">
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
MinHeight="{DynamicResource CalendarDatePickerInnerDefaultHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
@@ -63,21 +68,24 @@
|
|||||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||||
Watermark="{TemplateBinding Watermark}">
|
Watermark="{TemplateBinding Watermark}">
|
||||||
<TextBox.Styles>
|
<TextBox.Styles>
|
||||||
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_BorderElement">
|
<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 -->
|
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TextBox#PART_TextBox:disabled">
|
<Style Selector="TextBox#PART_TextBox:disabled">
|
||||||
<Style Selector="^ /template/ Border#PART_BorderElement">
|
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
|
||||||
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
<!-- 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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ TextBlock#PART_Watermark, ^ TextBlock#PART_FloatingWatermark">
|
|
||||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource CalendarDatePickerTextForegroundDisabled}" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
</Style>
|
||||||
</TextBox.Styles>
|
</TextBox.Styles>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
@@ -94,9 +102,15 @@
|
|||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
PlacementTarget="{TemplateBinding}"
|
PlacementTarget="{TemplateBinding}"
|
||||||
VerticalOffset="-4">
|
VerticalOffset="-4">
|
||||||
<Border Margin="8" BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}">
|
<Border
|
||||||
|
Margin="8"
|
||||||
|
Background="Transparent"
|
||||||
|
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
|
||||||
|
CornerRadius="{DynamicResource CalendarCornerRadius}">
|
||||||
<Calendar
|
<Calendar
|
||||||
Name="PART_Calendar"
|
Name="PART_Calendar"
|
||||||
|
BorderThickness="0"
|
||||||
|
CornerRadius="{Binding $parent[Border].CornerRadius}"
|
||||||
DisplayDate="{TemplateBinding DisplayDate}"
|
DisplayDate="{TemplateBinding DisplayDate}"
|
||||||
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
||||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||||
@@ -113,11 +127,29 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^.Large">
|
||||||
|
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerLargeHeight}" />
|
||||||
|
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small">
|
||||||
|
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerSmallHeight}" />
|
||||||
|
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerSmallHeight}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- Disabled State -->
|
<!-- Disabled State -->
|
||||||
<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="BorderBrush" Value="{DynamicResource CalendarDatePickerDisabledBorderBrush}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Button#PART_Button">
|
<Style Selector="^ /template/ Button#PART_Button">
|
||||||
@@ -133,5 +165,30 @@
|
|||||||
<Style Selector="^:focus-within /template/ Border#Background">
|
<Style Selector="^:focus-within /template/ Border#Background">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerFocusBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerFocusBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Bordered">
|
||||||
|
<Style Selector="^ Border#Background">
|
||||||
|
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedDefaultBackground}" />
|
||||||
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedDefaultBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ Border#Background">
|
||||||
|
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
||||||
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:focus-within /template/ Border#Background">
|
||||||
|
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBackground}" />
|
||||||
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource CalendarDatePickerBorderedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerDisabledBackground}" />
|
||||||
|
<Setter Property="Border.BorderBrush" Value="Transparent" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ Button#PART_Button">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerDisabledIconForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
<ControlTheme x:Key="CaptionButton" TargetType="Button">
|
<ControlTheme x:Key="CaptionButton" TargetType="Button">
|
||||||
@@ -6,10 +9,11 @@
|
|||||||
<Setter Property="BorderBrush" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CaptionButtonPressedBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||||
<Setter Property="CornerRadius" Value="6" />
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
<Setter Property="Margin" Value="4" />
|
<Setter Property="Margin" Value="0, 4" />
|
||||||
<Setter Property="Padding" Value="4" />
|
<Setter Property="Padding" Value="4" />
|
||||||
<Setter Property="Height" Value="28" />
|
<Setter Property="Height" Value="28" />
|
||||||
<Setter Property="Width" Value="28" />
|
<Setter Property="Width" Value="28" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
@@ -33,6 +37,7 @@
|
|||||||
|
|
||||||
<ControlTheme x:Key="{x:Type CaptionButtons}" TargetType="CaptionButtons">
|
<ControlTheme x:Key="{x:Type CaptionButtons}" TargetType="CaptionButtons">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonForeground}" />
|
||||||
|
<Setter Property="Margin" Value="0 0 4 0" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="CaptionButtons">
|
<ControlTemplate TargetType="CaptionButtons">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
|
xmlns:converters="clr-namespace:Semi.Avalonia.Converters"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<converters:ItemToObjectConverter x:Key="ItemsConverter" />
|
<converters:ItemToObjectConverter x:Key="ItemsConverter" />
|
||||||
<ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel">
|
<ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel">
|
||||||
@@ -140,8 +141,8 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
|
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
|
||||||
Items="{TemplateBinding Items,
|
ItemsSource="{TemplateBinding ItemsSource,
|
||||||
Converter={StaticResource ItemsConverter}}"
|
Converter={StaticResource ItemsConverter}}"
|
||||||
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
|
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
|
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
|
||||||
<Setter Property="Padding" Value="8,0,0,0" />
|
<Setter Property="Padding" Value="8,0,0,0" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="FontSize" Value="{DynamicResource CheckboxFontSize}" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckboxBoxCornerRadius}" />
|
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||||
|
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
|
||||||
<Setter Property="MinHeight" Value="32" />
|
<Setter Property="MinHeight" Value="32" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CheckboxForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="CheckBox">
|
<ControlTemplate TargetType="CheckBox">
|
||||||
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
|
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
|
||||||
@@ -18,6 +22,7 @@
|
|||||||
x:Name="PART_Border"
|
x:Name="PART_Border"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
@@ -29,18 +34,18 @@
|
|||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
<Border
|
<Border
|
||||||
x:Name="NormalRectangle"
|
x:Name="NormalRectangle"
|
||||||
Width="{DynamicResource CheckboxBoxWidth}"
|
Width="{DynamicResource CheckBoxBoxWidth}"
|
||||||
Height="{DynamicResource CheckboxBoxHeight}"
|
Height="{DynamicResource CheckBoxBoxHeight}"
|
||||||
Background="{DynamicResource CheckboxDefaultBackground}"
|
Background="{DynamicResource CheckBoxDefaultBackground}"
|
||||||
BorderBrush="{DynamicResource CheckboxDefaultBorderBrush}"
|
BorderBrush="{DynamicResource CheckBoxDefaultBorderBrush}"
|
||||||
BorderThickness="{DynamicResource CheckboxBoxBorderThickness}"
|
BorderThickness="{DynamicResource CheckBoxBoxBorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
UseLayoutRounding="False" />
|
UseLayoutRounding="False" />
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Name="CheckGlyph"
|
Name="CheckGlyph"
|
||||||
Width="{DynamicResource CheckboxBoxGlyphWidth}"
|
Width="{DynamicResource CheckBoxBoxGlyphWidth}"
|
||||||
Height="{DynamicResource CheckboxBoxGlyphHeight}"
|
Height="{DynamicResource CheckBoxBoxGlyphHeight}"
|
||||||
Foreground="{DynamicResource CheckboxGlyphFill}" />
|
Foreground="{DynamicResource CheckBoxGlyphFill}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
@@ -59,37 +64,37 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<!-- Unchecked PointerOver State -->
|
<!-- Unchecked Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxPointOverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxPointOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Unchecked Pressed State -->
|
<!-- Unchecked Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPressedBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Unchecked Disabled state -->
|
<!-- Unchecked Disabled state -->
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CheckboxDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:checked">
|
<Style Selector="^:checked">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
@@ -97,42 +102,42 @@
|
|||||||
<Setter Property="Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked PointerOver State -->
|
<!-- Checked Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedPointOverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedPointOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Pressed State -->
|
<!-- Checked Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Disabled State -->
|
<!-- Checked Disabled State -->
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CheckboxDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckboxGlyphDisabledFill}" />
|
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:indeterminate">
|
<Style Selector="^:indeterminate">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
@@ -140,34 +145,318 @@
|
|||||||
<Setter Property="Opacity" Value="1" />
|
<Setter Property="Opacity" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked PointerOver State -->
|
<!-- Checked Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedPointOverBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedPointOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Pressed State -->
|
<!-- Checked Pressed State -->
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedPressedBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Checked Disabled State -->
|
<!-- Checked Disabled State -->
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource CheckboxDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckboxCheckedDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource CheckboxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckboxGlyphDisabledFill}" />
|
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="CardCheckBox" TargetType="CheckBox">
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||||
|
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="CheckBox.Template">
|
||||||
|
<ControlTemplate TargetType="CheckBox">
|
||||||
|
<Border
|
||||||
|
Name="RootBorder"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<Grid
|
||||||
|
x:Name="RootGrid"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
ColumnDefinitions="Auto,*">
|
||||||
|
<Grid Grid.Column="0" VerticalAlignment="Top">
|
||||||
|
<Border
|
||||||
|
x:Name="NormalRectangle"
|
||||||
|
Width="{DynamicResource CheckBoxBoxWidth}"
|
||||||
|
Height="{DynamicResource CheckBoxBoxHeight}"
|
||||||
|
Background="{DynamicResource CheckBoxDefaultBackground}"
|
||||||
|
BorderBrush="{DynamicResource CheckBoxDefaultBorderBrush}"
|
||||||
|
BorderThickness="{DynamicResource CheckBoxBoxBorderThickness}"
|
||||||
|
CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}"
|
||||||
|
UseLayoutRounding="False" />
|
||||||
|
<PathIcon
|
||||||
|
Name="CheckGlyph"
|
||||||
|
Width="{DynamicResource CheckBoxBoxGlyphWidth}"
|
||||||
|
Height="{DynamicResource CheckBoxBoxGlyphHeight}"
|
||||||
|
Foreground="{DynamicResource CheckBoxGlyphFill}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
<ContentPresenter
|
||||||
|
x:Name="ContentPresenter"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="8,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
IsVisible="{TemplateBinding Content,
|
||||||
|
Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<!-- Unchecked Pointerover State -->
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unchecked Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unchecked Disabled state -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:checked">
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardCheckedBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
|
<Setter Property="Data" Value="{DynamicResource CheckBoxCheckGlyph}" />
|
||||||
|
<Setter Property="Opacity" Value="1" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Pointerover State -->
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Disabled State -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:indeterminate">
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
|
<Setter Property="Data" Value="{DynamicResource CheckBoxIndeterminateGlyph}" />
|
||||||
|
<Setter Property="Opacity" Value="1" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Pointerover State -->
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Checked Disabled State -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox">
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||||
|
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
|
||||||
|
<Setter Property="CheckBox.VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="CheckBox.Template">
|
||||||
|
<ControlTemplate TargetType="CheckBox">
|
||||||
|
<ContentPresenter
|
||||||
|
x:Name="PART_ContentPresenter"
|
||||||
|
Margin="{TemplateBinding Margin}"
|
||||||
|
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}"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
UseLayoutRounding="False" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<!-- Unchecked Pointerover State -->
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unchecked Pressed State -->
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Unchecked Disabled state -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:checked">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCardCheckedBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<!-- Checked Disabled State -->
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:indeterminate">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20">
|
<StackPanel Margin="20">
|
||||||
<ComboBoxItem>Hello World</ComboBoxItem>
|
<ComboBoxItem>Hello World</ComboBoxItem>
|
||||||
@@ -28,14 +31,12 @@
|
|||||||
<Setter Property="Padding" Value="{DynamicResource ComboBoxSelectorDefaultPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ComboBoxSelectorDefaultPadding}" />
|
||||||
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
<Setter Property="FocusAdorner" Value="{x:Null}" />
|
||||||
<Setter Property="MaxDropDownHeight" Value="504" />
|
<Setter Property="MaxDropDownHeight" Value="504" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForeground}" />
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrush}" />
|
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<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" />
|
||||||
<Setter Property="MinHeight" Value="30" />
|
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
Margin="{TemplateBinding Padding}"
|
Margin="{TemplateBinding Padding}"
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsVisible="{TemplateBinding SelectionBoxItem,
|
IsVisible="{TemplateBinding SelectionBoxItem,
|
||||||
Converter={x:Static ObjectConverters.IsNull}}"
|
Converter={x:Static ObjectConverters.IsNull}}"
|
||||||
Opacity="0.3"
|
Opacity="0.3"
|
||||||
@@ -115,6 +117,7 @@
|
|||||||
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
|
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
|
||||||
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
|
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
|
||||||
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
|
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
|
||||||
|
ClipToBounds="True"
|
||||||
CornerRadius="6">
|
CornerRadius="6">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
@@ -128,13 +131,20 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<!-- PointerOver State -->
|
<Style Selector="^.Large">
|
||||||
|
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small">
|
||||||
|
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- 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>
|
</Style>
|
||||||
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
|
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointerOverForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointeroverForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pressed State -->
|
<!-- Pressed State -->
|
||||||
@@ -163,6 +173,35 @@
|
|||||||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Bordered">
|
||||||
|
<Style Selector="^ /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedPointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderedPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ Border#Background">
|
||||||
|
<Setter Property="Border.Background" Value="{DynamicResource ComboBoxSelectorDisabledBackground}" />
|
||||||
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentControl#ContentPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ TextBlock#PlaceholderTextBlock">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ PathIcon#DropDownGlyph">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type ComboBoxItem}" TargetType="ComboBoxItem">
|
<ControlTheme x:Key="{x:Type ComboBoxItem}" TargetType="ComboBoxItem">
|
||||||
@@ -187,25 +226,27 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointerOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPressedBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:selected">
|
<Style Selector="^:selected">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedBackground}" />
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Style Selector="^:disabled">
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointerOverBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<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">
|
<ControlTheme x:Key="{x:Type ContentControl}" TargetType="ContentControl">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="ContentControl">
|
<ControlTemplate TargetType="ContentControl">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type ContextMenu}" TargetType="ContextMenu">
|
<ControlTheme x:Key="{x:Type ContextMenu}" TargetType="ContextMenu">
|
||||||
<Setter Property="ContextMenu.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
<Setter Property="ContextMenu.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
||||||
<Setter Property="ContextMenu.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
|
<Setter Property="ContextMenu.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
||||||
@@ -15,7 +18,8 @@
|
|||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropdownButton.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropDownButton.axaml" />
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
|
||||||
<Setter Property="Width" Value="296" />
|
<Setter Property="Width" Value="296" />
|
||||||
@@ -89,8 +92,7 @@
|
|||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource DateTimePickerAcceptGlyph}"
|
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
|
||||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
Name="PART_DismissButton"
|
Name="PART_DismissButton"
|
||||||
@@ -102,8 +104,7 @@
|
|||||||
<PathIcon
|
<PathIcon
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
Data="{DynamicResource DateTimePickerDismissGlyph}"
|
Data="{DynamicResource DateTimePickerDismissGlyph}" />
|
||||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
|
||||||
</Button>
|
</Button>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
@@ -124,13 +125,12 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type DatePicker}" TargetType="DatePicker">
|
<ControlTheme x:Key="{x:Type DatePicker}" TargetType="DatePicker">
|
||||||
<Setter Property="FontSize" Value="14" />
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
|
||||||
<Setter Property="Height" Value="30" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="{DynamicResource DateTimePickerButtonBorderThickness}" />
|
||||||
<Setter Property="CornerRadius" Value="3" />
|
<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="Template">
|
<Setter Property="Template">
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
Width="298"
|
Width="298"
|
||||||
MinWidth="298"
|
MinWidth="298"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
@@ -154,6 +154,7 @@
|
|||||||
<Grid
|
<Grid
|
||||||
Name="PART_ButtonContentGrid"
|
Name="PART_ButtonContentGrid"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
ColumnDefinitions="78*,Auto,132*,Auto,78*">
|
ColumnDefinitions="78*,Auto,132*,Auto,78*">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_DayTextBlock"
|
Name="PART_DayTextBlock"
|
||||||
@@ -211,7 +212,7 @@
|
|||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
PlacementMode="Bottom"
|
Placement="Bottom"
|
||||||
PlacementTarget="{TemplateBinding}"
|
PlacementTarget="{TemplateBinding}"
|
||||||
WindowManagerAddShadowHint="False">
|
WindowManagerAddShadowHint="False">
|
||||||
<DatePickerPresenter Name="PART_PickerPresenter" />
|
<DatePickerPresenter Name="PART_PickerPresenter" />
|
||||||
@@ -229,6 +230,12 @@
|
|||||||
<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">
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small">
|
||||||
|
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
<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="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
@@ -19,7 +23,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonPointeroverBorderBrush}" />
|
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
@@ -99,8 +103,7 @@
|
|||||||
Height="8"
|
Height="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Data="{DynamicResource DateTimePickerButtonUpGlyph}"
|
Data="{DynamicResource DateTimePickerButtonUpGlyph}" />
|
||||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
|
||||||
</Template>
|
</Template>
|
||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
@@ -121,8 +124,7 @@
|
|||||||
Height="8"
|
Height="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Data="{DynamicResource DateTimePickerButtonDownGlyph}"
|
Data="{DynamicResource DateTimePickerButtonDownGlyph}" />
|
||||||
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
|
|
||||||
</Template>
|
</Template>
|
||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
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="DropDownButton.Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
@@ -13,6 +16,7 @@
|
|||||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
||||||
|
<Setter Property="DropDownButton.Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DropDownButton">
|
<ControlTemplate TargetType="DropDownButton">
|
||||||
<Border
|
<Border
|
||||||
@@ -40,8 +44,8 @@
|
|||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Data="{DynamicResource DropdownButtonIconGlyph}"
|
Data="{DynamicResource DropDownButtonIconGlyph}"
|
||||||
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
UseLayoutRounding="False" />
|
UseLayoutRounding="False" />
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -93,7 +97,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="SolidDropdownButton" TargetType="DropDownButton">
|
<ControlTheme x:Key="SolidDropDownButton" TargetType="DropDownButton">
|
||||||
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
@@ -106,6 +110,7 @@
|
|||||||
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
<Setter Property="DropDownButton.MinHeight" Value="12" />
|
||||||
|
<Setter Property="DropDownButton.Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="DropDownButton">
|
<ControlTemplate TargetType="DropDownButton">
|
||||||
<Border
|
<Border
|
||||||
@@ -133,8 +138,8 @@
|
|||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Data="{DynamicResource DropdownButtonIconGlyph}"
|
Data="{DynamicResource DropDownButtonIconGlyph}"
|
||||||
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
UseLayoutRounding="False" />
|
UseLayoutRounding="False" />
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -220,7 +225,7 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
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" />
|
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
||||||
26
src/Semi.Avalonia/Controls/EmbeddableControlRoot.axaml
Normal file
26
src/Semi.Avalonia/Controls/EmbeddableControlRoot.axaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
|
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
|
||||||
|
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||||
|
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Panel>
|
||||||
|
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
|
||||||
|
<Border Background="{TemplateBinding Background}">
|
||||||
|
<VisualLayerManager>
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_ContentPresenter"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
|
</VisualLayerManager>
|
||||||
|
</Border>
|
||||||
|
</Panel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20" Spacing="20">
|
<StackPanel Margin="20" Spacing="20">
|
||||||
<TextBox>Hello</TextBox>
|
<TextBox>Hello</TextBox>
|
||||||
@@ -29,7 +32,8 @@
|
|||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="ExpanderHeader"
|
x:Name="ExpanderHeader"
|
||||||
Padding="{DynamicResource ExpanderHeaderPadding}"
|
Padding="{DynamicResource ExpanderHeaderPadding}"
|
||||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Stretch"
|
||||||
Background="{DynamicResource ExpanderHeaderDefaultBackground}"
|
Background="{DynamicResource ExpanderHeaderDefaultBackground}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
@@ -45,7 +49,8 @@
|
|||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Name="PART_PathIcon" Grid.Column="1"
|
Name="PART_PathIcon"
|
||||||
|
Grid.Column="1"
|
||||||
Width="{DynamicResource ExpanderIconSize}"
|
Width="{DynamicResource ExpanderIconSize}"
|
||||||
Height="{DynamicResource ExpanderIconSize}"
|
Height="{DynamicResource ExpanderIconSize}"
|
||||||
Data="M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z">
|
Data="M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z">
|
||||||
@@ -60,7 +65,8 @@
|
|||||||
</LayoutTransformControl>
|
</LayoutTransformControl>
|
||||||
<LayoutTransformControl Name="ExpanderContentLayoutContainer" MinHeight="1">
|
<LayoutTransformControl Name="ExpanderContentLayoutContainer" MinHeight="1">
|
||||||
<Border
|
<Border
|
||||||
x:Name="ExpanderContent" MinHeight="2"
|
x:Name="ExpanderContent"
|
||||||
|
MinHeight="2"
|
||||||
BorderBrush="{DynamicResource ExpanderSeparatorBorderBrush}"
|
BorderBrush="{DynamicResource ExpanderSeparatorBorderBrush}"
|
||||||
BorderThickness="0,0,0,1">
|
BorderThickness="0,0,0,1">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter">
|
<ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter">
|
||||||
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
|
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
|
||||||
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
|
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
|
||||||
@@ -37,9 +40,7 @@
|
|||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
VerticalContentAlignment="Stretch"
|
VerticalContentAlignment="Stretch"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
|
||||||
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type GridSplitter}" TargetType="GridSplitter">
|
<ControlTheme x:Key="{x:Type GridSplitter}" TargetType="GridSplitter">
|
||||||
<Setter Property="Focusable" Value="True" />
|
<Setter Property="Focusable" Value="True" />
|
||||||
<Setter Property="MinWidth" Value="6" />
|
<Setter Property="MinWidth" Value="6" />
|
||||||
<Setter Property="MinHeight" Value="6" />
|
<Setter Property="MinHeight" Value="6" />
|
||||||
|
<Setter Property="GridSplitter.ClipToBounds" Value="False" />
|
||||||
<Setter Property="GridSplitter.Padding" Value="2" />
|
<Setter Property="GridSplitter.Padding" Value="2" />
|
||||||
<Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" />
|
<Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" />
|
||||||
<Setter Property="PreviewContent">
|
<Setter Property="PreviewContent">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type ItemsControl}" TargetType="ItemsControl">
|
<ControlTheme x:Key="{x:Type ItemsControl}" TargetType="ItemsControl">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Width="500" Margin="20"
|
Width="500"
|
||||||
HorizontalAlignment="Left" Spacing="20">
|
Margin="20"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Spacing="20">
|
||||||
<StackPanel.Styles>
|
<StackPanel.Styles>
|
||||||
<Style Selector="Label">
|
<Style Selector="Label">
|
||||||
<Setter Property="Margin" Value="4" />
|
<Setter Property="Margin" Value="4" />
|
||||||
@@ -94,9 +99,6 @@
|
|||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^:disabled">
|
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -128,6 +130,9 @@
|
|||||||
<Setter Property="Label.FontFamily" Value="{DynamicResource CodeFontFamily}" />
|
<Setter Property="Label.FontFamily" Value="{DynamicResource CodeFontFamily}" />
|
||||||
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockCodeFontSize}" />
|
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockCodeFontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
x:Key="TitleLabel"
|
x:Key="TitleLabel"
|
||||||
@@ -183,7 +188,8 @@
|
|||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
RecognizesAccessKey="True" UseLayoutRounding="True" />
|
RecognizesAccessKey="True"
|
||||||
|
UseLayoutRounding="True" />
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<ListBox Margin="30">
|
<ListBox Margin="30">
|
||||||
<ListBoxItem>Item 1</ListBoxItem>
|
<ListBoxItem>Item 1</ListBoxItem>
|
||||||
@@ -67,9 +70,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- PointerOver State -->
|
<!-- Pointerover State -->
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPointerOverBackground}" />
|
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Pressed State -->
|
<!-- Pressed State -->
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
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:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
|
xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
|
||||||
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs">
|
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<Border
|
<Border
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
</internal:ResourceSelectorConverter>
|
</internal:ResourceSelectorConverter>
|
||||||
<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">
|
||||||
<ControlTemplate TargetType="dialogs:ManagedFileChooser">
|
<ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Border
|
<Border
|
||||||
Margin="8"
|
Margin="8"
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
<ListBox
|
<ListBox
|
||||||
x:Name="PART_QuickLinks"
|
x:Name="PART_QuickLinks"
|
||||||
Focusable="False"
|
Focusable="False"
|
||||||
Items="{Binding QuickLinks}"
|
ItemsSource="{Binding QuickLinks}"
|
||||||
SelectedIndex="{Binding QuickLinksSelectedIndex}">
|
SelectedIndex="{Binding QuickLinksSelectedIndex}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@@ -73,7 +74,7 @@
|
|||||||
Margin="8,0,0,0"
|
Margin="8,0,0,0"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
IsVisible="{Binding ShowFilters}"
|
IsVisible="{Binding ShowFilters}"
|
||||||
Items="{Binding Filters}"
|
ItemsSource="{Binding Filters}"
|
||||||
SelectedItem="{Binding SelectedFilter}" />
|
SelectedItem="{Binding SelectedFilter}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
IsVisible="{Binding !SelectingFolder}"
|
IsVisible="{Binding !SelectingFolder}"
|
||||||
@@ -141,7 +142,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<ListBox
|
<ListBox
|
||||||
Name="PART_Files"
|
Name="PART_Files"
|
||||||
Items="{Binding Items}"
|
ItemsSource="{Binding Items}"
|
||||||
SelectedItems="{Binding SelectedItems}"
|
SelectedItems="{Binding SelectedItems}"
|
||||||
SelectionMode="{Binding SelectionMode}">
|
SelectionMode="{Binding SelectionMode}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:converters="using:Avalonia.Controls.Converters">
|
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||||
|
x:CompileBindings="True">
|
||||||
|
|
||||||
<converters:PlatformKeyGestureConverter x:Key="KeyGestureConverter" />
|
<converters:PlatformKeyGestureConverter x:Key="KeyGestureConverter" />
|
||||||
|
|
||||||
@@ -64,25 +65,20 @@
|
|||||||
<ScrollContentPresenter
|
<ScrollContentPresenter
|
||||||
Name="PART_ContentPresenter"
|
Name="PART_ContentPresenter"
|
||||||
Margin="{TemplateBinding Padding}"
|
Margin="{TemplateBinding Padding}"
|
||||||
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
|
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
|
||||||
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}"
|
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
|
||||||
Content="{TemplateBinding Content}"
|
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
|
||||||
Extent="{TemplateBinding Extent,
|
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
|
||||||
Mode=TwoWay}"
|
|
||||||
Viewport="{TemplateBinding Viewport,
|
|
||||||
Mode=TwoWay}"
|
|
||||||
Offset="{TemplateBinding Offset,
|
|
||||||
Mode=TwoWay}">
|
|
||||||
<ScrollContentPresenter.GestureRecognizers>
|
<ScrollContentPresenter.GestureRecognizers>
|
||||||
<ScrollGestureRecognizer CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" />
|
<ScrollGestureRecognizer
|
||||||
|
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
|
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
|
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
</ScrollContentPresenter.GestureRecognizers>
|
</ScrollContentPresenter.GestureRecognizers>
|
||||||
</ScrollContentPresenter>
|
</ScrollContentPresenter>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style Selector="^ /template/ RepeatButton:pointerover > PathIcon">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
|
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
|
||||||
@@ -178,7 +174,7 @@
|
|||||||
IsLightDismissEnabled="False"
|
IsLightDismissEnabled="False"
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||||
Mode=TwoWay}"
|
Mode=TwoWay}"
|
||||||
PlacementMode="Right"
|
Placement="RightEdgeAlignedTop"
|
||||||
VerticalOffset="-4"
|
VerticalOffset="-4"
|
||||||
WindowManagerAddShadowHint="False">
|
WindowManagerAddShadowHint="False">
|
||||||
<Border
|
<Border
|
||||||
@@ -234,7 +230,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:open /template/ PathIcon#PART_ExpandIcon">
|
<Style Selector="^:open /template/ PathIcon#PART_ExpandIcon">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronSubMenuOpened}" />
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemExpandIconOpenForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:empty /template/ PathIcon#PART_ExpandIcon">
|
<Style Selector="^:empty /template/ PathIcon#PART_ExpandIcon">
|
||||||
@@ -274,12 +270,13 @@
|
|||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
MinWidth="{Binding $parent[MenuItem].Bounds.Width}"
|
||||||
HorizontalOffset="-8"
|
HorizontalOffset="-8"
|
||||||
IsLightDismissEnabled="True"
|
IsLightDismissEnabled="True"
|
||||||
IsOpen="{TemplateBinding IsSubMenuOpen,
|
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||||
Mode=TwoWay}"
|
Mode=TwoWay}"
|
||||||
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||||
|
Placement="BottomEdgeAlignedLeft"
|
||||||
VerticalOffset="-4"
|
VerticalOffset="-4"
|
||||||
WindowManagerAddShadowHint="False">
|
WindowManagerAddShadowHint="False">
|
||||||
<Border
|
<Border
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:CompileBindings="True">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter">
|
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter">
|
||||||
<Setter Property="MenuFlyoutPresenter.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
<Setter Property="MenuFlyoutPresenter.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user