当前位置:网站首页>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 边栏推荐
- VSCode 配置使用 PyLint 语法检查器
- Introduction to database system - Chapter 1 introduction [conceptual model, hierarchical model and three-level mode (external mode, mode, internal mode)]
- 【日常训练】648. 单词替换
- Vmware 与主机之间传输文件
- Use day JS let time (displayed as minutes, hours, days, months, and so on)
- 现在网上开户安全么?那么网上开户选哪个证券公司?
- Laravel form builder uses
- Flask session forged hctf admin
- FC连接数据库,一定要使用自定义域名才能在外面访问吗?
- Battle Atlas: 12 scenarios detailing the requirements for container safety construction
猜你喜欢

TPG x AIDU | AI leading talent recruitment plan in progress!

Parsing of XML files

Social responsibility · value co creation, Zhongguancun network security and Information Industry Alliance dialogue, wechat entrepreneur Haitai Fangyuan, chairman Mr. Jiang Haizhou

【立体匹配论文阅读】【三】INTS

How to check the ram and ROM usage of MCU through Keil

Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding

Best practice | using Tencent cloud AI willingness to audit as the escort of telephone compliance

Vmware共享主机的有线网络IP地址

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 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)
随机推荐
Excuse me, I have three partitions in Kafka, and the flinksql task has written the join operation. How can I give the join operation alone
2022-7-6 Leetcode 977.有序数组的平方
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
Wired network IP address of VMware shared host
requires php ~7.1 -&gt; your PHP version (7.0.18) does not satisfy that requirement
PC端页面如何调用QQ进行在线聊天?
[daily training] 648 Word replacement
Sliding rail stepping motor commissioning (national ocean vehicle competition) (STM32 master control)
Excerpt from "misogyny: female disgust in Japan"
【网络安全】sql注入语法汇总
FCOS3D label assignment
Environment configuration of lavarel env
Dry goods | summarize the linkage use of those vulnerability tools
mysql ”Invalid use of null value“ 解决方法
请问,redis没有消费消息,都在redis里堆着是怎么回事?用的是cerely 。
How to check the ram and ROM usage of MCU through Keil
Cargo placement problem
docker部署oracle
得物客服热线的演进之路
Regular expression integer positive integer some basic expressions