コード例 #1
0
        private void BtnCreateChat_Click(object sender, RoutedEventArgs e)
        {
            var chat = new ChatWindowView(new SpaceBook(ViewModel.Name));

            chat.Closed += Chat_Closed;
            chat.Show();
        }
コード例 #2
0
        public MainWindowView()
        {
            ViewModel   = new MainWindowViewModel();
            DataContext = ViewModel;

            ChatViews = new ObservableCollection <ChatWindowView>();

            var chat = new ChatWindowView(new SpaceBook("Leo"));

            chat.Closed += Chat_Closed;
            chat.Show();

            var chat2 = new ChatWindowView(new SpaceBook("Nathalia"));

            chat2.Closed += Chat_Closed;
            chat2.Show();

            InitializeComponent();
        }