Ejemplo n.º 1
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            var collection = new VisualStateGroupCollection();

            collection.AddRange(VisualGroups.EnumerateGroups(Groups));
            return(collection);
        }
Ejemplo n.º 2
0
 private bool HasStateGroup(FrameworkElement element)
 {
     if (element != null)
     {
         VisualStateGroupCollection groups = VisualStateManager.GetVisualStateGroups(element);
         return(groups != null && groups.Count > 0);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Assign a <see cref="VisualStateGroupCollection" /> of visual states groups to specified bindable.
 /// </summary>
 /// <param name="bindable">Target bindable.</param>
 /// <param name="value"><see cref="VisualStateGroup" /> collection, should be assigned to <paramref name="bindable" />.</param>
 public static void SetVisualStateGroups(BindableObject bindable, VisualStateGroupCollection value)
 {
     bindable.SetValue(VisualStateGroupsProperty, value);
 }