【发布时间】:2012-05-16 08:21:26
【问题描述】:
我需要使用 c# 语言向 asp.net 中的按钮添加标签。每当鼠标指向按钮时,我都需要可以查看标签。我正在设计一个 wpf 应用程序。任何帮助表示赞赏。
【问题讨论】:
-
当你真正想要 ASP.NET 时,为什么要标记它 WPF?
我需要使用 c# 语言向 asp.net 中的按钮添加标签。每当鼠标指向按钮时,我都需要可以查看标签。我正在设计一个 wpf 应用程序。任何帮助表示赞赏。
【问题讨论】:
如果这是 WPF,我认为您不需要标签,因为标签在指向控件时不可见,但工具提示是。
<Button Content="Submit" Tooltip="Click this to submit"
Command="{Binding SubmitCommand}"/>
【讨论】:
我认为您在谈论工具提示:
<Button Content="Submit">
<Button.ToolTip>
<ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">Submit Request</TextBlock>
<TextBlock>Submits the request to the server.</TextBlock>
</StackPanel>
</ToolTip>
</Button.ToolTip>
【讨论】: