469,658 Members | 1,855 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,658 developers. It's quick & easy.

Force Refresh / Repaint of Page Control in Design Mode (IDE) ??

Is there a way to force the Visual Studio IDE (Page Control at design-
time) to refresh / repaint itself upon drag & drop of *any* item from
the toolbox? Perhaps a method I need to override within the page

I'm aware of using
"ComponentModel.RefreshProperties(RefreshPropertie s.All)" within
custom controls, but that only refreshes the page when something
specific to that custom control is changed. I'm looking for a way to
hook into the method(s) that add *any* new control -- custom or
standard (label, textbox, etc.) -- to the page so I can force a
refresh of the entire page *every time* a control is added. It would
also have to work when a control is renamed.

For example:

1. Drop custom validator control to page

2. Custom control has logic in overriden Render() method to check if
ControlToValidate control exists (e.g. "TextBox1"). If not, custom
control paints itself as an error message for quick visibility in IDE,
eliminating the need to build and debug before discovering the error.

3. Drop TextBox control to page (default name would be "TextBox1").
Custom control doesn't know to repaint itself, removing the error
message, even though ControlToValidate now exists. Page control needs
to somehow be told to repaint all controls when another is added or

I hope this makes sense! Thanks in advance.

Jun 1 '07 #1
0 2086

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Morten Wennevik | last post: by
1 post views Thread by Claus Konrad | last post: by
1 post views Thread by Marco Maroni | last post: by
17 posts views Thread by SamSpade | last post: by
reply views Thread by Allan Bredahl | last post: by
4 posts views Thread by Paul Drummond | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.