/// <summary> /// Helper for setting Name property on a StyledElement. /// </summary> public static void SetName(StyledElement element, string value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(NameProperty, value); }
/// <summary> /// Helper for setting SizeOfSet property on a StyledElement. /// </summary> public static void SetSizeOfSet(StyledElement element, int value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(SizeOfSetProperty, value); }
/// <summary> /// Helper for setting LabeledBy property on a StyledElement. /// </summary> public static void SetLabeledBy(StyledElement element, IControl value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(LabeledByProperty, value); }
/// <summary> /// Helper for setting LiveSetting property on a StyledElement. /// </summary> public static void SetLiveSetting(StyledElement element, AutomationLiveSetting value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(LiveSettingProperty, value); }
/// <summary> /// Helper for setting IsOffscreenBehavior property on a StyledElement. /// </summary> public static void SetIsOffscreenBehavior(StyledElement element, IsOffscreenBehavior value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(IsOffscreenBehaviorProperty, value); }
/// <summary> /// Helper for setting IsRowHeader property on a StyledElement. /// </summary> public static void SetIsRowHeader(StyledElement element, bool value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(IsRowHeaderProperty, value); }
/// <summary> /// Helper for setting ControlTypeOverride property on a StyledElement. /// </summary> public static void SetControlTypeOverride(StyledElement element, AutomationControlType?value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(ControlTypeOverrideProperty, value); }
/// <summary> /// Helper for setting AccessibilityView property on a StyledElement. /// </summary> public static void SetAccessibilityView(StyledElement element, AccessibilityView value) { if (element == null) { throw new ArgumentNullException(nameof(element)); } element.SetValue(AccessibilityViewProperty, value); }
/// <summary> /// Sets the value of the attached <see cref="NameScopeProperty"/> on a styled element. /// </summary> /// <param name="styled">The styled element.</param> /// <param name="value">The value to set.</param> public static void SetNameScope(StyledElement styled, INameScope value) { Contract.Requires <ArgumentNullException>(styled != null); styled.SetValue(NameScopeProperty, value); }
/// <summary> /// Sets the value of the attached <see cref="NameScopeProperty"/> on a styled element. /// </summary> /// <param name="styled">The styled element.</param> /// <param name="value">The value to set.</param> public static void SetNameScope(StyledElement styled, INameScope value) { _ = styled ?? throw new ArgumentNullException(nameof(styled)); styled.SetValue(NameScopeProperty, value); }