Example #1
0
        ///<summary>
        ///</summary>
        public Calendar()
        {
            _timerRepaint = new ChartTimers();
            _timerRepaint.RegisterTimer(TimerRepaint, () => Dispatcher.BeginInvoke(
#if WPF
                                            DispatcherPriority.Normal,
#endif
                                            new Action(Paint)), 50);
            SizeChanged += (sender, e) => _timerRepaint.StartTimerWork(TimerRepaint);
#if SILVERLIGHT
            Mouse.RegisterMouseMoveAbleElement(this);
            MouseMove += (sender, e) => Mouse.UpdateMousePosition(this, e.GetPosition(this));
#endif

            _labels.NewObjectCreated +=
                label =>
            {
                label._textBlock.Foreground = _chartX.FontForeground;
                label._textBlock.FontSize   = _chartX.FontSize;
                label._textBlock.FontFamily = _chartX.FontFamily;
            };
        }