本文介绍了如何使用Flyout的ButtonBack?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有弹出窗口

< SettingsFlyout

     ; x:Class =" Words_Gen.Views.AboutSettingsFlyout"

    xmlns =" " ;
$
    xmlns:x =" "

    xmlns:local =" using:Words_Gen.Views"

    xmlns:d =" "

   的xmlns:MC = QUOT; "

    mc:Ignorable =" d"

    HeaderForeground = QUOT;白色"

    HeaderBackground ="#00b2f0"

   背景="海军"

    BackClick =" MySettingsBackClicked"

    Title =" About"

    d:DesignWidth =" 346">

<SettingsFlyout
    x:Class="Words_Gen.Views.AboutSettingsFlyout"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Words_Gen.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    HeaderForeground="White"
    HeaderBackground="#00b2f0"
    Background="Navy"
    BackClick="MySettingsBackClicked"
    Title="About"
    d:DesignWidth="346">

      private void MySettingsBackClicked(object sender,Windows.UI.Xaml.Controls.BackClickEventHandler e)

    {

      ;       App.isBackAbout = true;

            / /首先关闭我们的弹出窗口。

           Popup parent = this.Parent as Popup;

            if(parent!= null)

        

                parent.IsOpen = false;

           }

}

我想要的是使用BackClick。

我有这个错误:
$
错误  1 "MySettingsBackClicked"没有重载与委托'Windows.UI.Xaml.Cont相匹配rols.BackClickEventHandler' 

      private void MySettingsBackClicked(object sender, Windows.UI.Xaml.Controls.BackClickEventHandler e}
    {
            App.isBackAbout = true;
            // First close our Flyout.
            Popup parent = this.Parent as Popup;
            if (parent != null)
       
                parent.IsOpen = false;
            }
}
What I want is to use BackClick.
I had this error:
Error 1 No overload for 'MySettingsBackClicked' matches delegate 'Windows.UI.Xaml.Controls.BackClickEventHandler' 

ADRIAN DIBU

ADRIAN DIBU

推荐答案

我相信弹出窗口的后退按钮默认工作。它具有内置功能,可以返回上一个状态。

I believe the back button of the flyout works by default. It has a built-in feature to go back to the previous state.


这篇关于如何使用Flyout的ButtonBack?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 22:31