1. Start Visual Studio 2010
2. Select File-> New-> Project
3. In New Project dialog box Select Silverlight Application and create a new Silverlight Application named MyProject-> Click Ok button.
4. A new dialog box will appear. In this dialog box you have to choose where you want to host the silverlight application you may choose a new ASP.NET Website or a new ASP.NET MVC Application.
5. Don't Check Enable .NET RIA Services
6. Click OK.
7. In Main.xaml go to XAML code and write following code:
8. From Toolbox drag a Text Block and drop it inside Main.xaml
9. From Property Palette of Text Block Set Following properties
a. Horizontal Alignment : Center
b. Vertical Alignment: Center
c. Margin : 0
d. Height : Auto
e. Width: Auto
f. FontFamily: Verdana
g. Font Size : 72
h. FontWeight: Bold
i. Forground : White
j. Text: Hello Silverlight
k. Name: no name/null
10. Press F5 to run the program
11. Stop Debugging
12. Right Click on Main.xaml->Open in Expression Blend
13. In Expression Blend Select TextBlock from Objects and Timeline panel-> Copy it by clicking right mouse / Ctrl+C-> Past It by clicking Right Mouse/Ctrl+V
14.Click New Text Block (That you have been paste)-> Set the name as Shadow from properties
15.Select Shadow named Text block from Objects and Timeline panel
16.Assets->Effects->BlurEffect->drag BlurEffect-> drop it on Shadow Named Text Block-> As a result BlurEffects Should be set up in Objects and Timeline panel.
17. From Objects and Timeline Panel Select BlurEffects
17.From Properties set Radius=50
18.In the Objects and Timeline panel Click on +(plus) signed icon-> Create Storyboard Resource dialog named ShadowStoryboard->as a result Blend will turns in recording mode.
19. Set opacity property of Shadow named text block = 0%
20. Move the yellow vertical line to 500.
21. Select the Shadow TextBlock-> Click Record Keyframe button from the top of ShadowStoryboard.
22. Select ShadowStoryboard from top of the objects and timeline panel ->Check Auto Reverse-> Set RepeatBehaviour=3x
23. Select the Text Block (Null / no name)->from properties set cursor=Hand
24. Select Event Icon from Top right corner of Properties->Double Click on MouseLeftButtonDown-> Wright following code:-
private void textBlock_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var storyboard=this.Resources["ShadowStoryboard"] as Storyboard;
if(storyboard!=null)
{
storyboard.Begin();
}
}
25. Press F5 to run the project
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন