I am trying to initialize my controls in Silverlight. I am looking for something similar to Form_Load event, which gets triggered when the form loads first time.
The Loaded event in Silverlight gets called quite early, even before the control gets displayed in UI. I want to intialize prior to the UI rendering of the control the first time. What choices do i have? Below is my code for reference. It's pretty basic.
Appreciate your response!
1 <local:ControlBase x:Class="MyUserControl"
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 xmlns:local="clr-namespace:GridTest.UI.Framework;assembly=GridTest.UI.Framework"
5 xmlns:ImageViewer="clr-namespace:GridTest.ImageViewer"
6 FontFamily="./Fonts/CALIBRI.TTF#Calibri" FontSize="13">
7 <Grid x:Name="LayoutRoot" Background="White" Loaded="MyUserControl_Loaded" >
8 <ImageViewer:ImagePreview HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="ucImagePreview"/>
9 </local:ControlBase>
10