Skip to content

[Bug]: The default ItemNameTextBlock style for the SidebarView causes the icon on the left to be covered #246

Done

Description

@hoshiizumiya

Describe the bug

image

Steps to reproduce the bug

if the icon source in the tree view to be setted as this below rather than a png image in the sample.

IconSource = new FontIconSource
{
    FontFamily = new FontFamily("Segoe UI Emoji"),
    FontSize = 14,
    Glyph = "\U0001F4C1"
},
Children = [],
IsExpanded = true,

Expected behavior

No response

Screenshots

No response

NuGet package version

11.1.0

IDE

Visual Studio 2026

Additional context

<Setter Target="ItemNameTextBlock.Margin" Value="8,0,12,0" />

The best way is to reduce ItemNameTextBlock.Margin's left 8 value to such as 4.
You can compare the whole file with my implementation: https://github.com/SnapHutaoRemasteringProject/Snap.Hutao.Remastered/blob/efc84d7f746c9158be2d6b6d45b15b30d4636c45/src/Snap.Hutao.Remastered/Snap.Hutao.Remastered/UI/Xaml/View/Window/AlphaUpdateSidebarResources.xaml
(Because the specific value didn't expose in the xaml style setter. Note: I also made others style improvement change)

Activity

  1. ghost1372 commented on Nov 24, 2026

    @ghost1372
    Owner

    @hoshiizumiya can you make a pr?

  2. hoshiizumiya commented on Nov 24, 2026

    @hoshiizumiya
    ContributorAuthor

    @ghost1372 Hi, I made one. But I'm not sure whether it work fine.

  3. added a commit that references this issue on Nov 24, 2026
    840f82d
  4. ghost1372 commented on Nov 24, 2026

    @ghost1372
    Owner

    Thank you

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions