本文整理汇总了C#中System.Windows.Documents.Hyperlink.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Hyperlink.GetValue方法的具体用法?C# Hyperlink.GetValue怎么用?C# Hyperlink.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Documents.Hyperlink
的用法示例。
在下文中一共展示了Hyperlink.GetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLaunchHyperlink
public static bool GetLaunchHyperlink(Hyperlink element)
{
return (bool)element.GetValue(LaunchHyperlinkProperty);
}
示例2: GetIsEnabled
public static bool GetIsEnabled(Hyperlink element)
{
return (bool)element.GetValue(IsEnabledProperty);
}
示例3: GetWebUrl
public static string GetWebUrl(Hyperlink element)
{
return (string)element.GetValue(WebUrlProperty);
}
示例4: NavigateToLink
public void NavigateToLink(PostItemViewModel item, Hyperlink link)
{
Uri uri = link.GetValue(HyperlinkProperties.UriProperty) as Uri;
if (this._dvachUriParser.IsDvachUri(uri))
{
uri = this._urlBuilder.FixRelativeUri(uri);
var uriModel = this._dvachUriParser.ParseUri(uri);
if (uriModel == null)
{
this.NavigateToBrowser(uri);
return;
}
// if uri navigates to the current thread
if (uriModel.BoardName == this.BoardName && uriModel.ThreadNumber == this.ThreadNumber)
{
// don't do anything if the uri has no fragment
if (!string.IsNullOrEmpty(uri.Fragment))
{
string fragment = uri.Fragment.Substring(1);
var post = this.Posts.FirstOrDefault(p => p.Number.ToString() == fragment);
this._popupDisplayer.ShowPost(post, this._popupPlaceholder);
}
}
else
{
// if uri navigates to another thread, open the necessary page
this._pageNavigationService.NavigateToPostListPage(uriModel.BoardName, uriModel.ThreadNumber);
}
}
else if (uri != null)
{
this.NavigateToBrowser(uri);
}
}
示例5: GetNavigateExternally
public static bool GetNavigateExternally(Hyperlink element)
{
return (bool) element.GetValue(NavigateExternallyProperty);
}