📄 mainview.xaml
字号:
<!--
// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Chat Demo is licensed to you under the terms
// described in the CHAT_DEMO_LICENSE file included in this// distribution.
//
// **********************************************************************
-->
<!-- 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="logout" 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -