<HyperlinkButton x:Class="NewWindowsButton" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
public class NewWindowsButton : HyperlinkButton { public NewWindowsButton(string navigateUri) { base.NavigateUri = new Uri(navigateUri); TargetName = "_blank"; } public void Navigate() { base.OnClick(); } }
NewWindowsButton button = new NewWindowsButton("http://keibalight.wordpress.com/"); button.Navigate();
0 件のコメント:
コメントを投稿