开发者

what is the difference in setting FontSize = 25 or 25pt?

What is the actual difference in giving fontsize in 25 and 25pt?. Why the 25pt is looking bigg开发者_如何学Goer in size?. So while handling font size which one to follow 25 or 25pt?

    <StackPanel>
        <TextBlock FontSize="25" >Kishore</TextBlock>
        <TextBlock FontSize="25pt" >Kishore</TextBlock>
    </StackPanel>

o/p

what is the difference in setting FontSize = 25 or 25pt?


The FontSize property defaults to pixels when a unit qualifier is not specified (in passing, note that Silverlight only supports pixels).

The pt unit qualifier means the value in specified in points, a resolution-independent unit defined as 1/72 of an inch. That's why the resulting size is larger: for instance, on a WPF display surface, 25pt is roughly equivalent to 33px, because WPF always provides 96 DPI surfaces.


http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock.fontsize.aspx

states "An unqualified value is measured in device independent pixels." which is the px unit

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜