c#触摸屏消息框

时间:2012-09-16 07:37:18

标签: c# messagebox pixelsense

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

这不是我想要的。

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

3 个答案:

答案 0 :(得分:1)

使用MessageDialog class代表对话框。

答案 1 :(得分: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>

答案 2 :(得分:0)

blip-surface使用MessageBox用户控件,也许你可以使用与

类似的东西

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