Enabling User-Updated Live Tiles in Windows 8: Listing 2

BlankPage.xaml

<Page
    x:Class="VSMUpdateLiveTilesDemo.BlankPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:VSMUpdateLiveTilesDemo"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <StackPanel Margin="20,8" x:Name="TileStack">
            <TextBlock FontWeight="Bold">Metro Live Tile Updater</TextBlock>
            <TextBlock>Text</TextBlock>
           <TextBox x:Name="TileText" Text="{Binding Path=Text, Mode=TwoWay}"></TextBox>
            <TextBlock>Image Source</TextBlock>
            <TextBox x:Name="TileImageSource" Text="{Binding Path=ImageSource, Mode=TwoWay}"></TextBox>
            <Button x:Name="Update" Click="Update_Click">Update</Button>
        </StackPanel>
    </Grid>
</Page>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using VSMUpdateLiveTilesDemo.Common;
using Windows.UI.Notifications;

// The Blank Page item template is documented at 
// http://go.microsoft.com/fwlink/?LinkId=234238

About the Author

Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at [email protected].

comments powered by Disqus

Featured

Subscribe on YouTube