XAMLReader.Load() --> Whitespace expected RRS feed

  • Question

  • Hi all, 

    Here's my problem. I need to create dynamically different block types but i never get this to work ...

    It's saying me "XamlParseException: whitespace expected [Line: 1 Position: #]"

        String xaml;
                xaml = "<TextBlock xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'";
                xaml += " Text='" + e.text;
                xaml += "'/>";
                return System.Windows.Markup.XamlReader.Load(xaml) as TextBlock;

    Any idea maybe? I really don't get it...
    Friday, December 23, 2011 12:30 AM

All replies