Silverlight 3.0 - How to access a MainPage control value from an UserControl
问题 I need to retrieve some control values from the MainPage to an UserControl. In this UserControl I need to be able to get the Frame.ActualWidth & Frame.ActualHeight values (in this case, the Frame element is in the MainPage and the UserControl is loaded inside a MainPage's Grid via xaml). Does someone have a sample? Thank you Josimari Martarelli ESL Sistemas Logísticos Silverlight UI Design jmartarelli@logfacil.com.br 回答1: MainPage m = (MainPage)Application.Current.RootVisual; 回答2: In