dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

WPF Core Xaml Designer RTL layout and custom fonts bugs #2044

Closed scalablecory closed 5 years ago

scalablecory commented 5 years ago

From @mrNo0b on Thursday, October 10, 2019 8:26:32 PM

When I set FlowDirection="RightToLeft" in MainWindow in WPF Core 3 app and when I add controls to the MainWindow they shows up in their correct locations in Designer but when I want to click on them to select, the selection highlight is in the opposite side of the window VS 2019 16.3.4

designerIssue

Another issue that I have is that the designer don't support custom fonts, I added FontAwsome (Font Awesome 5 Free-Solid-900.otf) to my project and I use it in TextBlock for example: <TextBlock Text="&#xF0C7;" FontSize="16" Foreground="White"/> when I run the app I can see the fonts but in Designer I can only see empty character boxes

bug2

Copied from original issue: dotnet/core#3597

grubioe commented 5 years ago

Hi @scalablecory Can you log an issue in the Visual Studio Developer Community- it will then be directed to the right Visual Studio team to troubleshoot? By logging an issue there, the Visual Studio team will have more information to troubleshoot your issue.

FYI: @diverdan92

mrNo0b commented 4 years ago

I will not log this issue there because I dont want to share my private info, just fix this issue already, 6 patches released since this report and none of them fixes it.

spadapet commented 4 years ago

@mrNo0b I need more details to reproduce the font issue:

I added that exact same font to my project and it does show up in the designer and runtime. Here is the sample project I'm using in Visual Studio 2019 version 16.3.10:

Thanks!

mrNo0b commented 4 years ago

Thank you for looking into it! I tried to do it the same way you did in the sample project, I see the fonts in designer but if I rebuild it will turn to squares again, also if I remove one word from font name I can see the fonts again but when I rebuild its gone again 🤣, probably I did something wrong with the fonts... so this issue can be closed

the bigger issue is the flipped RTL layout, Have you tried to reproduce the first issue with RTL layout? the first screenshot shows all the code that needed to reproduce the issue

Thank you!

spadapet commented 4 years ago

Yes we actually already had user feedback item about the RTL layout issue: https://developercommunity.visualstudio.com/content/problem/776277/wpf-xaml-designer-working-wrong-with-horizontal-al.html You can choose to upvote that item.

For the fonts breaking after a rebuild, make sure you're using the latest VS update which is 16.3.10. There were some designer font issues that were fixed since 16.3.4.

mrNo0b commented 4 years ago

In VS to 16.3.10 fonts still broken, I think it has problem displaying svg in font or something because I use custom .ttf font with icons and designer not showing it too, I also use Arimo.ttf and I can see the font in the designer.

I hope RTL and font support will be fixed some time soon...