Showing posts with label XAML. Show all posts
Showing posts with label XAML. Show all posts

Thursday, September 13, 2012

WinRT XAML Toolkit

A set of controls, extensions and helper classes for Windows Runtime XAML applications, to help you build your apps faster, letting you focus on adding cool features and not worrying about plumbing.

Website: WinRT XAML Toolkit


Tuesday, June 12, 2012

Set background using LinearGradientBrush

Example to set background using LinearGradientBrush.

Set background using LinearGradientBrush


    <Grid x:Name="root">
        <Grid.Background>
            <LinearGradientBrush StartPoint="0 0" EndPoint="1 0">
                <GradientStop Offset="0" Color="Red" />
                <GradientStop Offset="1" Color="Blue" />
            </LinearGradientBrush>
        </Grid.Background>
    </Grid>



Wednesday, June 6, 2012

Embed MediaElement in XAML to play media

MediaElement in XAML


    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <MediaElement
            Source="http://media.ch9.ms/ch9/3748/ad8542fd-4b59-4951-bf4a-7e98cb4e3748/VSToolbox37_high.mp4"
            Width="640"
            Height="480"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            />
        
    </Grid>


Monday, June 4, 2012

Load Image using XAML

To load Image in Metro style app, simple insert <Image...> elements in XAML.

Example:

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Image Source="http://goo.gl/fHDLv"
               Stretch="None"/>
        <TextBlock
            Text="Hello Visual Studio Express 2012 RC for Windows 8"
            FontFamily="Arial"
            FontSize="30"
            Foreground="AntiqueWhite"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"/>
        
    </Grid>


Load Image using XAML



Saturday, June 2, 2012

Hello Visual Studio Express 2012 RC for Windows 8

As common practice, click New Project... on starting page of Visual Studio Express 2012 RC for Windows 8.


Select template of Visual C++ Windows Metro style, Blank App (XAML), with name of HelloMetroCpp. And click OK.


Double click on MainPage.xaml in Solution Explorer to open it.


- Manual edit XAML to show something. Insert the code in-between <Grid></Grid>

        <TextBlock 
            Text="Hello Visual Studio Express 2012 RC for Windows 8"
            FontFamily="Times New Roman"
            FontSize="30"
            Foreground="White"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"/>




Save, Build and Run it.


To close the test app, you can switch back to Visual Studio Express IDE by Alt-Tab keys, then click the icon to stop debugging.

Or, drag on top of the hello app, move to bottom on screen to close it.

Thursday, April 5, 2012

Visual Studio Toolbox: Building Metro Style Apps with XAML


How you can use Visual Studio 11 to start building Metro style apps for Windows 8. The video will focus on using XAML and will show you how to use each of the three project templates Visual Studio provides. And then demonstrate building an app that uses real data instead of sample data.