O'Reilly logo

Microsoft Silverlight 4 Business Application Development Beginner's Guide by Frank LaVigne, Cameron Albert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - putting the control together

We have the basis for creating our first lookless control, but we need to add an InkPresenter control and wire up the events like we did in Chapter 4. Let's do that now by completing the following steps:

  1. Replace the Style definition in the Generic.xaml file that Visual Studio created for us, with the following code:
    <Style TargetType="local:SignatureControl" >
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="local:SignatureControl">
    <Grid>
    <InkPresenter x:Name="inkPresenter"
    Strokes="{TemplateBinding Strokes}"
    Background="{TemplateBinding Background}"/>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    
  2. Add a reference to the System.Windows.Ink namespace by adding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required