本文整理汇总了C#中DependencyObject.SetAttachedPropertyValue方法的典型用法代码示例。如果您正苦于以下问题:C# DependencyObject.SetAttachedPropertyValue方法的具体用法?C# DependencyObject.SetAttachedPropertyValue怎么用?C# DependencyObject.SetAttachedPropertyValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DependencyObject
的用法示例。
在下文中一共展示了DependencyObject.SetAttachedPropertyValue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetTargetProperty
/// <summary>
/// Setter method for the attached property <c>TargetProperty</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>TargetProperty</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetTargetProperty(DependencyObject targetObject, string value)
{
targetObject.SetAttachedPropertyValue<string>(TARGET_PROPERTY_ATTACHED_PROPERTY, value);
}
示例2: SetDock
/// <summary>
/// Setter method for the attached property <c>Dock</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>Dock</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetDock(DependencyObject targetObject, Dock value)
{
targetObject.SetAttachedPropertyValue<Dock>(DOCK_ATTACHED_PROPERTY, value);
}
示例3: SetBottom
/// <summary>
/// Setter method for the attached property <c>Bottom</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>Bottom</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetBottom(DependencyObject targetObject, double value)
{
targetObject.SetAttachedPropertyValue<double>(BOTTOM_ATTACHED_PROPERTY, value);
}
示例4: SetSetterData
protected void SetSetterData(DependencyObject targetObject, SetterData setterData)
{
targetObject.SetAttachedPropertyValue(GetAttachedPropertyName(), setterData);
}
示例5: SetTop
/// <summary>
/// Setter method for the attached property <c>Top</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>Top</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetTop(DependencyObject targetObject, double value)
{
targetObject.SetAttachedPropertyValue<double>(TOP_ATTACHED_PROPERTY, value);
}
示例6: SetColumnSpan
/// <summary>
/// Setter method for the attached property <c>ColumnSpan</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>ColumnSpan</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetColumnSpan(DependencyObject targetObject, int value)
{
targetObject.SetAttachedPropertyValue<int>(COLUMNSPAN_ATTACHED_PROPERTY, value);
}
示例7: SetRow
/// <summary>
/// Setter method for the attached property <c>Row</c>.
/// </summary>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>Row</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetRow(DependencyObject targetObject, int value)
{
targetObject.SetAttachedPropertyValue<int>(ROW_ATTACHED_PROPERTY, value);
}
示例8: SetSaveRestoreAction
protected static void SetSaveRestoreAction(DependencyObject targetObject, WorkflowSaveRestoreStateAction value)
{
targetObject.SetAttachedPropertyValue(SAVE_RESTORE_ACTION_ATTACHED_PROPERTY, value);
}
示例9: SetGroupContext
/// <summary>
/// Setter method for the attached property <c>GroupContext</c>.
/// </summary>
/// <remarks>
/// The <c>GroupContext</c> should be set at the nearest parent of this radio button,
/// which contains all other radio buttons of the same radio button group.
/// This limits the scope of the search for the radio button group to this element's
/// name scope.
/// If this property isn't set at any of the visual parents up to the root,
/// the root visual will be used as group context.
/// To specify the group context on a visual <c>V</c>, use this syntax:
/// <c><V RadioButtoon.GroupContext="GroupName1,GroupName2,...,GroupNameN"></c>
/// All the specifed groups will then be created in <c>V</c>'s name scope and all
/// radio buttons under <c>V</c>, which use one of the specified group names, will then
/// be contained in those groups. Radio buttons not located in <c>V</c>'s namescope
/// (or child namescopes) will use other group instances, even if they are using the
/// same <see cref="GroupName"/>.
/// </remarks>
/// <param name="targetObject">The object whose property value will
/// be set.</param>
/// <param name="value">Value of the <c>GroupContext</c> property on the
/// <paramref name="targetObject"/> to be set.</param>
public static void SetGroupContext(DependencyObject targetObject, string value)
{
targetObject.SetAttachedPropertyValue<string>(GROUPCONTEXT_ATTACHED_PROPERTY, value);
}