1

我需要一个用于 Surface 2.0 应用程序的触控消息框。MessageBox.Show()必须通过单击鼠标来确认标准。

那不是我想要的。

我可以写一个小的UserControl,但我想知道是否已经集成了一些东西。

4

3 回答 3

1

使用MessageDialog来表示一个对话框。

于 2012-09-16T07:46:12.767 回答
1

我自己做了,搜索了将近一个小时左右^^

public partial class MsgBoxTouch : SurfaceWindow
    {
        public TouchBox1()
        {
            this.InitializeComponent();                

        }

        private void Button_TouchEnter(object sender, TouchEventArgs e)
        {
            this.Close();
        }


    }
}

<s:SurfaceWindow x:Class="MsgBoxTouch"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    mc:Ignorable="d" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 


    WindowState="Normal" WindowStyle="None" Width="300" Height="300">

    <Grid x:Name="Layout">

        <Button Content="OK" Height="50" TouchEnter="Button_TouchEnter">

        </Button>
    </Grid>
</s:SurfaceWindow>
于 2012-09-16T11:59:01.067 回答
0

blip-surface使用 MessageBox 用户控件,也许您可​​以使用类似的东西

http://code.google.com/p/blip-surface/source/browse/trunk/Blip/UI/Controls/?r=28

于 2012-09-16T07:52:30.870 回答