private static void ThemeBrushPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { BufferPresenter sender = obj as BufferPresenter; sender.border.BorderBrush = sender.ThemeBrush; sender.DataBuffer_BufferChanged(sender, new EventArgs()); }
private static void DataBufferPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { BufferPresenter sender = obj as BufferPresenter; RingBuffer <double> oldvalue = args.OldValue as RingBuffer <double>; if (oldvalue != null) { oldvalue.BufferChanged -= sender.DataBuffer_BufferChanged; } if (sender.DataBuffer != null) { sender.DataBuffer.BufferChanged += sender.DataBuffer_BufferChanged; } }