Exemplo n.º 1
0
        protected BorderedContainer()
        {
            BorderProperty.AddCallback(GetType(), OnInvalidated);
            BorderProperty.AddCallback(GetType(), (o, args) =>
            {
                if (!ReferenceEquals(o, this))
                {
                    return;
                }

                Margin = ((BorderSet)args.NewValue).Width;
            });
        }
Exemplo n.º 2
0
        protected Frame()
        {
            IsActivatedProperty.AddCallback(GetType(), OnInvalidated);
            IsActivatedProperty.AddCallback(GetType(), (o, args) =>
            {
                if (!ReferenceEquals(o, this))
                {
                    return;
                }

                if ((bool)args.NewValue)
                {
                    Activated?.Invoke(this, new EventArgs());
                }
                else
                {
                    Deactivated?.Invoke(this, new EventArgs());
                }
            });
        }
Exemplo n.º 3
0
 protected Container()
 {
     ((BindingList <Component>)Children).ListChanged += (sender, args) => RaiseInvalidated();
     SizeProperty.AddCallback(GetType(), OnInvalidated);
     MarginProperty.AddCallback(GetType(), OnInvalidated);
 }