Skip to main content
Home Forums Silverlight Programming Programming with .NET - General UIElement.Clip - value does not fall within the expected range
1 replies. Latest Post by nmarun on April 14, 2009.
(0)
nmarun
Member
118 points
33 Posts
04-12-2009 12:31 PM |
Hi,I'm trying to get this effect in Silverlight:http://flash-effects.com/create-wipe-transition-effect/
Below is my xaml:
<Rectangle x:Name="ArunDust" Grid.Column="0" Grid.Row="0" Width="250" Height="330" Fill="#FFCABDA9" Opacity="0.655" /><Image x:Name="testImage" Source="Images/testImage.jpg" Grid.Column="0" Grid.Row="0" /> <Path x:Name="path" Stroke="Azure"> <Path.Data> <PathGeometry x:Name="LeftTopClip"> <PathFigure StartPoint="1,37"> <LineSegment x:Name="TopLine" Point="40,37"/> <LineSegment x:Name="RightLine" Point="40,80"/> <LineSegment x:Name="BottomLine" Point="1,80" /> <LineSegment Point="1, 37" /> </PathFigure> </PathGeometry> </Path.Data></Path><Button x:Name="btnPlay" Content="Play" Click="btnPlay_Click" Grid.Column="1" Grid.Row="0" Width="40" Height="30"/>
My code-behind:
public Page(){ InitializeComponent();
// exception occurs at this line: testImage.Clip = LeftTopClip;}
I get this exception:{System.ArgumentException: Value does not fall within the expected range. at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.SetValue(INativeCoreTypeWrapper obj, DependencyProperty property, DependencyObject doh) at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh) at System.Windows.UIElement.set_Clip(Geometry value) at ImageWipe.Page..ctor() at ImageWipe.App.Application_Startup(Object sender, StartupEventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}
Please let me know if there is another way to get this done. I don't want to use the 'make clipping path' in Blend as this will remove my 'path' object and hard-code it into the image object.ThanksArun
04-14-2009 11:44 AM |
This is no longer an issue for me. Please close the ticket.