Skip to content

Conversation

Nuklon
Copy link

@Nuklon Nuklon commented Aug 8, 2025

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?

Currently, WPF-UI doesn't set the border color based on accent. This adds that.
Old left, right new.

image

@Nuklon Nuklon requested a review from pomianowski as a code owner August 8, 2025 17:29
@github-actions github-actions bot added the controls Changes to the appearance or logic of custom controls. label Aug 8, 2025
dwAttribute = Dwmapi.DWMWINDOWATTRIBUTE.DMWA_USE_IMMERSIVE_DARK_MODE_OLD;
}

// TODO: Validate HRESULT
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also corrected this, it's only returning 0 on success.

@Nuklon
Copy link
Author

Nuklon commented Aug 8, 2025

Border is now only active when focused (same as WinUI). When deactivated it gets back to default OS color.

@Nuklon
Copy link
Author

Nuklon commented Aug 11, 2025

This also fixes FluentWindow background with None backdrop extending into window. Taken from #1505.

@Nuklon Nuklon changed the title Add setting border color Add setting border color + fix background extending inside FluentWindow Aug 11, 2025
{
CaptionHeight = 0,
CornerRadius = default,
GlassFrameThickness = WindowBackdropType == WindowBackdropType.None ? new Thickness(0.00001) : new Thickness(-1), // 0.00001 so there's no glass frame drawn around the window, but the border is still drawn.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix for FluentWindow. -1 cannot be used if None is specified, otherwise the background of the window is rendered 1 pixel inside, which is obviously wrong.

@github-actions github-actions bot added the ⭐ top pull request Top pull request. label Aug 12, 2025
@Nuklon Nuklon mentioned this pull request Aug 14, 2025
{
try
{
if (Utilities.IsCompositionEnabled)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addresses: COMException: {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (Exception from HRESULT: 0x80263001).

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 ⭐ top pull request Top pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant