Skip to content

Styling library that provides a beautiful modern window design for Avalonia Applications with Material.Avalonia toolkit.

License

Notifications You must be signed in to change notification settings

appleneko2001/Material.WindowStyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Material.WindowStyle Demo!

Getting started

To use this window style in your Avalonia Application, please follow below steps!

Requirements:

Steps:

  1. Update your Avalonia UI framework to latest. Make sure your framework version is newer or equal 11.0.0.
  2. Install Material.WindowStyle package from NuGet. The major and minor package version should be 0.11. Build and revision version should be as newer as possible so you wont miss updates.
  3. Add <StyleInclude Source="avares://Material.WindowStyle/WindowStyleInclude.axaml"/> to your styles of Application. It should be after theme styles and before your custom styles.
  4. (Optional, it should be work automatically since 2025.03.08 commit) Add ExtendClientAreaToDecorationsHint="True" attributes to your Window view:
<Window
ExtendClientAreaToDecorationsHint="True">
    <!-- content view -->
</Window>
  1. (Optional) You may want apply fix for Windows Platform. This fix used for correcting margin while the Window is maximized. Windows OS could overfill the window. To apply this fix, just add windows-platform-fix to your Classes property of window. This can be done automatically or manually, depending how you create your avalonia application.

Bonus:

Change colours of title bar

Add this style to your application xaml

<Style Selector="chrome|MaterialTitleBar">
    <Setter Property="Background" Value="#4C4C4C"/>
    <Setter Property="Foreground" Value="White"/>
</Style>

alternative way (static resource):

<Application.Resources>
    <SolidColorBrush x:Key="MaterialDesignPaper">#4C4C4C</SolidColorBrush>
    <SolidColorBrush x:Key="MaterialDesignBody">White</SolidColorBrush>
</Application.Resources>

This will set material title bar colours to all windows by default. Background will be gray, and the foreground will be white. And also, it will make this library works without Material.Avalonia.

TODO:

  • complete README (additional info about custom window title buttons, some unfixable behaviours (known issues) and advanced theming support)
  • better demo

About

Styling library that provides a beautiful modern window design for Avalonia Applications with Material.Avalonia toolkit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages