By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
control?

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
renamed.

I hope this makes sense! Thanks in advance.

Jun 1 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.