Ejemplo n.º 1
0
        private void DrawAccidental(double notePos, string hasAcc, char orientation, byte partIndex)
        {
            Image imageAcc = new Image();

            imageAcc.HorizontalAlignment = HorizontalAlignment.Left;
            imageAcc.Source = LayoutController.GetElement("accidental", hasAcc);
            imageAcc.Height = LayoutController.ElementHeight["A" + hasAcc];
            double topAcc = LayoutController.GetAccidentalTopMargin(notePos, imageAcc.Height, orientation, partIndex);

            imageAcc.Margin = new Thickness(leftMargin, topAcc, 0, 0);

            staffGrid.Children.Add(imageAcc);
            Grid.SetRow(imageAcc, partIndex);
        }