What WPF is about, in 9 lines.

I came across this sample as an example of how powerful WPF is. 

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml&quot; Title="DropShadow Inking Test">
    <Grid Background="Goldenrod">
        <Canvas Name="dropshadowBackplane" RenderTransform="1,0,0,1,3,3">
            <Canvas.Background>
                <VisualBrush Visual="{Binding ElementName=inkCanvas}" Opacity="0.50" />
            </Canvas.Background>
        </Canvas>
        <InkCanvas Name ="inkCanvas" Background ="Transparent" />
    </Grid >
</Window>

In 9 lines of XAML you get a canvas that you can ink on to with both a stylus and mouse and it has a drop shadow.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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: