Skip to content

You can link to this repo on NuGet page #1

Description

@shirok1

https://www.nuget.org/packages/Material.WindowStyle/

Thank you very much for your project, it goes quite well with Material Design. By the way, what do I have to do to hide some of the buttons (like hide the full screen button and maximize button)?

Activity

  1. appleneko2001 commented on Feb 12, 2022

    @appleneko2001
    Owner

    Hi @shirok1 !

    I will update NuGet page later. Thanks you that noticed me about link of repository on NuGet!

    You can hide any elements through AvaloniaUI styling system. Here, I wrote an example to hide and disable the fullscreen button.

    Add next style to styles of window

    <Style Selector="chrome|MaterialTitleBar /template/ chrome|MaterialTitleBarButtons /template/ TemplatedControl#PART_FullScreenButton">
        <Setter Property="IsEnabled" Value="False"/>
        <Setter Property="IsVisible" Value="False"/>
    </Style>

    and your styles of window should looks like below:

    image

    so the fullscreen button will be in hidden and disabled state. Just like below one:

    image

    I think it needs more simplify to archiving this feature. I will solve that later.

    PS: If you want hide other buttons (like minimize, maximize / restore, even close button), you could replace PART_FullScreenButton with one of those:

    • PART_MinimizeButton
    • PART_RestoreButton
    • PART_CloseButton

    But I don't recommend you to hide them, unless you have the reasons.

  2. added a commit that references this issue on Mar 28, 2022
  3. appleneko2001 commented on Jun 20, 2022

    @appleneko2001
    Owner

    Hi there
    I have added repository link to NuGet package already
    I forgot to comment here sorry(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions