你好,
你可以注册frame控件的navigating事件,在处理方法中判断如果是返回类型则取消路由事件。
private void Frame_Navigating(object sender, NavigatingCancelEventArgs e)
{
if (string.IsNullOrEmpty(textbox.Text.Trim()))
{
e.Cancel = true;
}
}
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.