/// <summary>
        /// Applies control template.
        /// </summary>
        public override void OnApplyTemplate()
        {
            _sliceCanvasDecorator = (Border)TreeHelper.TemplateFindName("PART_SliceCanvasDecorator", this);
            _sliceCanvasDecorator.SizeChanged += new SizeChangedEventHandler(OnGraphCanvasDecoratorSizeChanged);
            _sliceCanvas = (Canvas)TreeHelper.TemplateFindName("PART_SliceCanvas", this);

            _balloon = (Balloon)TreeHelper.TemplateFindName("PART_Balloon", this);

            AddSlicesToCanvas();

            _legend = (Legend)TreeHelper.TemplateFindName("PART_Legend", this);

            #if WINDOWS_PHONE
            _legend.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(OnLegendManipulationStarted);
            #endif

            UpdateLegend();
        }
예제 #2
0
 private void AssignBalloon()
 {
     _balloon = (Balloon)TreeHelper.TemplateFindName("PART_Balloon", this);
 }
 private void AssignBalloon()
 {
     _balloon = (Balloon)TreeHelper.TemplateFindName("PART_Balloon", this);
     #if !SILVERLIGHT
     _balloon.BorderBrush = _balloonBrush;
     #endif
 }