• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Adding WCF Features in the SilverLight Application

Distributing WCF features in the SilverLight Application

Go to solution explorer Screenshot_7 right click on silverlight foler Screenshot_7 click on ‘add. Service reference

Address: http: //loathes : /003 / servicel.svc

Click on go button Screenshot_7 click on ok button


By default the Microsoft given namespace name is ‘service reference1’

Go to main page .XAML code behind window

Using silverlight application 53. Service reference1;

Namespace silverlight application 53


Public partical class mainpage: user control


Public mainpage()


Initialize component ();

Service 1 client obj = new service 1 client();

Obj. add str completed + = new event handler <addstrcompleted eventargs>




Strubg s;

Void obj_add strcompleted (object sender, addstr completed event args e)


S = e.result . tosting();


Private void button_click (object sender, routed eventrags e)


Textbox1.text = s;

} } }


while declaring addstrcompleted event press two times tab key after giving “+=

Using addstrcompleted event eventArgs parameter we can get WCF method data


Effects In the SilverLight

Effects are used to give rich interactive web graphical features, the silver light support two types of effects

  1. Blur effect
  2. Shadow effect

SilverLight Blur Effect

Open new silver light application

Go to XAML mode

In the canvas tag


<button X:name = “b1” height = “100” width = “250” content = “welcome” fontsize = “36” click = “b1- click”>

<button. Effect>

<blur effect radius = “100” > </bluer effect >

</button. Effect>




Blur Effect giving at Runtime

Go to button click event

Using system. Windows. Media. Effects;

Private void bl-clicks (objet sender, routed event args e )


If (bl.effect == null)


Blur effect b = new blureffet ();

b.radius = 100;

  1. Effect = b;




Bl. Effect = null;




SilverLight Shadow Effect

Open new silverlight application

Go to SAML mode

In the canvas tag


<button X: name = “bi” Height = “100” width = “250” content = “welcome” font size = “40” canvas. Left = “60” canvas . top : “100”>

<button. Effect>

<dropshoadow effect blurradius = “100” shadow depth = “100”>

</dropshadow effect>

</button. Effect>



Review Date
Reviewed Item
Adding WCF Features in the SilverLight Application
Author Rating

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Adding WCF Features in the SilverLight Application"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.