Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Can one use glyphs to manage user-interface with something other than a full-feldged control
 

Can one use glyphs to manage user-interface with something other than a full-feldged control

Hi --

I'm going to be drawing a bunch of shapes on a form surface with GDI+ and will be wanting to associate behavior with these objects. Is it at all possible to use glyphs, adorners and a BehaviorServiceto manage user interaction with these objects even if they don't implement full-fledged control behavior? (I'm hoping to makemy objectsmore lightweight than controls and will want to redraw tand reposition hem quickly without the overhead of individal component event handlers.)

Any help on this question would be greatly appreciated.

Regards,

Mike

mclagett  Monday, May 22, 2006 7:05 PM

Hi Mike,

If all you need to do is draw on the designer surface (well, in the adorner window) then yes, this is a good approach. If they somehow need to be tied to an underlying control or component, you might want to consider a different approach. It really all depends on the user experience/scenario you are trying to support.

Martin

Martin Thorsen - MSFT  Tuesday, May 23, 2006 1:18 AM

Hi Again --

Just wanted to add on to my question. It occurred to me that since glyph objects are user interface objects that have a paint method, but no window handle, and use the graphics surface of their transparent adorner parent, maybe my lightweight graphic objects can just be glyph-derived objects. In this way I can leverage the layering of the adorner mechanism for free. With this point of view my glyph-derived graphical objects wouldn't be associated with any undrlying control at all; they would just exist inside the transparent adorner window (they would in essence be adorning the underlying form directly). Does this seem like an unwise approach to anyone who knows about these things?

Thanks,

Mike

mclagett  Monday, May 22, 2006 8:28 PM

Hi Mike,

If all you need to do is draw on the designer surface (well, in the adorner window) then yes, this is a good approach. If they somehow need to be tied to an underlying control or component, you might want to consider a different approach. It really all depends on the user experience/scenario you are trying to support.

Martin

Martin Thorsen - MSFT  Tuesday, May 23, 2006 1:18 AM

You can use google to search for other answers

Custom Search

More Threads

• ComboBox with custom back color for each item
• Changing the ListViewItem height...
• Form Designer Blank
• Visual Studio 2005 MaskedTextBox
• Imagelist: Embedded Resource problem
• Host Designer Questions
• UserControl With Multiple Panels
• Invokepaint to paint another controls image on your control
• I need .NET Graphing Component
• I need the list control (styled with check boxes) to move its focus and selects the list item that I just checked.