开发者

CommandLink in WPF

开发者 https://www.devze.com 2023-03-23 14:23 出处:网络
Can so开发者_如何学编程meone 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.aspxWPF Task Dialog Wra

Can so开发者_如何学编程meone 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


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

CommandLink in WPF

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:

CommandLink in WPF

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号