开发者

from c# how do you get wpf rectangle pixel count?

开发者 https://www.devze.com 2023-03-02 02:57 出处:网络
how do you g开发者_Python百科et a rectangle dimensions defined in wpf xaml in c#? If your rectangle has no explicit size set you can get its current dimensions via ActualWidth/Height:

how do you g开发者_Python百科et a rectangle dimensions defined in wpf xaml in c#?


If your rectangle has no explicit size set you can get its current dimensions via ActualWidth/Height:

<Rectangle Name="rect" />
double width = rect.ActualWidth;
double height = rect.ActualHeight;

If this is not what you are looking for you could try writing more than one sentence.

0

精彩评论

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