locked
bug in textblock with scaling RRS feed

  • Question

  • i created an Grid application based on the template of visual studio 2013. I changed the page title to something very long and applied wordellipse. The result when i choose a resolution with 100% zooming:

    That one is looking good, now when i choose a resolution with 140% zoomfactor

    as you see, at the bottom of the text its getting clipped. any workaround to get this fixed?


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 25, 2013 1:28 PM

Answers

  • Oh ok, I got it Dave. I see the problem now...For example, in the zoomed in version, I see that the "g" of the word "ger" and "erhg" gets clipped - you can only see upper half of the "g", the bottom half is out of view.

    For this issue, the textblock that holds the string has a default margin set. You could try changing the TextBlock definition to increase the size of the TextBlock and use something like this:

    <TextBlock x:Name="pageTitle" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" Height="140" Padding="0,40,0,0"
                            IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Center" Margin="0,0,0,0" Text="thuiw ... 


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Wednesday, November 27, 2013 12:39 AM
    Moderator

All replies

  • Hi Dave,

    Can you please share your repro via SkyDrive so that we can look and investigate if there is any workaround?

    Thanks,

    Prashant.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Monday, November 25, 2013 7:19 PM
    Moderator
  • here is an project: http://sdrv.ms/IduHgk

    open the project, run in the simulator. Make sure you ahve a resolution that cause 100% scale and see the page title looks nice. Select a resolution that has 140% and see the cropped page title.

    how to report bugs for windows? there isnt a connect site right? do i need to create support cases through the dev portal? also have still the localisation issue with scaling


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 25, 2013 7:51 PM
  • Thanks for sharing the project Dave. I will look at it in some time.

    Regarding your questions:

    1. how to report bugs for windows? there isnt a connect site right?

    [Prashant]: Yes, there is no Connect site for reporting Windows bugs. You can report issues that you think are a bug in the forums (right here). Alternately you can also open a support case using your developer account through the dev portal to report a bug.

    2. do i need to create support cases through the dev portal?

    [Prashant]: You could do that too.

    3. also have still the localisation issue with scaling<o:p></o:p>

    [Prashant]: Is this some other issue that you are referring to?


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Monday, November 25, 2013 7:58 PM
    Moderator
  • thanks for 1 and 2; 3; yes got an issue with the multi langilual toolkit and when you provide images for different scales. seems packaging goes wrong; see: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/68e6ff9d-9510-4dca-97ac-c293caaf0b58/localization?forum=winappswithcsharp

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 25, 2013 8:02 PM
  • Hi Dave,

    I ran your project and probably I am not clear on the repro steps. Can you please clarify what you meant by: "Select a resolution that has 140% and see the cropped page title."

    Here's what I tried:

    1.) Ran the project in the Simulator with the screen: 10.6'' 1366x768 (16:9, 100%)

    2.) I see the title spread out like your screenshot 1 above.

    3.) Then I click the "Change Resolution" button on the simulator (screen icon on the right side of the simulator) and then choose: 10.6'' 1920x1080 (16:9, 140%)

    4.) In this new resolution, I still see a good screen like Screenshot 1 above.

    If you can provide the exact steps to get to the problem scenario, that would help.

    Thanks,

    Prashant


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Tuesday, November 26, 2013 2:09 AM
    Moderator
  • thats exactly what i did to get the result as soon above. can you confirm the text is is gettting trimmed? without trimming it looks good here as well

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, November 26, 2013 10:05 AM
  • Oh ok, I got it Dave. I see the problem now...For example, in the zoomed in version, I see that the "g" of the word "ger" and "erhg" gets clipped - you can only see upper half of the "g", the bottom half is out of view.

    For this issue, the textblock that holds the string has a default margin set. You could try changing the TextBlock definition to increase the size of the TextBlock and use something like this:

    <TextBlock x:Name="pageTitle" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" Height="140" Padding="0,40,0,0"
                            IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Center" Margin="0,0,0,0" Text="thuiw ... 


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Wednesday, November 27, 2013 12:39 AM
    Moderator
  • well got it on the same position now so it seems it fixes the issue. but still weird have to change this for different scales?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, November 27, 2013 12:18 PM