예제 #1
0
 /// <summary>
 /// Sets the value of the CoerceToItemIndex attached property.
 /// </summary>
 /// <param name="itemsControl">The visual upon which to set the CoerceToItemIndex property.</param>
 /// <param name="coerceToItemAtIndex">The index to which selection must be coerced.</param>
 public static void SetCoerceToItemIndex(RibbonGallery itemsControl, int coerceToItemAtIndex)
 {
     itemsControl.SetValue(CoerceToItemIndexProperty, coerceToItemAtIndex);
 }
예제 #2
0
 /// <summary>
 /// Get the value of the CoerceToItemIndex attached property.
 /// </summary>
 /// <param name="ribbonGallery">The visual from which to read the CoerceToItemIndex property.</param>
 /// <returns>A value greater than or equal to zero if the coerce behavior has been enabled.</returns>
 public static int GetCoerceToItemIndex(RibbonGallery ribbonGallery)
 {
     return((int)ribbonGallery.GetValue(CoerceToItemIndexProperty));
 }