当前位置:网站首页>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
边栏推荐
- Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
- postgresql array类型,每一项拼接
- Excusez - moi, l'exécution a été réussie lors de l'utilisation des données de puits SQL Flink à Kafka, mais il n'y a pas de nombre dans Kafka
- [network security] SQL injection syntax summary
- How does MySQL control the number of replace?
- 请问,redis没有消费消息,都在redis里堆着是怎么回事?用的是cerely 。
- 交换机和路由器的异同
- Cesium knows the longitude and latitude of one point and the distance to find the longitude and latitude of another point
- c#通过frame 和 page 切换页面
- Advanced Mathematics - Chapter 8 differential calculus of multivariate functions 1
猜你喜欢
Hands on Teaching: XML modeling
. Net core about redis pipeline and transactions
SAKT方法部分介绍
社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生
Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
Redis 核心数据结构 & Redis 6 新特性详
Supply chain supply and demand estimation - [time series]
2022-7-6 beginner redis (I) download, install and run redis under Linux
How to check the ram and ROM usage of MCU through Keil
随机推荐
648. Word replacement: the classic application of dictionary tree
通过 iValueConverter 给datagrid 的背景颜色 动态赋值
使用day.js让时间 (显示为几分钟前 几小时前 几天前 几个月前 )
Help tenants
Excusez - moi, l'exécution a été réussie lors de l'utilisation des données de puits SQL Flink à Kafka, mais il n'y a pas de nombre dans Kafka
When FC connects to the database, do you have to use a custom domain name to access it outside?
请问,PTS对数据库压测有好方案么?
Build a secure and trusted computing platform based on Kunpeng's native security
MySQL "invalid use of null value" solution
Attribute keywords aliases, calculated, cardinality, ClientName
2022-7-7 Leetcode 34. Find the first and last positions of elements in a sorted array
Data flow diagram, data dictionary
2022-7-6 beginner redis (I) download, install and run redis under Linux
股票开户首选,炒股交易开户佣金最低网上开户安全吗
PostgreSQL array type, each splice
[AI practice] Application xgboost Xgbregressor builds air quality prediction model (II)
Help tenants
gvim【三】【_vimrc配置】
call undefined function openssl_ cipher_ iv_ length
[fortress machine] what is the difference between cloud fortress machine and ordinary fortress machine?