Howdy,
Ian G did a blog article back in 2004 on rubber band selection in WPF
http://www.interact-sw.co.uk/iangblog/2004/02/06/rubberband
that showed how to do this by placing a rectangle in the visual tree at an appropriate level.
Is this still the way to go Or is there a different preferred method
Thanks
Paul

Rubber Banding
dmk70
GetAdornerLayer is a static method on the AdornerLayer class. So you declare myAdornerLayer to be of type AdornerLayer and then assign directly as shown.
Windows Forms development is completely separate from WPF development. If you install .NET 3.0 or 3.5 you should be able to create WPF projects within VS2005.
fhunter
After months of searching I've concluded that for Windows.Forms (VS2005 [VB]):
1. MSFT "Adorners" provide Control grips in the VS2005 UI for design-time use, not for user interface at run-time.
2. With some difficulty I've written my own VB code to provide re-sizing grips on my controls for run-time use (re-inventing the wheel).
3. For VB rubber-banding lines and rectangles at run-time, try ControlPaint.DrawReversible .........
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/M_System
_Windows_Forms_ControlPaint_DrawReversibleLine_1_08a5d49c.htm
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/M_System _Windows_Forms_ControlPaint_DrawReversibleFrame_1_6b76f023.htm
Why is it so difficult to find out these things
PSVB PowerPacks v2.0 line, oval and rectangle "shapes" don't seem to have a delete option when added to a form in the VS2005 UI design-time.
Dave
stswordman
SimonS_
Thanks to both of you for answering the question.
I will take a look at the Adorners and the overlay canvas.
Paul
Majid.vagheeian
Context: VS2005(VB) Windows.Forms project.
I'm confused about how to provide run-time manipulation of userControls ie shapes (line, polygon, elipse; re-size, rubber-banding, etc).
http://msdn2.microsoft.com/en-us/library/ms743737.aspx says an Adorner is bound to a UIElement and is rendered on an AdornerLayer. Could MS please explain how to create on a Form using VB, an AdornerLayer and UIElements. This url gives VB code for a SimpleCircleAdorner class and:
VB PowerPacks v2.0 provides line, oval and rectangle "shapes", but these are are not UIElements and are a bit limited.
http://msdn2.microsoft.com/en-us/library/ms747393.aspx "Shapes and Basic Drawing in WPF Overview" says a Shape object is a type of UIElement, so I suppose it would do the job but the samples are in XMAL and C#.
Can WPF be coded in VB on a Form or do I have to get my head round XMAL and C# to use WPF
Finally, where does WPF fit into the grand scheme of things Its in .NET 3.0 but it doesn't seem to be intended for VS2005(VB) Windows.Forms developers, is that right
dave45, disconbobulated.
Dhondtie
Pavan