internal static void SetVisualStateGroups(FrameworkElement obj, VisualStateGroupCollection value) { if (obj == null) { throw new ArgumentNullException("obj"); } obj.SetValue(VisualStateManager.VisualStateGroupsProperty, value); }
internal static VisualStateGroupCollection GetVisualStateGroupsInternal(FrameworkElement obj) { if (obj == null) { throw new ArgumentNullException("obj"); } VisualStateGroupCollection groups = obj.GetValue(VisualStateManager.VisualStateGroupsProperty) as VisualStateGroupCollection; if (groups == null) { groups = new VisualStateGroupCollection(); SetVisualStateGroups(obj, groups); } return(groups); }