-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from Janek91/colorsDemo
Added theme colors demo page
- Loading branch information
Showing
19 changed files
with
377 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<NoWarn>NU5104, NU1507</NoWarn> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
|
||
<Authors>Larymar,SKProCH,Appleneko2001</Authors> | ||
<Company>Larymar,SKProCH,Appleneko2001</Company> | ||
<PackageProjectUrl>https://github.com/AvaloniaCommunity/Material.Avalonia</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/AvaloniaCommunity/Material.Avalonia</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(MSBuildThisFileDirectory)\.editorconfig" Link=".editorconfig" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<AvaloniaResource Include="**\*.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</AvaloniaResource> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>8</LangVersion> | ||
<NoWarn>NU5104, NU1507</NoWarn> | ||
|
||
<Authors>Larymar,SKProCH,Appleneko2001</Authors> | ||
<RepositoryUrl>https://github.com/AvaloniaUtils/material.avalonia</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/AvaloniaUtils/material.avalonia</PackageProjectUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<Description>Color palette component of Material.Avalonia.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<AvaloniaResource Include="**\*.xaml"> | ||
<SubType>Designer</SubType> | ||
</AvaloniaResource> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using Avalonia.Markup.Xaml; | ||
using Avalonia.Media; | ||
using Material.Colors; | ||
|
||
namespace Material.Demo.Extensions; | ||
|
||
public class PrimaryColorExt : MarkupExtension | ||
{ | ||
public PrimaryColorExt() | ||
{ | ||
} | ||
|
||
public PrimaryColorExt(PrimaryColor color) | ||
{ | ||
Color = color; | ||
} | ||
|
||
[ConstructorArgument("color")] public PrimaryColor Color { get; set; } | ||
|
||
public override object ProvideValue(IServiceProvider serviceProvider) | ||
{ | ||
return new SolidColorBrush(SwatchHelper.Lookup[(MaterialColor)Color]); | ||
} | ||
} |
Oops, something went wrong.