Пример #1
0
 private void ConversationsUC_Loaded(object sender, RoutedEventArgs e)
 {
     List <ConversationsUC> .Enumerator enumerator = ConversationsUC._previousInstances.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             ConversationsUC current = enumerator.Current;
             if (current != this)
             {
                 ((FrameworkElement)current).DataContext = null;
             }
         }
     }
     finally
     {
         enumerator.Dispose();
     }
     ConversationsUC._previousInstances.Clear();
     if (!this.PreventFromClearing)
     {
         ConversationsUC._previousInstances.Add(this);
     }
     Logger.Instance.Info("ConversationUC loaded");
 }
Пример #2
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKMessenger;component/Views/PickConversationPage.xaml", UriKind.Relative));
     this.LayoutRoot      = (Grid)base.FindName("LayoutRoot");
     this.ContentPanel    = (Grid)base.FindName("ContentPanel");
     this.conversationsUC = (ConversationsUC)base.FindName("conversationsUC");
     this.Header          = (GenericHeaderUC)base.FindName("Header");
     this.ucPullToRefresh = (PullToRefreshUC)base.FindName("ucPullToRefresh");
 }