C# 工具提示不显示

C# 工具提示不显示,c#,xaml,windows-phone-8,C#,Xaml,Windows Phone 8,我正在编写一个WP 8应用程序,我想在鼠标悬停在按钮或开关上时显示工具提示。我尝试了以下代码: ToolTip toolTip = new ToolTip(); toolTip.Content = "Flip switch to turn on."; ToolTipService.SetToolTip(onOffSwitch, toolTip); 我还尝试在XAML中定义它: <Button Content="Msgs" HorizontalAlignment="Left

我正在编写一个WP 8应用程序,我想在鼠标悬停在按钮或开关上时显示工具提示。我尝试了以下代码:

ToolTip toolTip = new ToolTip();
toolTip.Content = "Flip switch to turn on.";
ToolTipService.SetToolTip(onOffSwitch, toolTip);
我还尝试在XAML中定义它:

<Button Content="Msgs"
        HorizontalAlignment="Left"
        Margin="59,651,0,0"
        VerticalAlignment="Top"
        Width="108"
        ToolTipService.ToolTip="tip"/>


但这些都不管用。当我将光标指向控件时,没有提示。我错过了什么?

首先,windows phone 8中没有鼠标悬停。但是,如果要添加工具提示,可以先参考此内容,因为windows phone 8中没有鼠标悬停。但是,如果要添加工具提示,可以参考此

您不能为Windows Phone控制器添加工具提示。无法在Windows Phone中模拟或检测鼠标/手指悬停

无法为Windows Phone控制器添加工具提示。无法在Windows Phone中模拟或检测鼠标/手指悬停

我猜您使用了错误的文档,这是针对windows应用商店应用的。不是WP8您如何将鼠标用于手机?我猜您使用了错误的文档,这是针对windows应用商店应用的。不是WP8您如何将鼠标用于手机?