【发布时间】:2011-11-22 17:39:14
【问题描述】:
我是 WPF 新手, 我正在开发 WPF 的导航应用程序,
<NavigationWindow x:Class="KioskTraffic.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="768" Width="1024" Source="Home.xaml"
WindowState="Maximized" ResizeMode="NoResize" ShowsNavigationUI="False" WindowStyle="None" Cursor="Arrow" Closing="NavigationWindow_Closing"></NavigationWindow>
我有一些页面显示在这个导航窗口中,比如
<Page x:Class="KioskTraffic.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="768" Width="1024"
Title="Page1">
如何知道 NavigationWindow.xaml.cs 文件下当前正在运行哪个页面?
我在此导航窗口中有一个计时器,它想检查当前页面是否为 home.xaml,然后我不想启动该计时器。
【问题讨论】:
-
问题需要更多的上下文和所有者的积极参与。
-
我已经以简单的方式编辑了我的问题,但仍在等待答案....
标签: .net wpf navigation navigationwindow