Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • robhouweling

    robhouweling

    Contributor

    3308 Points

    565 Posts

    Re: Object creation by using xaml fails

    Jun 20, 2008 05:16 PM | LINK

    This is because you're using a UIElement as the object for your Grid. UIElement does not containt Resources.

    Try using:

    Grid grid = XamlReader.Load(xaml) as Grid;

    instead of:


    UIElement grid = XamlReader.Load(xaml) as UIElement;

    (If this has answered your question, please click on mark as answer on this post)



    Cheers!

    Rob Houweling





    My blog