O'Reilly logo

Pro C# 2010 and the .NET 4 Platform, Fifth Edition by Andrew Troelsen

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

28.8. Building the Documents Tab

Click on the Documents tab of your TabItem and use the Blend editor to open this control for editing. You should already have a default <Grid> control as the direct child of the TabItem control; however, change it to a StackPanel here using the Objects and Timeline window. This tab will display a FlowDocument that allows the user to highlight selected text, as well as add annotations using the Sticky Notes API.

Begin by defining the following ToolBar control, which has three simple (and unnamed!) Button controls. You will be rigging up a few new commands to these controls later on, so you do not need to refer to them in code:

<TabItem x:Name="tabDocuments" Header="Documents" VerticalAlignment="Bottom" Height="20"> ...

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