Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TitleBar - Add support for PreferredHeightOption #1308

Open
TGSAN opened this issue Jan 8, 2025 · 0 comments
Open

TitleBar - Add support for PreferredHeightOption #1308

TGSAN opened this issue Jan 8, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@TGSAN
Copy link

TGSAN commented Jan 8, 2025

Is your feature request related to a problem? Please describe

WinUI has the PreferredHeightOption property that allows setting the TitleBar height to TitleBarHeightOption.Tall, making the title bar buttons and the TitleBar height both 48px. However, such a setting does not seem to be available in WPF-UI.

https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#interactive-content

Describe the solution you'd like

Add a new property (e.g., PreferredHeightOption) to the TitleBar and use an enumeration (e.g., TitleBarHeightOption) to set a taller button and title bar height.

Describe alternatives you've considered

Currently, I modify the button height by overriding the Style, but this approach is too intrusive for WPF-UI. If the property names in WPF-UI change in the future, this method of changing the height will also become ineffective.

<ui:TitleBar.Resources>
    <Style TargetType="{x:Type ui:TitleBarButton}" BasedOn="{StaticResource {x:Type ui:TitleBarButton}}">
        <Setter Property="Height" Value="48" />
    </Style>
</ui:TitleBar.Resources>

Additional context

No response

@TGSAN TGSAN added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant