public CloudPanel(CloudController controller) {
            InitializeComponent();
            this.controller = controller;
            Cloud = this.controller.Cloud;

            InitializeFlyout();
        }
 void CorrectController() {
     if (controller == App.Connection.MessageController.CurrentCloud) return;
     if (controller != null) {
         
     }
     controller = App.Connection.MessageController.CurrentCloud;
     controller.PropertyChanged += ControllerOnPropertyChanged;
 }
        protected override async void OnNavigatedTo(NavigationEventArgs e) {
            cloudController = App.Connection.MessageController.CurrentCloud;
            cloudController.UnreadMessages = 0;
            DefaultViewModel["Clouds"] = App.Connection.SessionController.CurrentSession.Clouds;
            CloudGrid.Visibility = Visibility.Collapsed;
            CloudListView.ScrollIntoView(cloudController.Cloud);

            await CloudListView.WaitForLayoutUpdateAsync();
            CloudListView.SelectedItem = cloudController.Cloud;

            await cloudController.EnsureLoaded();
            DefaultViewModel["Items"] = cloudController.Messages;

            cloudController.Messages.CollectionChanged += MessagesOnCollectionChanged;
            ScrollChat();

            OverlayGrid.Visibility = Visibility.Collapsed;
        }
 public UserList(CloudController controller) {
     InitializeComponent();
     _controller = controller;
     InitializeFlyout();
 }