Create a question board for Game 2 in Silverlight

Source: Internet
Author: User

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

 

:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.