首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WPF中的CommandLink

WPF中的CommandLink
EN

Stack Overflow用户
提问于 2011-07-29 16:09:29
回答 1查看 2K关注 0票数 5

有人能告诉我如何在WPF窗口中添加CommandLink控件吗?

这就是我所说的CommandLink:http://msdn.microsoft.com/en-us/library/aa511455.aspx

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-29 19:00:22

WPF Task Dialog Wrapper提供了CommandLink用户控件的实现。

以下是如何显示命令链接的示例:

代码语言:javascript
复制
TaskDialogOptions config = new TaskDialogOptions();

config.Owner = this;
config.Title = "RadioBox Title";
config.MainInstruction = "The main instruction text for the TaskDialog goes here.";
config.Content = "The content text for the task dialog is shown here "
               + "and the text will automatically wrap as needed.";
config.ExpandedInfo = "Any expanded content text for the task dialog "

                    + "is shown here and the text will automatically wrap as needed.";
config.CommandButtons = new string[] {
    "Command &Link 1", "Command Link 2\nLine 2\nLine 3", "Command Link 3" };
config.MainIcon = VistaTaskDialogIcon.Information;

TaskDialogResult res = TaskDialog.Show(config);

该库在代码项目开放许可下获得许可。

Seven Update有另一个很好的CommandLink按钮实现。

它看起来是这样的:

请记住,这是一个在GPL v3许可下获得许可的项目。

这本指南可能也会有帮助:

Creating Command Link Controls in Silverlight with Expression Blend 3 and Behaviors

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6870314

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档