コード例 #1
0
        /// <summary>
        /// Occurs when the <see cref="M:OnApplyTemplate" /> method has been called and the template is already successfully applied.
        /// </summary>
        protected override void OnTemplateApplied()
        {
            this.arrowGlyph.RenderTransformOrigin = new Point(0, 0);
            this.arrowGlyph.RenderTransform       = new RotateTransform()
            {
                Angle = ((90 - this.model.LayoutSlot.SweepAngle / 2) - this.StartAngle) - this.Model.TargetItem.Index * 45
            };

            this.itemPath.Data = NavigationItemButton.GetNavigationButtonArc(this.Model);
            this.ArrangeArrowGlyph();

            base.OnTemplateApplied();
        }
コード例 #2
0
        internal void UpdateVisualsState()
        {
            if (!this.IsTemplateApplied)
            {
                return;
            }
            this.itemPath.Data = NavigationItemButton.GetNavigationButtonArc(this.Model);

            this.arrowGlyph.RenderTransform = new RotateTransform()
            {
                Angle = (90 - this.model.LayoutSlot.SweepAngle / 2.0 - this.StartAngle) - this.Model.TargetItem.Index * 45
            };

            this.ArrangeArrowGlyph();
        }