Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.98 KB

README.md

File metadata and controls

32 lines (27 loc) · 1.98 KB

Material.WindowStyle

A styling library that provides a beautiful, modern window design for Avalonia Applications. Its allowed to use without any themes dependence (since 0.11.0.23-alpha)

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-preview1.
  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. Add those attributes to your Window view:
ExtendClientAreaToDecorationsHint="True"
  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 by code-behind or do it 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>

This will set material title bar colours to all windows by default. Background will be gray, and the foreground will be white.