Skip to content

The Textbox cursor color is transparent #8207

@lgBlog

Description

@lgBlog

Describe the bug

When the mica background is enabled, the theme is Light.

After redefining the resource, the Textbox cursor becomes transparent.

<Grid.Resources>
      <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent"/>
</Grid.Resources>

Steps to reproduce the bug

1.Set the Mica background。
2.

  <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
      <StackPanel.Resources>
          <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent"/>
      </StackPanel.Resources>
      <TextBox Height="100" Width="200"/>
  </StackPanel>

3.Click the Textbox to get focus.

Expected behavior

The cursor should be black.

Screenshots

image

NuGet package version

WinUI 3 - Windows App SDK 1.2.3: 1.2.230118.102

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-TextBoxTextBox, RichEditBoxbugSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersteam-ControlsIssue for the Controls team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions