I have a StackPanel of Image objects that are created and added dynamically. How can I add a highlight/glow for a selected image.
I have a StackPanel of Image objects that are created and added dynamically. How
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can create a glow around an object by applying a
DropShadowEffect, see the following article for details:http://www.silverlightshow.net/tips/Using-Blur-and-DropShadow-effects-in-Silverlight-3.aspx
To make a glow, simply create a
DropShadowEffectwith a zeroDirectionandShadowDepthas per this blog post:http://www.andybeaulieu.com/Home/tabid/67/EntryID/170/Default.aspx
In order to support selection, you should be using a
ListBoxrather than aStackPanel. You can then style the selected item, see the following question:how to customize the listbox selected item style in silverlight 4