What measurement units does Silverlight and WPF use?

前端 未结 4 1473
囚心锁ツ
囚心锁ツ 2021-01-17 10:29

Does anyone know what measurement units are used by Silverlight/WFP? For example, if I create a new button and set its height to 150, is that 150 pixels? points? millimeters

4条回答
  •  一个人的身影
    2021-01-17 11:07

    MSDN's documentation states that the FrameworkElement.Height property (for Silverlight) refers to:

    The height, in pixels, of the object

    However, for WPF it refers to:

    a device-independent unit (1/96th inch) measurement

    So, to answer your question... pixels for Silverlight, device-independent units for WPF.

提交回复
热议问题