Exemple #1
0
        /// <summary>
        /// Base constructor for a HeliosVisual.
        /// </summary>
        /// <param name="name">Default name for this object.</param>
        /// <param name="nativeSize">Native size that this control renderes at.</param>
        protected HeliosVisual(string name, Size nativeSize)
            : base(name)
        {
            _rectangle = new Rect(nativeSize);
            _nativeSize = nativeSize;
            UpdateRectangle();

            _children = new HeliosVisualCollection();

            HeliosAction toggleVisibleAction = new HeliosAction(this, "", "hidden", "toggle", "Toggles whether this control is displayed on screen.");
            toggleVisibleAction.Execute += new HeliosActionHandler(ToggleVisibleAction_Execute);
            Actions.Add(toggleVisibleAction);

            _hiddenValue = new HeliosValue(this, new BindingValue(false), "", "hidden", "Indicates if this control is hidden and off screen.", "True if this panel is not displayed.", BindingValueUnits.Boolean);
            _hiddenValue.Execute += new HeliosActionHandler(SetHiddenAction_Execute);
            Values.Add(_hiddenValue);
            Actions.Add(_hiddenValue);

            Children.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Children_CollectionChanged);
        }
Exemple #2
0
        /// <summary>
        /// Base constructor for a HeliosVisual.
        /// </summary>
        /// <param name="name">Default name for this object.</param>
        /// <param name="nativeSize">Native size that this control renderes at.</param>
        protected HeliosVisual(string name, Size nativeSize)
            : base(name)
        {
            _rectangle  = new Rect(nativeSize);
            _nativeSize = nativeSize;
            UpdateRectangle();

            _children = new HeliosVisualCollection();

            HeliosAction toggleVisibleAction = new HeliosAction(this, "", "hidden", "toggle", "Toggles whether this control is displayed on screen.");

            toggleVisibleAction.Execute += new HeliosActionHandler(ToggleVisibleAction_Execute);
            Actions.Add(toggleVisibleAction);

            _hiddenValue          = new HeliosValue(this, new BindingValue(false), "", "hidden", "Indicates if this control is hidden and off screen.", "True if this panel is not displayed.", BindingValueUnits.Boolean);
            _hiddenValue.Execute += new HeliosActionHandler(SetHiddenAction_Execute);
            Values.Add(_hiddenValue);
            Actions.Add(_hiddenValue);

            Children.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Children_CollectionChanged);
        }