-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainView.xaml
More file actions
58 lines (53 loc) · 2.89 KB
/
MainView.xaml
File metadata and controls
58 lines (53 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!--
**********************************************************************
Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
**********************************************************************
-->
<!-- This is the main window for our chat application. -->
<Window x:Class="ChatDemoGUI.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cm="clr-namespace:System.ComponentModel;assembly=System"
xmlns:local="clr-namespace:ChatDemoGUI"
Icon="Images/chat.ico"
Title="Chat Demo"
MinWidth="400" MinHeight="540" Style="{StaticResource PageBackground}"
Activated="windowActivated" Visibility="Visible">
<Window.CommandBindings>
<CommandBinding Command="local:ChatCommands.Login"
Executed="login" CanExecute="isLoginEnabled"></CommandBinding>
<CommandBinding Command="local:ChatCommands.Logout"
Executed="logout" CanExecute="isLogoutEnabled"></CommandBinding>
<CommandBinding Command="local:ChatCommands.Exit" Executed="exit"></CommandBinding>
<CommandBinding Command="local:ChatCommands.About" Executed="about"></CommandBinding>
</Window.CommandBindings>
<DockPanel LastChildFill="True">
<!-- Menu bar -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" DockPanel.Dock="Top">
<Menu Style="{StaticResource Menu}">
<MenuItem Header="_File">
<MenuItem Header="_Login" Command="local:ChatCommands.Login"></MenuItem>
<MenuItem Header="_Logout" Command="local:ChatCommands.Logout"></MenuItem>
<MenuItem Header="E_xit" Command="local:ChatCommands.Exit"></MenuItem>
</MenuItem>
<MenuItem Header="_Help">
<MenuItem Header="_About" Command="local:ChatCommands.About"></MenuItem>
</MenuItem>
</Menu>
</StackPanel>
<!-- TextBlock with the status message -->
<TextBlock VerticalAlignment="Bottom"
DockPanel.Dock="Bottom"
Text="{Binding Source={StaticResource ChatModel}, Path=State,
Converter={StaticResource statusFormatter}}">
</TextBlock>
<!-- Frame for load XAML pages
The source attribute uses a binding to show the frame assigned to
ChatModel.CurrentFrame. When the property changes, the loaded frame
is reloaded with the new page. -->
<Frame HorizontalAlignment="Stretch"
JournalEntry.KeepAlive="True"
Source="{Binding Source={StaticResource ChatModel}, Path=CurrentFrame}" JournalOwnership="OwnsJournal"
NavigationUIVisibility="Hidden" Name="mainFrame" Visibility="Visible" IsHitTestVisible="True" IsTabStop="True"></Frame>
</DockPanel>
</Window>