Xaml UWP:如何将视图传递给InAppNotifications控件?

Xaml UWP:如何将视图传递给InAppNotifications控件?,xaml,uwp-xaml,Xaml,Uwp Xaml,我正在使用Windows社区示例工具包中的InAppNotifications控件。我有一个单独的用户控件,名为“DemoFile.xaml”。此演示文件包含我希望在InAppNotification控件中显示的内容 DemoFile.xaml <UserControl> <TextBox Text = "Text"/> </UserControl> 如何将demofile作为参数传递以显示?支持使用UIElement作为通知

我正在使用Windows社区示例工具包中的InAppNotifications控件。我有一个单独的用户控件,名为“DemoFile.xaml”。此演示文件包含我希望在InAppNotification控件中显示的内容

DemoFile.xaml

<UserControl>
    <TextBox Text = "Text"/>
  </UserControl>
如何将demofile作为参数传递以显示?

支持使用UIElement作为通知内容来显示通知。你可以这样写

private void Button_Click(object sender, RoutedEventArgs e)
        { 
            var usercontrol = new DemoFile ();
Notification.Show(usercontrol);
        }
public class Notifications : UserControl
{
   this.Notification.Show();  // want to pass the Demo File here 
}
private void Button_Click(object sender, RoutedEventArgs e)
        { 
            var usercontrol = new DemoFile ();
Notification.Show(usercontrol);
        }