Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Simple XAML Question !

 
 
Old 01-04-2007   #1 (permalink)
MarkS


 
 

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
Old 01-04-2007   #2 (permalink)
Rick Beerendonk


 
 

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
Old 01-04-2007   #3 (permalink)
MarkS


 
 

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
Old 01-04-2007   #4 (permalink)
Laurent Bugnion [MVP]


 
 

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
Old 01-12-2007   #5 (permalink)
Horst Klein


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
This may be a simple question System Security
a simple question Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46