public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/FstnUserControl;component/Market/Apps/AppsPreview.xaml", System.UriKind.Relative)); this.RootLayout = ((System.Windows.Controls.Canvas)(this.FindName("RootLayout"))); this.ContentLayout = ((System.Windows.Controls.StackPanel)(this.FindName("ContentLayout"))); this.Title = ((System.Windows.Controls.TextBlock)(this.FindName("Title"))); this.Image = ((System.Windows.Controls.Image)(this.FindName("Image"))); this.RatingControl = ((Microsoft.Phone.Controls.Rating)(this.FindName("RatingControl"))); this.Description = ((System.Windows.Controls.TextBlock)(this.FindName("Description"))); this.WaitingAnim = ((FstnUserControl.ImageWaiting)(this.FindName("WaitingAnim"))); }
public void Reload() { if (WaitingAnim != null) { Random random = new Random(DateTime.Now.Millisecond); Double tempWidth = WaitingAnim.Width; Double tempHeigt = WaitingAnim.Height; RootLayout.Children.Remove(WaitingAnim); WaitingAnim.Clean(); WaitingAnim = null; WaitingAnim = new ImageWaiting(); WaitingAnim.Height = tempHeigt; WaitingAnim.Width = tempWidth; RootLayout.Children.Add(WaitingAnim); WaitingAnim.MaskedEvent += WaitingAnim_MaskedOnRelaod; WaitingAnim.start(); LoadPreloader(); } }