Windows Vista Forums

Simple XAML Question !
  1. #1


    MarkS Guest

    Simple XAML Question !

    Hi,



    I am very much a novice when it comes to XAML and have only just started so
    I apologise for the simplicity of this question. I have the following code :

    <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    Foreground="LightSeaGreen" Fontsize="24pt">
    Hello, XAML !
    </Button>

    I have saved the file away as button.xaml and when I Double Click the file
    it attempts to open up in IE but the progress bar gets displayed and gets no
    further. I have downloaded the extensions for Visual Studio etc (orcas) and
    the .NET 3 Framework installed under Windows XP. Another program that I
    created in VS2005 worked fine but I coded this by hand. What am I missing ?

    Any help would be appreciated.
    Mark

      My System SpecsSystem Spec

  2. #2


    Rick Beerendonk Guest

    Re: Simple XAML Question !

    It is a valid XAML file, but IE is not able to have/create a button (and
    most other types) as root object. So IE is just not able to show the
    content, that's all. You don't need extra software.

    Rick Beerendonk



      My System SpecsSystem Spec

  3. #3


    MarkS Guest

    Re: Simple XAML Question !

    Thanks Rick,

    So I guess I could make the root element a Page rather than a Button object
    and make the Button a child element.


    "Rick Beerendonk" wrote:

    > It is a valid XAML file, but IE is not able to have/create a button (and
    > most other types) as root object. So IE is just not able to show the
    > content, that's all. You don't need extra software.
    >
    > Rick Beerendonk
    >
    >
    >


      My System SpecsSystem Spec

  4. #4


    Laurent Bugnion [MVP] Guest

    Re: Simple XAML Question !

    Hi,

    MarkS wrote:
    > Thanks Rick,
    >
    > So I guess I could make the root element a Page rather than a Button object
    > and make the Button a child element.


    Yes. However, since a Page can have only one child, it's customary to
    add a Panel (StackPanel, Canvas, Grid, etc...) to the Page, and the
    Button to the Panel.

    HTH,
    Laurent
    --
    Laurent Bugnion [MVP ASP.NET]
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch

      My System SpecsSystem Spec

  5. #5


    Horst Klein Guest

    RE: Simple XAML Question !

    Hi Mark

    Welcome into the phantastic World of XAML!

    A very good tool for "rookies" to play with XAML and to see what XAML
    changes does is the "XAMLPad".
    It's in the SDK Kit!

    Best regards
    Horst


      My System SpecsSystem Spec

Simple XAML Question ! problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved A Simple Question ? Jerin General Discussion 4 11 Oct 2009
A simple question Pete Vista installation & setup 6 02 Aug 2009
XAML extension question Lloyd Dupont Avalon 7 07 Jul 2007
Simple Question Shawn B. Avalon 2 19 Nov 2006
Question about Listview, XAML, and hover. Whitey Avalon 0 11 Oct 2006