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.
精彩评论