private static void RenderingModeChanged(NoteViewer control, ScoreRenderingModes oldValue, ScoreRenderingModes newValue)
 {
     if (control.InnerScore == null)
     {
         return;
     }
     control.RenderOnCanvas(control.InnerScore);
 }
        private static void ScoreSourceChanged(NoteViewer control, Score oldValue, Score newValue)
        {
            if (oldValue != null)
            {
                oldValue.Safety.BoundControl = null;
            }
            Score.SanityCheck(newValue, control);

            control.RenderOnCanvas(newValue);
        }
        private static void XmlSourceChanged(NoteViewer contol, string oldValue, string newValue)
        {
            XDocument xmlDocument = XDocument.Parse(newValue);

            //Apply transformations:
            if (contol.XmlTransformations != null)
            {
                foreach (var transformation in contol.XmlTransformations)
                {
                    xmlDocument = transformation.Parse(xmlDocument);
                }
            }

            MusicXmlParser parser = new MusicXmlParser();
            var            score  = parser.Parse(xmlDocument);

            contol.RenderOnCanvas(score);
        }
 private static void CurrentPageChanged(NoteViewer control, int oldValue, int newValue)
 {
     control.RenderOnCanvas(control.InnerScore);
 }