Help me Convert this WPF to Silverlight

Posted by Zhang JingChu under Silverlight on 12/29/2011 | Points: 10 | Views : 1082 | Status : [Member] | Replies : 1
Help me Convert this WPF to Silverlight

I am interested in a Charles Petzold C# example that shows how to do a fisheye effect ( http://www.charlespetzold.com/blog/2009/05/Realizing-a-Fisheye-Effect-in-Silverlight.html ). The XAML code samples are in WPF but I want to try this in Silverlight.

When I try to create the XAML code in Silverlight, the compiler complains in two locations:

<Style TargetType="{x:Type Button}">
Error 1 The type 'x:Type' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

<Style.Triggers>
Error 2 The attachable property 'Triggers' was not found in type 'Style'.

How do I convert this to Silverlight?




Responses

Posted by: Vuyiswamb on: 12/30/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Change this

<Style TargetType="{x:Type Button}">


to

<Style TargetType="Button">


There are no are no style triggers in Silverlight.
http://stackoverflow.com/questions/3529508/what-is-the-replacement-for-datatrigger-in-silverlight

Thank you for posting at Dotnetfunda
[Administrator]

Zhang JingChu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response