WPF 中的命令链接

发布于 2024-11-26 16:58:25 字数 215 浏览 3 评论 0原文

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

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

Can someone tell me how can I add a CommandLink control in a WPF window?

This is what I mean by CommandLink : http://msdn.microsoft.com/en-us/library/aa511455.aspx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏雨凉 2024-12-03 16:58:25

WPF 任务对话框包装器 提供了 CommandLink 用户控件。

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

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);

WPF Task Dialog Wrapper

该库已根据 The Code Project Open License 获得许可。


7 Update 有另一个很好的 CommandLink 按钮。

它是这样的:

Seven Update

请记住,这是一个根据 GPL v3 许可证授权的项目。


本指南也可能有所帮助:

使用 Expression Blend 3 和行为在 Silverlight 中创建命令链接控件

WPF Task Dialog Wrapper provides an implementation of a CommandLink user control.

Here's an example of how to show command links:

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);

WPF Task Dialog Wrapper

The library is licensed under the The Code Project Open License.


Seven Update has another nice implementation of a CommandLink Button.

This is how it looks like:

Seven Update

Bear in mind that is a project licensed under the GPL v3 license.


This guide might help too:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文