Exemplo n.º 1
0
        private static void SetItemsHost(FrameworkContentElement element)
        {
            FrameworkContentElement parent = element;

            while (parent.Parent != null)
            {
                parent = (FrameworkContentElement)parent.Parent;
            }
            parent.SetValue(ItemsHostProperty, element);
        }
Exemplo n.º 2
0
 public static FrameworkContentElement Bind <T>(this FrameworkContentElement _element, DependencyProperty _dependencyProperty, Expression <Func <T> > _expression, bool _isReadOnly, IValueConverter _converter)
 {
     if (_expression == null)
     {
         _element.SetValue(_dependencyProperty, default(T));
     }
     else
     {
         _element.SetBinding(_dependencyProperty, _expression.GetBinding(_isReadOnly, _converter));
     }
     return(_element);
 }
 public static void SetSprite(FrameworkContentElement dObj, FrameworkContentElementSprite sprite)
 {
     dObj.SetValue(FrameworkContentElementSprite.SpriteProperty, sprite);
 }