CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    6

    Loose XAML won't display in IE8

    I'm just getting my feet wet with WPF and XAML and wanted to see loose xaml work. The simplest example I could find:

    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <TextBlock>Hello World!</TextBlock>
    </Page>

    will not load in either ie8 or firefox 3.5. In ie8 it result in ye olde "Internet Explorer cannot display the webpage" error. I have loose xaml enabled in the security settings for each zone.

    What am missing?

    Thanks.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Loose XAML won't display in IE8

    Not sure what the problem is because it works in IE8 for me.

    I took your snippet and pasted it into notepad and saved it as test.xaml. Then opened it in IE8 and it rendered find (i.e. "Hello World!" appeared). Not sure this matters, but I am an administrator on this machine and have Visual Studio installed.

  3. #3
    Join Date
    Jul 2009
    Posts
    6

    Re: Loose XAML won't display in IE8

    Thanks for trying.

    It should be as simple as it was for me. I have 2k8 C# Express edition installed and am an admin on XP Pro.

  4. #4
    Join Date
    Sep 2006
    Posts
    199

    Re: Loose XAML won't display in IE8

    AFAIK you can't just dump XAML into a web browser and expect it to create the window that way, unless the browser would (on its own) load the WPF rendering engine inside itself and compile the XAML to show in the browser.

    There is a tool named XamlPad that you can use for this though, I think.

  5. #5
    Join Date
    Jul 2009
    Posts
    6

    Re: Loose XAML won't display in IE8

    IE8 and Firefox 3.? both should support this use of xaml. You have to have a page root instead of a window root. The sample clearly works for some people, so I'm just trying to figure out what setting or conflict could be interfering for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured