private void InitializeView(int? chatId) { if(chatId != null) chatViewModel = new ViewModels.ChatViewModel(chatId.Value); else chatViewModel = new ViewModels.ChatViewModel(); chatViewModel.SetListBox(ParticipantList); chatViewModel.SetScrollViewer(ChatScroll); DataContext = chatViewModel; Loaded += ChatView_Loaded; }
private void InitializeView(int?chatId) { if (chatId != null) { chatViewModel = new ViewModels.ChatViewModel(chatId.Value); } else { chatViewModel = new ViewModels.ChatViewModel(); } chatViewModel.SetListBox(ParticipantList); chatViewModel.SetScrollViewer(ChatScroll); DataContext = chatViewModel; Loaded += ChatView_Loaded; }