|
<UserControl x:Class="Sandworks.Silverlight.NamespaceExample.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"
xmlns:my="clr-namespace:Sandworks.Silverlight.NamespaceExample.Controls"
xmlns:conv="clr-namespace:Sandworks.Silverlight.NamespaceExample.Converters"
xmlns:lib="clr-namespace:Sandworks.Silverlight.NamespaceExample.ClassLibrary.Converters;assembly=Sandworks.Silverlight.NamespaceExample.ClassLibrary"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
<UserControl.Resources>
<conv:DateConverter x:Key="dateConverter" />
<lib:YesConverter x:Key="yesConverter" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="270" />
<ColumnDefinition Width="120" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="180" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox Name="txtDate" Text="1986-11-13" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" />
<sdk:Calendar DisplayDate="{Binding ElementName=txtDate, Path=Text, Converter={StaticResource dateConverter}}"
SelectedDate="{Binding ElementName=txtDate, Path=Text, Converter={StaticResource dateConverter}}"
Grid.Row="1" Grid.RowSpan="2" />
<my:CoolUserControl Grid.Column="1" Grid.Row="1" />
<TextBlock Grid.Row="2" Text="Will Arnold Schwarzenegger ever be president:" />
<TextBlock Grid.Row="2" Grid.Column="2" FontWeight="Bold"
Text="{Binding ElementName=txtDate, Path=Text, Converter={StaticResource yesConverter}}" />
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.