This article adds a question board image for the search item, and adds the question board to the list using the WrapPanel control. This article uses Silverlight Toolkit, if the installation is not completed, download the Silverlight 3 Toolkit July 2009 Installer.
1. Add the question board image to the project and adjust the size and position as follows:
2. Select Assets-> Controls-> WrapPanel, and add the WrapPanel control to the question board image:
Since WrapPanel will list items and adjust their positions to the center of the question Board:
3Before adding the TextBlock control, add the WhiteboardText style in App. xaml:
<Style x:Key="WhiteboardText" TargetType="TextBlock"> <Setter Property="Foreground" Value="#FFB11111"/> <Setter Property="FontFamily" Value="Comic Sans MS"/> <Setter Property="FontSize" Value="10"/> <Setter Property="Margin" Value="10,10,10,0"/></Style>
4. Set the question board and WrapPanel to a Canvas:
Adjust the widget position in the TreeView:
5. Click WrapPanel and double-click TextBlock in Assets-> Controls to add a child TextBlock to WrapPanel:
Select the added TextBlock and set the Layout size (Width and Height) to Auto ):
In other (Miscellaneous) options, set the Style to the WhiteboardText Style just defined:
Miscellaneous-> Style-> Local Resource-> WhiteboardText
6. Copy TextBlock 12 times. In this way, a total of 13 textblocks are obtained, and the Text and Name information are added for them respectively:
· Stapler
· Idol
· Candies
· Ball
· Tape
· Eeyore
· Penpencil
· Tigger
· Business Cards
· Learning WCF
· Rock
· Dog
· Post Its
: