|
-
December 29th, 2011, 11:31 PM
#1
Help me Convert this WPF to Silverlight
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/2...lverlight.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?
-
January 2nd, 2012, 04:10 PM
#2
Re: Help me Convert this WPF to Silverlight
Not everything in WPF will translate directly to Silverlight (like the synchronous Socket class methods, ugh.) What does the namespace "x" translate to? There should be an "xmlns:x=http://<...>" at the top of the XAML file. Chances are, the "x" namespace is pointing to an assembly that doesn't contain a definition for Type. If the XAML code was copied and pasted, it most likely points to the WPF assembly that contains Type, but Silverlight will probably be different.
R.I.P. 3.5" Floppy Drives
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|