Пример #1
0
        /// <summary>
        /// A virtual method that is called when the Owner of this indicator changes.
        /// </summary>
        /// <param name="newOwner">The new Owner.</param>
        /// <param name="oldOwner">The old Owner.</param>
        internal override void OnOwnerChanged(GaugePanel newOwner, GaugePanel oldOwner)
        {
            base.OnOwnerChanged(newOwner, oldOwner);

            Orientation orientation = RadLinearGauge.GetOrientation(newOwner);

            this.isHorizontal = orientation == Orientation.Horizontal;
            RadLinearGauge.SetOrientation(this, orientation);
        }
Пример #2
0
        /// <summary>
        /// A virtual method that is called when the Orientation property changes.
        /// </summary>
        /// <param name="newOrientation">The new Orientation.</param>
        /// <param name="oldOrientation">The old Orientation.</param>
        internal virtual void OnOrientationChanged(Orientation newOrientation, Orientation oldOrientation)
        {
            this.isHorizontal = newOrientation == Orientation.Horizontal;

            foreach (UIElement element in this.Indicators)
            {
                GaugeIndicator indicator = element as GaugeIndicator;
                if (indicator == null)
                {
                    continue;
                }

                RadLinearGauge.SetOrientation(indicator, newOrientation);
            }

            this.InvalidateMeasure();
        }