本文整理汇总了C#中DependencyObject.GetAttachedPropertyValue方法的典型用法代码示例。如果您正苦于以下问题:C# DependencyObject.GetAttachedPropertyValue方法的具体用法?C# DependencyObject.GetAttachedPropertyValue怎么用?C# DependencyObject.GetAttachedPropertyValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DependencyObject
的用法示例。
在下文中一共展示了DependencyObject.GetAttachedPropertyValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDock
/// <summary>
/// Getter method for the attached property <c>Dock</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>Dock</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static Dock GetDock(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<Dock>(DOCK_ATTACHED_PROPERTY, Dock.Left);
}
示例2: GetSetterData
protected SetterData GetSetterData(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<SetterData>(GetAttachedPropertyName(), null);
}
示例3: GetTargetProperty
/// <summary>
/// Getter method for the attached property <c>TargetProperty</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>TargetProperty</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static string GetTargetProperty(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<string>(TARGET_PROPERTY_ATTACHED_PROPERTY, null);
}
示例4: GetTop
/// <summary>
/// Getter method for the attached property <c>Top</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>Top</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static double GetTop(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<double>(TOP_ATTACHED_PROPERTY, 0.0);
}
示例5: GetBottom
/// <summary>
/// Getter method for the attached property <c>Bottom</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>Bottom</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static double GetBottom(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<double>(BOTTOM_ATTACHED_PROPERTY, 0.0);
}
示例6: GetColumnSpan
/// <summary>
/// Getter method for the attached property <c>ColumnSpan</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>ColumnSpan</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static int GetColumnSpan(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue(COLUMNSPAN_ATTACHED_PROPERTY, 1);
}
示例7: GetRowSpan
/// <summary>
/// Getter method for the attached property <c>RowSpan</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>RowSpan</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static int GetRowSpan(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue(ROWSPAN_ATTACHED_PROPERTY, 1);
}
示例8: GetRow
/// <summary>
/// Getter method for the attached property <c>Row</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>Row</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static int GetRow(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<int>(ROW_ATTACHED_PROPERTY, 0);
}
示例9: GetSaveRestoreAction
protected static WorkflowSaveRestoreStateAction GetSaveRestoreAction(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue<WorkflowSaveRestoreStateAction>(SAVE_RESTORE_ACTION_ATTACHED_PROPERTY, null);
}
示例10: GetGroupContext
/// <summary>
/// Getter method for the attached property <c>GroupContext</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be returned.</param>
/// <returns>Value of the <c>GroupContext</c> property on the
/// <paramref name="targetObject"/>.</returns>
public static string GetGroupContext(DependencyObject targetObject)
{
return targetObject.GetAttachedPropertyValue(GROUPCONTEXT_ATTACHED_PROPERTY, string.Empty);
}