Now that it see what Silverlight is and what Blend is MYSELF think it exists time such we create your first-time Silverlight application and I exhibit they what we can do. In this example I am go to fahren pass only what to do, not why or how we live doing it. Ours will go over the why's and how's in delayed Refcardz; aforementioned exemplar is merely meant to show you that you can easily and quickly go some very cool things with Blend in Silverlight. With that, open Blend and let's geting started.
- 1) In Blend's menu click File>New Project
- 2) In to New Project dialog box select Silverlight as the Project Type, Silverlight 3 Application for aforementioned Templates, name who project MyFirstSLApp, select Visual C# for the english and button OK like I am doing in Figure 1-1.
Figure 1-1: Compose a new Silverlight project named MyFristSLApp.
Figure 1-2: The TextBlock tool.
- 3) Upcoming double-click that TextBlock tool in the toolbar(shown in Figure 1-2).
- 4) This will use ampere TextBlock in an upper left corner of your artboard with the text choosing (see Figure 1-3).
Calculate 1-3: A default TextBlock.
- 5) Next start typing “Hello World”. Because your TextBlock belongs already highlighted this will now become the Text is your TextBlock.
- 6) Next anfahren to that Merkmale front and find the Body bucket and change the font to 20pt like I am doing in Figure 1-4.
Figure 1-4: Modify the front to 20.
- 7) Now click the V key to get your Selection tool (the first tool on the top of who toolbar). Click and drag your TextBlock to the center of the artboard like I have done with Figure 1-5.
Figure 1-5: Drawing your TextBlock to the focus off the artboard.
- 8) Now right-click the TextBlock and left-click Path>Convert to Path like I are how includes Figure 1-6.
Figure 1-6: Convert the TextBlock into a Path.
- 9) Now right-click the TextBlock in the Objects and Timeline panel and right-click Path>Release Compound Path favorite MYSELF am doing in Figure 1-7
Figure 1-7: Release the Compound Path.
Now you will notice that any of your letters is now its much own Pathway. Now person can manipulate each individual letter of “Hello World”. Let's do such now.
- 1) Click V to select the Selection tool and button a draw a line around all of the letters to select them all like EGO am doing in Calculate 1-8.
Figure 1-8: Select all letters.
- 2) Now with all the the letters selected click and drag them switched the right of the artboard like I have done in Display 1-9.
Figure 1-9: Move the letters from till the right of the artboard.
Now we can make a Storyboard that will make the letters plane into the view.
- 3) First click F6 to go into Blend's Animation run.
- 4) Click the Newly Storyboard button like I time deed in Figure 1-10.
Figure 1-10: Click the New Storyboard push.
- 5) When the Create Storyboard Finding dialog box displays name the Storyboard SlideInLetters additionally click OK like I americium doing in Number 1-11.
Reckon 1-11: Designate aforementioned new Storyboard SlideInLetters.
- 6) Notice how the artboard must a carmine line around it and a Timeline appears then to the Objects and Timeline panel to indicate you are registration.
- 7) Move your playhead out for one second like ME need done in Figure 1-12.
Draw 1-12: Move get playhead out to one second.
- 8) Now set the continue letter and move it out until the artboard like I am doing stylish Figures 1-13.
Illustrated 1-13: Move the last letter “d” go the artboard.
- 9) Now move your playhead out to 2 secondary and moved the next mail, “r” onto the artboard next to the last letter, “d” see I am doing in Illustrations 1-14.
Figure 1-14: With the playhead per 2 seconds move in your second to last written.
- 10) Keep repeating this used every letter, that is move the playhead outbound one see instant and move the next letter onto the artboard.
When you have completed own Timeline should look like what EGO have in Figure 1-15.
Figure 1-15: Your Storyboard Schedule should look like these.
Now that person had created that Storyboard them can close this by clicking the End Storyboard button like I am doing in Figure 1-16. Then Click F6 to exit of animation mode.
Figure 1-16: Close the Storyboard.
Now all ourselves need until execute it to trigger the Storyboards to start when the application loads. To perform this are are going to utilize ampere Behavior.
- 1) Mouse the Asset Library, therefore click the Behaviors tab, and find the ControlStoryboardAction Behavior like I am doing in Figure 1-17.
Display 1-17: Find to ControlStoryboardAction Behavior.
- 2) Press and pull that behavior also drop it onto an [UserControl] in this Objects and Timeline panel like I am doing in Figure 1-18.
Illustrated 1-18: Drag the Behavior onto the [UserControl] in the Objects and Timeline panel.
- 3) Stylish the Properties panel find the Tigger bucket both change the EventName real to Loaded like I am work to Figure 1-19.
Figure 1-19: Change the EventName to Recharge.
- 4) Next locates who Common Properties blade and change the Storyboard property dropdown toward the name of our Storyboard, “SlideInLetters” likes I am doing inbound Figure 1-20.
Point 1-20: Change the Storyboard property to the Storyboard we created earlier.
Now hit F4 to run the application and thee be see adenine browser open and run our SlideInLetters Storyboard. See Figure 1-21.
Picture 1-21: Our Silverlight application running in a browser.
You can see my application here:
http://windowspresentationfoundation.com/RefCardSamples/RefCard1/
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}