Jordan,
I think the main problem is that your C# code doesnt have semicolons and
looks I dont know if the compiler recognize the Sub keyboard.
I ended up doing this in c# -
Private Sub doClip()
Dim avmb As AnnotationViewModelBase = CType(DataContext,
AnnotationViewModelBase)
Dim r As New Rect(0, 0, avmb.ConfiguredWidth, avmb.ConfiguredHeight)
Dim rect As New RectangleGeometry()
rect.Rect = r
LayoutRoot.Clip = rect
Miguel A. Madero Reyes
<http://www.miguelmadero.com/> www.miguelmadero.com (blog)
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
(871)730-8319
(871)763-0020
Peten #509
Fracc Florida Blanca, 27260
Torreón, Coahuila
P "Please reconsider your environmental responsibility before printing this
e-mail"
The information in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee. If you are not the
intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jordan Knight
Sent: Friday, 19 September 2008 3:26 PM
To: [email protected]
Subject: RE: [OzSilverlight] Canvas Overflow
I ended up hacking it a bit
I wanted to bind the values for the clip (as you can move the item around
the screen) i.e. its a magnifying glass for an image
You cant do this though:
<Canvas.Clip>
<RectangleGeometry Rect={Binding MyRect}/>
Where myrect is a Rect object from the ViewModel
I ended up doing this in c# -
Private Sub doClip()
Dim avmb As AnnotationViewModelBase = CType(DataContext,
AnnotationViewModelBase)
Dim r As New Rect(0, 0, avmb.ConfiguredWidth, avmb.ConfiguredHeight)
Dim rect As New RectangleGeometry()
rect.Rect = r
LayoutRoot.Clip = rect
avmb.ConfiguredWidth is from the ViewModel and changes as the drags happen
Im not happy with this solution so if anyone can tell me how to bind to
that Clip stuff
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of .net noobie
Sent: Friday, 19 September 2008 3:14 PM
To: [email protected]
Subject: Re: [OzSilverlight] Canvas Overflow
Could you used a "ScrollViewer", might not be exactly what you after, but
might be able to stop your canvas from going bigger than you wanted?
On Fri, Sep 19, 2008 at 1:27 PM, Jordan Knight <[EMAIL PROTECTED]>
wrote:
Hi all,
I can't for the life of me figure out how to stop elements in a canvas from
overflowing J
I want to truncate content when is too big J
Cheers,
Jordan
-------------------------------------------------------------------
OzSilverlight.com - to unsubscribe from this list, send a message back to
the list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net
--
.net noobie
-------------------------------------------------------------------
OzSilverlight.com - to unsubscribe from this list, send a message back to
the list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net
-------------------------------------------------------------------
OzSilverlight.com - to unsubscribe from this list, send a message back to
the list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net
-------------------------------------------------------------------
OzSilverlight.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net