Пример #1
0
        /// <summary>
        /// Initializes a new instance of the HubTileBase class.
        /// </summary>
        protected HubTileBase()
        {
            this.DefaultStyleKey = typeof(HubTileBase);
            HubTileService.Tiles.Add(this);

            this.updateTimer.Tick    += this.OnUpdateTimerTick;
            this.updateTimer.Interval = this.UpdateInterval;

            this.SizeChanged += this.OnSizeChanged;

            InteractionEffectManager.SetIsInteractionEnabled(this, true);
        }
Пример #2
0
        private static FrameworkElement GetElementToTilt(FrameworkElement element)
        {
            // If the ApplyInteractionExplicitly property is set on the target element - apply the tilt directly to this element.
            if (InteractionEffectManager.GetApplyInteractionExplicitly(element))
            {
                return(element);
            }

            // If there is a dedicated tilt target assigned - use it; otherwise, use the target element to avoid resetting already existing transformations on it.
            FrameworkElement dedicatedTarget = element.GetValue(DedicatedTiltTargetProperty) as FrameworkElement;

            if (dedicatedTarget != null)
            {
                return(dedicatedTarget);
            }

            return(element);
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the RadMosaicHubTile class.
        /// </summary>
        public RadMosaicHubTile()
        {
            this.DefaultStyleKey = typeof(RadMosaicHubTile);

            InteractionEffectManager.SetIsInteractionEnabled(this, false);
        }