I have a problem with 'NoteViewer' in XML。

寛明 水崎 1 Reputation point

Dear sir,

I managed to create a sample mentioned here with WPF App and Blank App (Universal Windows)
However, I have a problem here.
Error Lists say "Unknown type 'NoteViewer' in XML in XML namespace~.
Strangely enough, when I made this sample with WPF App, I can get a music score despite having the same error. But in the case of Universal Windows, I can not get anu music sore here like below.
This proble may have something to do with 'NoteViewer' but no matter what I do,
I failed solve this problem by myself.

Could you help me on this regard? It seems that this proble is above my head.

Kind Regards,

Hiroaki Mizusaki

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,694 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Michel Davis 1 Reputation point

    ckeck your referenced dll in <xmlns:ManufactorControls= … Please, show all declarations in Page node.complete-blog-marketing-guide-blogger.html

    0 comments No comments

  2. 寛明 水崎 1 Reputation point


    Here is what I wrote.


    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <ManufakturaControls:NoteViewer x:Name="noteViewer1" ScoreSource="{Binding Data}" Height="110"/>


  3. 寛明 水崎 1 Reputation point


    First, I downloaded Manufaktura.Music.dll, Manufaktura.Controls.dll, Manufaktura.Model.dll and Manufaktura.UniversalApps.dll from here -https://bitbucket.org/Ajcek/manufakturalibraries/src/master/ and installed those four.

    Next, what I wrote is the below.

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;

    using Windows.UI.Xaml.Resources;

    using Manufaktura.Music;
    using Manufaktura.Model;
    using Manufaktura.Controls;
    using Manufaktura.Controls.UniversalApps;
    using Manufaktura.Controls.Model;

    using Manufaktura.Music.Model;
    using Manufaktura.Music.Model.Harmony;
    using Manufaktura.Music.Model.MajorAndMinor;

    namespace App6

    public sealed partial class MainPage : Page
        public MainPage()
            var viewModel = new TestDataViewModel();
            DataContext = viewModel;
        public class TestDataViewModel : ViewModel
            private Score data;
            public Score Data
                get { return data; }
                set { data = value; OnPropertyChanged(() => Data); }
            public void LoadTestData()
                var score = Score.CreateOneStaffScore(Clef.Treble, new MajorScale(Step.C, false));
                score.FirstStaff.Elements.Add(new Note(Pitch.C5, RhythmicDuration.Quarter));
                score.FirstStaff.Elements.Add(new Note(Pitch.B4, RhythmicDuration.Quarter));
                score.FirstStaff.Elements.Add(new Note(Pitch.C5, RhythmicDuration.Half));
                score.FirstStaff.Elements.Add(new Barline()); Data = score;
                  var secondStaff = new Staff();
                  secondStaff.Elements.Add(new Key(0));
                  secondStaff.Elements.Add(new Note(Pitch.G4, RhythmicDuration.Whole));
                  secondStaff.Elements.Add(new Barline());
                  score.Staves.Add(new Staff());
                  score.ThirdStaff.Elements.Add(new Key(0));
                  score.ThirdStaff.Elements.Add(new Note(Pitch.D4, RhythmicDuration.Half));
                  score.ThirdStaff.Elements.Add(new Note(Pitch.E4, RhythmicDuration.Half));
                  score.ThirdStaff.Elements.Add(new Barline());
                  score.Staves.Add(new Staff());
                  score.Staves[3].Elements.Add(Clef.Bass);    //0-based index
                  score.Staves[3].Elements.Add(new Key(0));
                  score.Staves[3].Elements.Add(new Note(Pitch.G3, RhythmicDuration.Half));
                  score.Staves[3].Elements.Add(new Note(Pitch.C3, RhythmicDuration.Half));
                  score.Staves[3].Elements.Add(new Barline());  
                //  var parser = new MusicXmlParser();
                //  score = parser.Parse(XDocument.Load(@"D:\Dokumenty\Manufaktura programów\Dane do bazy\2014-08-01 DWOK tom 1 numery 1 i 5\DWOK tom 1, s. 3, nr 1 a.xml"));
                //   Data = score;


    And the error I got is "
    Error Unknown type 'NoteViewer' in XML namespace 'clr-namespace:Manufaktura.Controls.UniversalApps;assembly=Manufaktura.Controls.UniversalApps' "

    That is everything I can show.

    Kind Regard,