public YapperChatContactsPivot()
        {
            InitializeComponent();

            YapperChatViewModel viewModel = new YapperChatViewModel(false);
            this.DataContext = viewModel;

            this.contactsCollection = new System.Windows.Data.CollectionViewSource();
            this.contactsCollection.Source = viewModel.RegisteredUsers.RegisteredUsers;
            System.ComponentModel.SortDescription contactsSort = new System.ComponentModel.SortDescription("FirstLetter", System.ComponentModel.ListSortDirection.Ascending);
            this.contactsCollection.SortDescriptions.Add(contactsSort);

            this.ContactsListSelector.ItemsSource = viewModel.RegisteredUsers.RegisteredUsers;

            this.groupsCollection = new System.Windows.Data.CollectionViewSource();
            this.groupsCollection.Source = viewModel.Groups.Groups;
            System.ComponentModel.SortDescription groupsSort = new System.ComponentModel.SortDescription("Name", System.ComponentModel.ListSortDirection.Ascending);
            this.contactsCollection.SortDescriptions.Add(groupsSort);

            BuildLocalizedApplicationBar();
        }
Esempio n. 2
0
        public YapperChatTaskPivot()
        {
            InitializeComponent();

            UserSettingsModel.Instance.LastTaskPageViewTime = DateTime.Now;
            Messenger.Default.Send<SuspendTaskCountEvent>(new SuspendTaskCountEvent() { Suspend = true});
            YapperChatViewModel viewModel = new YapperChatViewModel(false);
            this.DataContext = viewModel;
            PushNotification.PushNotification.Instance.Setup();
            this.TasksListSelector.ItemsSource = viewModel.Tasks.Tasks;

            this.swipeInteraction = new SwipeInteraction<MessageModel>();
            swipeInteraction.Initialize(this.TasksListSelector, itemManager, viewModel.Tasks.Tasks);

            this.tapEditInteraction = new TapEditInteraction<MessageModel>();
            tapEditInteraction.Initialize(this.TasksListSelector, itemManager, viewModel.Tasks.Tasks);
            tapEditInteraction.SaveEditText = this.SaveTaskName;

            _interactionManager.AddInteraction(swipeInteraction);
            FrameworkDispatcher.Update();

            BuildLocalizedApplicationBar();
        }