ChartControl.Dispatcher.InvokeAsync(() => { timer = new System.Windows.Threading.DispatcherTimer { Interval = new TimeSpan(0, 0, 1), IsEnabled = true }; timer.Tick += OnTimerTick; });
and then
private void OnTimerTick(object sender, EventArgs e) { ChartControl.Dispatcher.InvokeAsync((Action)(() => { drawMy(); })); drawMy(); } private void drawMy() { Draw.TextFixed(this, "tag1", "hi", TextPosition.Center, TextColor, textFont, TextColor, BackColor, 50, DashStyleHelper.Solid, 0, false, ""); Print("hi"); }
only when i click on chart or make some action on chart, only after that it does.
Comment