SDK for WP8.1中是否有Popup类?

时间:2015-06-04 08:34:02

标签: windows-phone-8.1

适用于Windows Phone 8.1的SDK中是否有Popup类(或类似内容)?

System.Windows.Controls.Primitives.Popup不存在,因为System.Windows.Controls.不可用。

当然MessageDialog和PopupMenu是可用的,但它们似乎都没有没有按钮的可忽略信息的默认行为(甚至可能是非模态的)。

我必须使用自定义用户控件吗?

1 个答案:

答案 0 :(得分:2)

在Windows phone-RT中,Popup类是" Windows.UI.Xaml.Controls.Primitives"的成员。命名空间。您可以在xaml中定义Popup,如下所示:

 <Popup x:Name="ppup" IsOpen="False" Grid.Row="2" >
            <StackPanel Background="Blue" Height="100" Width="400">
                <TextBlock Text="This is Pop up control of Xaml" FontSize="20" FontWeight="Bold">
                </TextBlock>
            </StackPanel>
        </Popup>

在后面的代码中,您可以将IsOpen属性设置为true / false。

相关问题