private void LoadConversations() { ConversationList.Clear(); ConversationList.AddConversations(_conversations); ConversationList.SelectedConversationChanged += ConversationList_SelectedConversationChanged; }
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(); } }
public void NotifyMe(NotificationMessage notificationMessage) { string notification = notificationMessage.Notification; ConversationList.Clear(); _history = new History(); foreach (var item in _history.Histories) { ConversationList.Add(item); } FilterCollection(); }
private void LoadConversations() { if (ConversationList == null) { return; } ConversationList.Clear(); ConversationList.AddConversations(_conversations); if (ConversationList.Conversations.Any()) { ConversationList.SelectedConversationItem = ConversationList.Conversations.First(); } }
private void LoadConversations() { ConversationList conversationList = (ConversationList)LogicalTreeHelper.FindLogicalNode(this, "ConversationList"); if (conversationList == null) { return; } conversationList.Clear(); foreach (ConversationModel conversation in _conversations) { ConversationListItem conversationItem = new ConversationListItem(conversation); conversationItem.Drop += ConversationItem_Drop; conversationItem.DragOver += ConversationItem_DragOver; conversationItem.DragLeave += ConversationItem_DragLeave; conversationList.AddConversation(conversationItem); } }