2 Replies - 9170 Views - Last Post: 05 January 2012 - 03:46 PM

#1 complete  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 103
  • Joined: 12-April 07

Help me Convert this WPF to Silverlight

Posted 29 December 2011 - 03:57 PM

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.charlespe...ilverlight.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?

Is This A Good Question/Topic? 0
  • +

Replies To: Help me Convert this WPF to Silverlight

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: Help me Convert this WPF to Silverlight

Posted 30 December 2011 - 06:41 AM

For the first error, make sure you have this namespace created in the XAML...

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

For the second error, Silverlight doesn't have Triggers. You will need to use a ValueConverter. A ValueConverter can do the same things as Triggers.

http://timheuer.com/...econverter.aspx
Was This Post Helpful? 1
  • +
  • -

#3 complete  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 103
  • Joined: 12-April 07

Re: Help me Convert this WPF to Silverlight

Posted 05 January 2012 - 03:46 PM

Thanks.

I got it working.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1