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 Header and TrailingContent IsHitTestVisible #1366

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

xylieong
Copy link

@xylieong xylieong commented Feb 27, 2025

When Header or TrailingContent of TitleBar contains any UIElement, user is not able to click on the UIElement to select and move the application window. (Eg. a TextBlock)

Solution: Make use of property IsHitTestVisible. When Header or TrailingContent of TitleBar is customised with UIElement with IsHitVisible set false, then allow user to click on the UIElement and able to select & move the window.

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

TitleBar Header and TrailingContent makes user unable to click to select window and move window.

Issue Number: N/A

What is the new behavior?

If set 'IsHitTestVisible' of UIElement of Header or TrailingContent to False, then user will not be able to hit on the UIElement and be able to select the window (and move the window, if they want to).

Other information

N/A

…e, then user is not able to click on the UIElement.

When TitleBar is customised with TextBlock only and with IsHitVisible set false, then allow user to click on the TextBlock and able to select & move the window.
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles titlebar Titlebar updates labels Mar 3, 2025
@xylieong
Copy link
Author

xylieong commented Mar 3, 2025

@pomianowski Please help to review PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls Changes to the appearance or logic of custom controls. dotnet PR Pull request release styles Topic is related to styles titlebar Titlebar updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant