Exemplo n.º 1
0
        private ElementStateMode FindMode(DependencyObject element)
        {
            ElementStateMode mode = GetMode(element);

            if (mode != ElementStateMode.Default)
            {
                return(mode);
            }
            return(FindParentMode(element as FrameworkElement));
        }
Exemplo n.º 2
0
        private ElementStateMode FindParentMode(FrameworkElement element)
        {
            if (element == null)
            {
                throw new ArgumentException(string.Format("You must set the ElementState.Mode attached property", element));
            }
            ElementStateMode mode = GetMode(element.Parent);

            if (mode != ElementStateMode.Default)
            {
                return(mode);
            }
            return(FindParentMode(element.Parent as FrameworkElement));
        }
Exemplo n.º 3
0
 public static void SetMode(DependencyObject element, ElementStateMode value)
 {
     element.SetValue(ModeProperty, value);
 }
Exemplo n.º 4
0
 internal ElementState(DependencyObject element)
 {
     this._uid  = GetUId(element);
     this._mode = FindMode(element);
     this._type = element.GetType();
 }
		public static void SetMode(DependencyObject element, ElementStateMode value)
		{
			element.SetValue(ModeProperty, value);
		}
		internal ElementState(DependencyObject element)
		{
			this._uid	= GetUId(element);
			this._mode	= FindMode(element);
			this._type	= element.GetType();
		}