【发布时间】:2021-03-29 10:40:12
【问题描述】:
我正在使用 Windows 社区示例工具包中的 InAppNotifications 控件。我有一个名为 "DemoFile.xaml" 的单独用户控件。这个 Demo 文件有我想在 InAppNotification 控件中显示的内容。
DemoFile.xaml
<UserControl>
<TextBox Text = "Text"/>
</UserControl>
我的 InAppNotifications 控件如下所示
Notifications.xaml
<UserControl>
<Grid>
<tk_ctl:InAppNotification
x:Name="Notification"
ShowDismissButton="True"
StackMode="Replace"/>
</Grid>
此 Notifications.xaml.cs 背后的代码
public class Notifications : UserControl
{
this.Notification.Show(); // want to pass the Demo File here
}
如何将演示文件作为参数传递给 Show?
【问题讨论】: