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

InfoBadge information is not centered #9542

Open
bogdan-patraucean opened this issue Apr 13, 2024 · 0 comments
Open

InfoBadge information is not centered #9542

bogdan-patraucean opened this issue Apr 13, 2024 · 0 comments
Labels
area-InfoBadge area-TextBlocks TextBlock, RichTextBlock bug Something isn't working team-Controls Issue for the Controls team

Comments

@bogdan-patraucean
Copy link

bogdan-patraucean commented Apr 13, 2024

Describe the bug

Using the InfoBadge for the most basic thing like showing a number will not show that number centered, sometimes with more than one pixel off. Considering the advancements in today's technology we should be able to achieve this important milestone in humanity's evolution. 🚀 Let's make the world a better place!

Steps to reproduce the bug

Just use the InfoBadge to display a notification.

<InfoBadge Value="0"></InfoBadge>

Expected behavior

I would expect the number to be centered.

I made this sample in 5 minutes which is already better than the existing result we get with InfoBadge (and it works for different scalings too). I know the control has more complexity, but if I can achieve this better version of it with a few lines of code, I'm sure Microsoft can solve this as well:

<Grid>
    <Rectangle Width="16" Height="16" Fill="{ThemeResource SystemAccentColorDark1}" RadiusX="9" RadiusY="7"></Rectangle>
    <TextBlock FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Padding="0,0,0,1">0</TextBlock>
</Grid>

Screenshots

image
image

Left is my code, right is InfoBadge.

NuGet package version

WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000

Windows version

No response

Additional context

I know this is more of a nice to have fix, but it's still something that needs fixing.

@bogdan-patraucean bogdan-patraucean added the bug Something isn't working label Apr 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Apr 13, 2024
@codendone codendone added area-TextBlocks TextBlock, RichTextBlock team-Controls Issue for the Controls team area-InfoBadge and removed needs-triage Issue needs to be triaged by the area owners labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-InfoBadge area-TextBlocks TextBlock, RichTextBlock bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

2 participants