开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜