Binding in Style Setters – SilverLight 5 Beta

By | April 14, 2011

Silverlight 5  introduces Binding in style Setters. Hence you can use Binding, StaticResource or any markup extension inside the style Setters.
Let you have a class that defines your resource based on some custom logic :

public class MySettings 
{
    public Thickness Margin {get;set;}
}

Now from your style setters you can easily point to the class to get the value of the Thickness.

<local:MySettings x:Key="msettings" />
<Style>
    <Setter Property="Margin" Value="{Binding MyMargin, Source={StaticResource msettings}}" />
</Style>

In the code, it will bind the msettings object and pull the data from MyMargin.

58 thoughts on “Binding in Style Setters – SilverLight 5 Beta

  1. Calista Prevot

    Hi, just enjoyed your blog with very interesting opinions. Indeed, its hard work and requires much passion to maintain such a great blog.

  2. indian remy full lace wigs

    not sure if i am ready to go natural with my hair yet. Does it need a lot of tending to to keep it looking as stunning as my hair does when i put on full lace wigs?

  3. gastric bypass surgery

    I was extremely pleased to discover this web-site.I wanted to good time because of this wonderful read!! I definitely enjoying every bit of it and I maybe you have bookmarked to view new stuff you short article.

  4. p90x sale

    This blog can be so nice if you ask me. I will go on coming right here again and again. Go to my link too.

  5. mbt shoes clearance

    Very informative and useful post. You have nice command on the post and have explained in a very great way. Thanks for helping .Good work,hope your blog be better!I just want to make a blog like this!

  6. free ringtones

    Very good article. If there were more writers like you I’d have more places to go to when I do go online. Hahaha.

  7. Pingback: investment ideas for beginners

  8. bentley bags

    Please tell me that youre going to maintain this up! Its so excellent and so critical. I cant wait to read a lot more from you. I just feel like you know so considerably and know the best way to make men and women listen to what you’ve got to say. This blog is just too cool to be missed. Wonderful stuff, really. Please, PLEASE maintain it up!

  9. Ski Travel Insurance

    Wow, what a weblog! I mean, you just have so much guts to go ahead and tell it like it really is. Youre what blogging requirements, an open minded superhero who isnt afraid to tell it like it really is. This is definitely something men and women have to be up on. Excellent luck in the future, man.

  10. Import Car Insurance

    Thank you for this blog. Thats all I can say. You most certainly have made this weblog into something thats eye opening and essential. You clearly know so much about the subject, youve covered so numerous bases. Fantastic stuff from this component of the world wide web. Once more, thank you for this weblog.

  11. Tina Phare

    I think there should be an opinion bar where you could state what you think about it. Great read tho.

  12. 徵信

    about the most recent posts are fantastic quality bootcamp guess I’ll add you into my daily bloglist,would you mind writing your weblog with even more data,2

  13. Mexican Train Dominoes

    How-do-you-do, just necessary you to know I’ve added your web site to my Google bookmarks because of your extraordinary blog layout. But seriously, I feel your internet site has one of the freshest theme I’ve came across. It genuinely assists make reading your weblog a whole lot less difficult.

  14. Delcie Bivings

    Way cool, some interesting points! I appreciate you making this article available, the rest of the site is also high quality. Have a wonderful.

  15. European Breakdown Cover

    Great blog! I dont believe Ive seen all of the angles of this subject the way youve pointed them out. Youre a accurate star, a rock star man. Youve got so a lot to say and know so much about the subject that I think you should just teach a class about it…HaHa!

  16. Brent R. Bruce

    I’m typically to running a blog and i really admire your content. The article has really peaks my interest. I’m going to bookmark your web site and hold checking for brand new information.

  17. arkadaş

    Göcek; ülkemizin güney batısında yer alan güzel bir tatil beldemizdir. Yaz kış tatil imkanı bulabildiğiniz Göcek’de yazları denizin, kumsalın, güneşin ve parlayan maviliklerin tadını çıkartabilirken, kış aylarında da yaz aylarına göre daha sakin olan Göcek’de doğayla içiçe sessiz ve huzurlu bir tatil geçirebiliriniz. Kış ayları genellikle çok sert geçmemektedir ve yöre halkı kış aylarında bazen denize bile girebilmektedir. İklimi tipik Akdeniz ilkimidir ve zengin bitki örtüsüne sahiptir. Göcek’de kendinizi engin maviliklerin ve her tondan yeşilin içinde bulacaksınız. Göcek de sıradan tatil anlayışınız biraz değişebilir. Deniz, kum ve güneş ve dinlenme olan tatil

  18. Paula O. Love

    I’m impressed, I have to say. Actually not often do I encounter a weblog that’s each educative and entertaining, and let me let you know, you might have hit the nail on the head. Your idea is outstanding; the issue is something that not sufficient people are speaking intelligently about. I’m very joyful that I stumbled throughout this in my search for one thing regarding this.

  19. Gilbert A. Ballard

    Hello! I just would like to give an enormous thumbs up for the nice information you have here on this post. I can be coming again to your blog for more soon.

  20. Perfumes Importados Femininos

    I do consider all the ideas you have presented on your post. They’re very convincing and can certainly work. Nonetheless, the posts are too brief for newbies. May just you please prolong them a bit from next time? Thank you for the post.

  21. Forex Trading News

    whoah this blog is great i love studying your articles. Stay up the great paintings! You understand, lots of people are hunting around for this information, you could help them greatly.

  22. Daily FX

    I was just seeking this info for some time. After six hours of continuous Googleing, at last I got it in your web site. I wonder what is the lack of Google strategy that don’t rank this kind of informative sites in top of the list. Usually the top web sites are full of garbage.

  23. Theodore Cerdan

    That is the right blog for everyone who truly wants to learn about this matter. You understand such a lot its almost difficult to argue with you (not that I actually would…HaHa). You certainly put a completely new spin on a subject thats been written about for years. Excellent stuff, superb!

  24. herpes

    I have read some of the comments posted here with dismay. I agree with the poster that there is more to this than anyone realizes.

  25. have sex

    I don’t understand how anyone can read this and not think “genius alert”. Great article. I’ll keep coming back to see even more.

  26. get rid of bed bugs chelsea

    Good day very cool website!! Man .. Beautiful .. Amazing .. I’ll bookmark your web site and take the feeds also…I am happy to search out numerous helpful information here within the publish, we need develop extra techniques on this regard, thanks for sharing.

  27. Margarite Bowley

    Thanks a ton for making the effort to line all of this out for people. This particular write-up was extremely helpful to me.

  28. how to eradicate bed bugs gramercy

    You really make it appear so easy along with your presentation however I to find this matter to be actually one thing that I feel I might never understand. It kind of feels too complex and very broad for me. I am taking a look ahead to your subsequent put up, I will try to get the hang of it!

  29. bed bugs midtown nyc

    I think other web-site proprietors should take this web site as an model, very clean and fantastic user genial style and design, let alone the content. You’re an expert in this topic!

  30. bedbugs tribeca

    Great – I should definitely pronounce, impressed with your website. I had no trouble navigating through all the tabs as well as related information ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your client to communicate. Excellent task.

  31. Edmund Regn

    hello,this is an excellent article,I found it on bing and I like it very much,I agree with you, lots of things will be learned form your site,but I am not follw well with the last part,can you explain it for me ?I need your answer,and I will be back again!

  32. Normand Rempel

    Hi,what an excellent article this is,I found it on yahoo and I love it very much,I agree with you, it help me a lot in decision,but I still have some questions with the last part,can you explain it for me ?I need your answer,and I will keep on watching your blog

  33. Spring Bullen

    Hi,what an excellent article this is,I found it on yahoo and I like it very much,I agree with you, it help me a lot in decision,but I still have some questions with the last part,can you explain it for me ?I need your answer,and I will keep on watching your blog

Comments are closed.