public async void FlushBuffer()
 {
     await control.Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>
     {
         lock (renderingQueue)
         {
             while (renderingQueue.Any())
             {
                 renderingQueue.Dequeue()();
             }
         }
         control.InvalidateMeasure();
     });
 }
 private static void ZoomFactorChanged(NoteViewer control, double oldValue, double newValue)
 {
     control.InvalidateMeasure();
 }