locked
Character Spacing is not working for Numeric values.

    Question

  • Hi,

    I am working on Visual Studio 2012 - Windows 8.

    I was trying to give character spacing to text block that contains both alphabets and numerics. Numerics are not adjusted according to the property value in Visual Studio 2012, although the spacing can be adjusted for alphabets.

    I tried the following code :

    <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" 

     FontSize="35" Text="SINCE 2011" Foreground="White" CharacterSpacing="-40"/>

    Please help.

    Thanks in Advance,

    Rahul.

    Tuesday, September 30, 2014 9:41 AM

Answers

  • HI RahulR05,

    Well, if you modify the number from -40 to -400, you should be able to see the numeric values have correct behavior.

    Per documentation CharacterSpacing property mentioned, The uniform spacing between characters, in units of 1/1000 of an em, "40" you set here is means 40em, that would not affect too much simply read from our eyes.

    Let me show you the difference, its really get smaller space but hardly to see from eyes, and uppercase texts are more clear than normal. the first one is -40 and the second one is 0.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Monday, October 6, 2014 2:12 AM
    Moderator

All replies

  • Hi Rahul,

    I checked the TextBlock CharacterSpacing property, it’s belong to Windows Store app. I will move this thread to Building Windows Store apps with C# or VB Forum. Where you can contact many experts about this topic.

    Thanks for your understanding!

    Best Regards,

    Jimmy Yang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 1, 2014 6:59 AM
  • HI RahulR05,

    Well, if you modify the number from -40 to -400, you should be able to see the numeric values have correct behavior.

    Per documentation CharacterSpacing property mentioned, The uniform spacing between characters, in units of 1/1000 of an em, "40" you set here is means 40em, that would not affect too much simply read from our eyes.

    Let me show you the difference, its really get smaller space but hardly to see from eyes, and uppercase texts are more clear than normal. the first one is -40 and the second one is 0.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Monday, October 6, 2014 2:12 AM
    Moderator