/// <summary> /// Sets the value of the <see cref="P:DigitalRune.Windows.WindowsHelper.ClipToBounds"/> /// attached property to a given <see cref="DependencyObject"/> object. /// </summary> /// <param name="obj">The object on which to set the property value.</param> /// <param name="value">The property value to set.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="obj"/> is <see langword="null"/>. /// </exception> public static void SetClipToBounds(DependencyObject obj, bool value) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } obj.SetValue(ClipToBoundsProperty, Boxed.Get(value)); }
/// <summary> /// Sets the value of the <see cref="P:DigitalRune.Window.AccessKeyScope.IsEnabled"/> /// attached property to a given <see cref="DependencyObject"/> object. /// </summary> /// <param name="obj">The object on which to set the property value.</param> /// <param name="value">The property value to set.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="obj"/> is <see langword="null"/>. /// </exception> public static void SetIsEnabled(DependencyObject obj, bool value) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } obj.SetValue(IsEnabledProperty, Boxed.Get(value)); }