在WPF中,控件有Width 和 ActualWidth两个属性,二者的区别如下:

Width:是我们期望控件应有的宽度,是可读写的,可在xaml文件中设置,也可在程序中设置。如果没有设置,Width的值为NaN(Not a Number)

ActualWidth:是控件Render的实际宽度,控件Render之前,它的值为0,。该属性是只读的。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案