当前位置:网站首页>C # switch pages through frame and page
C # switch pages through frame and page
2022-07-07 14:12:00 【Peacock Flying Southeast - Shenzhen】
background You need to add licence function We need to make a decision licence page then mainwindow Switch between home page and login page So Need to put Separate pages
Realize the idea stay mainwindow Create a frame And then in the corresponding cs basis licence To determine whether to load the home page
1 stay mainwindow Use in frame
<Grid>
<Frame
Grid.Row="1"
x:Name="frmMain"
Margin="0,0,0,0"
NavigationUIVisibility="Hidden" FontSize="18">
</Frame>
</Grid>
2 establish page Add an existing item choice page For example, added MainHolePage.xaml
3 stay mainwindow Specify the page to display
frmMain.Source = new Uri("View/MainHoldPage.xaml", UriKind.Relative);
ps:
1 Add to page And then I found out keydown Event cannot be triggered It was solved later :
1 stay page Write in :
Loaded="Page_Loaded"
2 Write in the corresponding event :
private void Page_Loaded(object sender, RoutedEventArgs e)
{
var window = Window.GetWindow(this);
window.KeyDown += Page_KeyDown;
}
3 then page Of keydown The event can be triggered
Or in the form of broadcasting But it's more complicated
边栏推荐
- Oracle advanced (V) schema solution
- AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?
- 通过 iValueConverter 给datagrid 的背景颜色 动态赋值
- 股票开户首选,炒股交易开户佣金最低网上开户安全吗
- 2022-7-6 sigurg is used to receive external data. I don't know why it can't be printed out
- 最长上升子序列模型 AcWing 1012. 友好城市
- Interface automation test - solution of data dependency between interfaces
- PERT图(工程网络图)
- PC端页面如何调用QQ进行在线聊天?
- Lavarel之环境配置 .env
猜你喜欢
常用数字信号编码之反向不归零码码、曼彻斯特编码、差分曼彻斯特编码
566. Reshaping the matrix
Details of redis core data structure & new features of redis 6
高等數學---第八章多元函數微分學1
【立体匹配论文阅读】【三】INTS
2022-7-7 Leetcode 34. Find the first and last positions of elements in a sorted array
gvim【三】【_vimrc配置】
Build a secure and trusted computing platform based on Kunpeng's native security
Data flow diagram, data dictionary
"New red flag Cup" desktop application creativity competition 2022
随机推荐
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
.net core 关于redis的pipeline以及事务
Supply chain supply and demand estimation - [time series]
AI talent cultivation new ideas, this live broadcast has what you care about
Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding
566. 重塑矩阵
FCOS3D label assignment
Huawei image address
requires php ~7.1 -&gt; your PHP version (7.0.18) does not satisfy that requirement
Excellent open source system recommendation of ThinkPHP framework
. Net core about redis pipeline and transactions
最长上升子序列模型 AcWing 482. 合唱队形
Battle Atlas: 12 scenarios detailing the requirements for container safety construction
IP address home location query
UML sequence diagram (sequence diagram)
The delivery efficiency is increased by 52 times, and the operation efficiency is increased by 10 times. See the compilation of practical cases of financial cloud native technology (with download)
2022-7-6 Leetcode27. Remove the element - I haven't done the problem for a long time. It's such an embarrassing day for double pointers
The meaning of variables starting with underscores in PHP
最长上升子序列模型 AcWing 1014. 登山
社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生