Skip to content

DynamicResource version of PresentationFramework.Aero2 for .NET Core WPF Application.

License

Notifications You must be signed in to change notification settings

manju-summoner/DynamicAero2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamicAero2

DynamicAero2 theme is DynamicResource version of PresentationFramework.Aero2.

Differences from PresentationFramework.Aero2

  • All Brush, Style, Template and Data are specified by DynamicResource.
  • You can change the color of the control without implementing Style.
<Window.Resources>
    <SolidColorBrush x:Key="ScrollBar.Static.Background" Color="Red" />
</Window.Resources>

Theme

NormalColor

Equivalent to PresentationFramework.Aero2. NormalColor

Black

Dark

Dark

Dark

Light

Light

Download

Download Nuget Package

How to use

After adding DynamicAero2.dll to project reference, edit App.xaml as follows.

<Application [...]
             xmlns:DynamicAero2="clr-namespace:DynamicAero2;assembly=DynamicAero2">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <DynamicAero2:Theme Color="NormalColor"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Change the Color property to Dark or Light if necessary.

Theme with style

The theme will not be applied to controls that have Style applied to them.
If you want to use both Style and Theme, you need to set BasedOn="{StaticResource {x:type Button}}" to Style.

Correct code

<Button>
  <Button.Style>
    <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}"}/>
  </Button.Style>
</Button>

Incorrect code

<Button>
  <Button.Style>
    <Style TargetType="Button"/>
  </Button.Style>
</Button

License

MIT license.

Credits

Copyright (c) Manju Summoner

Theme styles and templates was converted based on dotnet / wpf repository.
Copyright (c) .NET Foundation and Contributors.

About

DynamicResource version of PresentationFramework.Aero2 for .NET Core WPF Application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages