The Now Markup Extension – XAML Markup

 

<Window 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:MyNamespace="clr-namespace:i4.WPF.Custom.MarkupExtensions;assembly=i4MarkupExtensions"
        mc:Ignorable="d"
        x:Class="MarkupExtensionsTest.Window1"
        Title="Window1"
        Height="182"
        Width="392">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.043*"/>
            <ColumnDefinition Width="0.851*"/>
            <ColumnDefinition Width="0.106*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="0.33*"/>
            <RowDefinition Height="0.33*"/>
            <RowDefinition Height="0.33*"/>
        </Grid.RowDefinitions>
        <TextBlock Margin="0" TextWrapping="Wrap" Background="#FFF4D18D" 
                   Text="{MyNamespace:Now}" 
                   Grid.RowSpan="1" Grid.ColumnSpan="1" Grid.Row="1" Grid.Column="1" >
        </TextBlock>
    </Grid>
</Window>
Advertisements

One Response to “The Now Markup Extension – XAML Markup”

  1. […] code can be found here, and the XAML here. Below is an example of the Now markup extension in […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: