ProfessionalCSharp / MoreSamples

Additional code samples the book series Professional C#, Wrox Press
https://csharp.christiannagel.com
273 stars 96 forks source link

XAML Island Exception? #44

Closed Lechus closed 5 years ago

Lechus commented 5 years ago

https://github.com/ProfessionalCSharp/MoreSamples/blob/a07e312d1ddf8b1e41365d4d8cffedd6a87bdd81/WPF/XAMLIsland/XAMLIslandSample/MapWindow.xaml.cs#L12

Click to see MAP example and got an error: System.Windows.Markup.XamlParseException: ''The invocation of the constructor on type 'Microsoft.Toolkit.Wpf.UI.Controls.MapControl' that matches the specified binding constraints threw an exception.' Line number '10' and line position '10'.'

Lechus commented 5 years ago

fixed by adding app.manifest https://techcommunity.microsoft.com/t5/Windows-Dev-AppConsult/Using-XAML-Islands-on-Windows-10-19H1-fixing-the-quot/ba-p/376330

christiannagel commented 5 years ago

@Lechus - thanks for your comments and the solution. You can either create an app manifest, or use the packaging project (which should be part of the sample), and start the application from the package project.