question

68918197 avatar image
0 Votes"
68918197 asked ·

I have a problem with 'NoteViewer' in XML。

Dear sir,

I managed to create a sample mentioned here with WPF App and Blank App (Universal Windows)
http://musicengravingcontrols.com/en-US/Articles/Display?id=2
7486-批注-2020-04-17-110308.png
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-wpf
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, please, ckeck your referenced dll in <xmlns:ManufactorControls= … Please, show all declarations in Page node.

0 Votes 0 ·

Hello,


>please, ckeck your referenced dll in <xmlns:ManufactorControls= … Please, show all declarations in Page >node.


Sure, here is what I wrote.


Incidentally, 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.


7487-批注-2020-04-19-200928.png


0 Votes 0 ·

Here is another one.


7554-批注-2020-04-19-200928.png


0 Votes 0 ·
MichelDavis-2533 avatar image
0 Votes"
MichelDavis-2533 answered ·

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


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

68918197 avatar image
0 Votes"
68918197 answered ·

Hello,

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()
     {
         this.InitializeComponent();
         var viewModel = new TestDataViewModel();
         DataContext = viewModel;
         viewModel.LoadTestData();
     }
     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(Clef.Treble);
               secondStaff.Elements.Add(new Key(0));
               secondStaff.Elements.Add(new Note(Pitch.G4, RhythmicDuration.Whole));
               secondStaff.Elements.Add(new Barline());
               score.Staves.Add(secondStaff);

               score.Staves.Add(new Staff());
               score.ThirdStaff.Elements.Add(Clef.Tenor);
               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,

Hiroaki

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, please, check your referenced dll in MainWindow XAML:

<Window … xmlns:ManufactorControls= …

Please, show all declarations in MainWindow XAML.

0 Votes 0 ·
68918197 avatar image
0 Votes"
68918197 answered ·

Hello,

Here is what I wrote.

<Page
x:Class="App6.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ManufakturaControls="clr-namespace:Manufaktura.Controls.UniversalApps;assembly=Manufaktura.Controls.UniversalApps"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

 mc:Ignorable="d"
 Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

 <Grid>
     <StackPanel>
         <ManufakturaControls:NoteViewer x:Name="noteViewer1" ScoreSource="{Binding Data}" Height="110"/>
     </StackPanel>
 </Grid>

</Page>

· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, in this case your Manufaktura.Controls.UniversalApps.dll is corrupted, may be invalid version of SDK or Core Framework. Please, check this dll.

 ...
 xmlns:ManufakturaControls="clr-namespace:Manufaktura.Controls.UniversalApps;assembly=Manufaktura.Controls.UniversalApps" 
 …
 <ManufakturaControls:NoteViewer … -> "Unknown type 'NoteViewer' in XML in XML namespace~
0 Votes 0 ·
68918197 avatar image 68918197 PeterFleischer-3316 ·

Hello,

I successfully cloned Manufaktura.Controls.UniversalApps.dll (this process took me 9 days geez!) and tried that new dll. The result is the same. I could not solve this problem.

In this case , all I have to do is to creat a new frame other than "NoteViewer" so that sheet music appears on it.

Because if I delete " <ManufakturaControls:NoteViewer x:Name="noteViewer1" ScoreSource="{Binding Data}" Height="110"/>". there is no error and therefore,
it may be possible to do that.

If possible, could you teach me how to make a frame other than "NoteViewer"?

0 Votes 0 ·