public ChooseFiles(List <ConversationModel> conversations, List <FileModel> files)
        {
            _conversations = conversations;
            _files         = files;
            InitializeComponent();

            FileSortButton sortButton = (FileSortButton)LogicalTreeHelper.FindLogicalNode(this, "FileSortButton");

            FileList.BoundSortButton = sortButton;
            FileList.AllowSelect     = true;

            ReadyButton.Clicked += (s, ea) =>
            {
                SelectedFiles = FileList.SelectedFiles;
                ReadyButtonClicked?.Invoke(this, EventArgs.Empty);
            };

            CancelButton.Clicked += (s, ea) =>
            {
                CancelButtonClicked?.Invoke(this, EventArgs.Empty);
            };

            ConversationList.Clear();
            ConversationList.AddConversations(_conversations);

            ConversationList.SelectedConversationChanged += ConversationList_SelectedConversationChanged;

            if (ConversationList.Conversations.Any())
            {
                ConversationList.SelectedConversationItem = ConversationList.Conversations.First();
            }
        }
Exemple #2
0
        private void LoadConversations()
        {
            ConversationList.Clear();
            ConversationList.AddConversations(_conversations);

            ConversationList.SelectedConversationChanged += ConversationList_SelectedConversationChanged;
        }
Exemple #3
0
        private void LoadConversations()
        {
            if (ConversationList == null)
            {
                return;
            }

            ConversationList.Clear();
            ConversationList.AddConversations(_conversations);

            if (ConversationList.Conversations.Any())
            {
                ConversationList.SelectedConversationItem = ConversationList.Conversations.First();
            }
        }