Beispiel #1
0
        protected virtual void OnStyleChanged(Node sender, StyleChangedEventArg args)
        {
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            var handler = StyleChanged;

            if (handler != null)
            {
                handler(sender, args);
            }
        }
Beispiel #2
0
        protected override void ChildNodeStyleChange(object sender, StyleChangedEventArg args)
        {
            if (args.Source.Style == NodeStyle.FullscreenOne)
            {
                if (_fullscreenNode != null && _fullscreenNode != args.Source && _fullscreenNode.Style == NodeStyle.FullscreenOne)
                {
                    _fullscreenNode.Style = NodeStyle.Tile;
                }

                args.Source.SetFullscreenRect(Rect);
                _fullscreenNode = args.Source;
            }
            else if (args.Source.Style == NodeStyle.Tile && args.Prev == NodeStyle.FullscreenOne)
            {
                _fullscreenNode = null;
                args.Source.UpdateRect(args.Source.Rect);
            }

            OnStyleChanged(this, args);
        }
Beispiel #3
0
 protected virtual void ChildNodeStyleChange(object sender, StyleChangedEventArg args)
 {
     OnStyleChanged(this, args);
 }