Tick http://asyncui.codeplex.com/SourceControl/changeset/view/7969#139603
You can create a UserControl by right-clicking on your project and selecting Add / New Item (Ctrl + Shift + A) and selecting User Control from the list of item templates. Then you name it and you end up with XAML, which you can change to add more user interface, for example here:
<UserControl x:Class="Xyzzer.AsyncUI.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366"> <Grid x:Name="LayoutRoot" Background="#FF0C0C0C"> <Grid VerticalAlignment="Top" Height="140"> <Grid.ColumnDefinitions> <ColumnDefinition Width="120" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Button x:Name="BackButton" IsEnabled="False" /> <TextBlock x:Name="PageTitle" Text="Some Page!" Grid.Column="1" /> </Grid> </Grid> </UserControl>
and code like this:
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Windows.Foundation; using Windows.UI.Popups; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Data; namespace Xyzzer.AsyncUI { partial class MainPage { public MainPage() { InitializeComponent(); } } }
Then you can use this control elsewhere in XAML as follows:
<xa:MainPage xmlns:xa="using:Xyzzer.AsyncUI" />
source share