Hi All,
1. I have the following problem. Am trying to dynamically add symbol pointers to the linear gauge control using the Dispatcher as the example code below. The thing is the last added symbol pointer to the Pointers collection never show up. I tried different Dispatchers and even the UpdateLayout() but still nothing. Am I doing something wrong?
//Application.Current.Dispatcher.Invoke(new Action(() =>
//this.LinearGauge.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle, new Action(() =>
this.Dispatcher.Invoke(new Action(() =>
{
foreach (var order in e.NewItems)
{
LinearPointer linearPointer = new LinearPointer();
linearPointer.PointerType = LinearPointerType.SymbolPointer;
linearPointer.Value = Convert.ToDouble(order.Price);
linearPointer.SymbolPointerHeight = 10;
linearPointer.SymbolPointerWidth = 10;
linearPointer.SymbolPointerPosition = LinearSymbolPointersPosition.Below;
linearPointer.SymbolPointerStroke = (SolidColorBrush)new BrushConverter().ConvertFrom("#00FF00");
LgScale.Pointers.Add(linearPointer);
//LgScale.UpdateLayout();
//LinearGauge.UpdateLayout();
}
}));
2. In your examples doesn’t show how to use linear gauge control (e.g. adding symbol pointers, control ranges...) in the MVVM pattern. Does it support MVVM and how?
Thanks a lot
Stelios