<UserControl x:Class="Mono.Moonlight.BindingConverter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:clr="clr-namespace:Mono.Moonlight"
    xmlns:moon="clr-namespace:MoonTest.System.Windows.Data"
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <Canvas>
            <Canvas.Resources>
                <clr:DateConverter x:Name="dateconverter" />
                <clr:DateClass x:Name="Bob" Date="01-01-2007" />
                <moon:OpacityTest x:Name="Source" />
                <clr:FloatConverter x:Name="floatconverter" />
            </Canvas.Resources>
                
            <TextBlock Text="{Binding Now,Converter={StaticResource dateconverter},ConverterParameter='dddd, MMMM, yyyy'}">
                <TextBlock.DataContext>
                    <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>

            <TextBlock Canvas.Top="15" Text="{Binding Now,Converter={StaticResource dateconverter},ConverterParameter='dateconverter'}">
                <TextBlock.DataContext>
                    <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>

            <TextBlock Canvas.Top="30" Text="{Binding Now,Converter={StaticResource dateconverter},ConverterParameter=dateconverter}">
                <TextBlock.DataContext>
                    <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>
            
            <TextBlock Canvas.Top="45" Text="{Binding Now,Converter={StaticResource dateconverter},ConverterParameter={StaticResource dateconverter}}">
                <TextBlock.DataContext>
                        <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>
            <TextBlock Canvas.Top="60" Text="{Binding FakeOne,Converter={StaticResource dateconverter},ConverterParameter={StaticResource dateconverter}}">
                <TextBlock.DataContext>
                        <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>
            <TextBlock Canvas.Top="75" Text="{Binding NullNow,Converter={StaticResource dateconverter},ConverterParameter={StaticResource dateconverter}}">
                <TextBlock.DataContext>
                        <clr:DateConverter />
                </TextBlock.DataContext>
            </TextBlock>
            <TextBlock Canvas.Top="90" Text="{Binding NullNow,Converter={StaticResource dateconverter},ConverterParameter={StaticResource dateconverter}}">
                <!--No DataContext-->
            </TextBlock>
            
            <TextBlock x:Name="a">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path ="Opacity" />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="b">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path =" Opacity" />
                </TextBlock.Text>
            </TextBlock>
            
            <TextBlock x:Name="c">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path ="Opacity " />
                </TextBlock.Text>
            </TextBlock>
            
            <TextBlock x:Name="d">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path =" Opacity " />
                </TextBlock.Text>
            </TextBlock>
            
            <TextBlock x:Name="e">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path ="1Opacity" />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="f">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path =" " />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="g">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path ="" />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="h">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="i">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path="Opacity" Converter="{StaticResource floatconverter}" />
                </TextBlock.Text>
            </TextBlock>

            <TextBlock x:Name="j">
                <TextBlock.Text>
                    <Binding Source="{StaticResource Source}" Path="Opacity" Converter="{StaticResource floatconverter}" />
                </TextBlock.Text>
            </TextBlock>
        </Canvas>
    </Grid>
</UserControl>

