Getting current size of WPF controls
问题 I have Image control in my Window. The size of this Image control is set to "Auto". <Image x:Name="videoImg" Stretch="Fill" Height="Auto" Width="Auto" /> When i try to get access, it returns 0. How to see real size of this control? It resizes with window. 回答1: You can use .ActualHeight and .ActualWidth to get the rendered Height / Width of a control 回答2: The thing is, the Width and Height properties let you express the desired size , whereas what you want is the rendered size - which can be