Skopiowałem ten kod z MSDN Stronie internetowej
string xaml = "<Ellipse Name="EllipseAdded" Width="300.5" Height="200" Fill="Red" "http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>";
object ellipse = XamlReader.Load(xaml);
Ale rzucam błąd
The text associated with this error code could not be found. illegal
qualified name character [Line: 1 Position: 68]
Pomóż mi to naprawić. Dzięki
Odpowiedzi:
1 dla odpowiedzi № 1Wypróbuj poniższe XAML, wydaje się, że brakuje xmlns.
string xaml = "<Ellipse Name="EllipseAdded" Width="300.5" Height="200" Fill="Red" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>";