2
我對ActualWidth
或ActualHeight
的工作方式或計算方式感到有點困惑。ActualHeight/ActualWidth
<Ellipse Height="30" Width="30" Name="rightHand" Visibility="Collapsed">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/Hand.png" />
</Ellipse.Fill>
</Ellipse>
當我使用上面的代碼,我得到30 ActualWidth
和ActualHeight
。但是當我以編程方式定義一個橢圓時,即使我定義了(最大)高度和(最大)寬度屬性,我也不明白它是如何可以爲0的,所以ActualWidth
和ActualHeight
都是0。