コード例 #1
0
 private static void RenderingModeChanged(NoteViewer control, ScoreRenderingModes oldValue, ScoreRenderingModes newValue)
 {
     if (control.InnerScore == null)
     {
         return;
     }
     control.RenderOnCanvas(control.InnerScore);
 }
コード例 #2
0
        private static void ScoreSourceChanged(NoteViewer control, Score oldValue, Score newValue)
        {
            if (oldValue != null)
            {
                oldValue.Safety.BoundControl = null;
            }
            Score.SanityCheck(newValue, control);

            control.RenderOnCanvas(newValue);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 private static void ZoomFactorChanged(NoteViewer control, double oldValue, double newValue)
 {
     control.InvalidateMeasure();
 }
コード例 #5
0
        private static void SelectedElementChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            NoteViewer viewer = (NoteViewer)obj;

            viewer.Select(args.NewValue as MusicalSymbol);
        }
コード例 #6
0
 private static void CurrentPageChanged(NoteViewer control, int oldValue, int newValue)
 {
     control.RenderOnCanvas(control.InnerScore);
 }