473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Therefore how I refresh properties views in VS programmatically(VS= Visual Studio)


Hi,
I try to write a Web Custom Control. But I have a little problem for
refreshing the properties view of my Web Control in Visual Studio ().

When I modify the value of text property of my Control by programing, it
changes in the Design view but no in properties viewAnd when in the
design view, I lost the focus and I click above my control. It is
refreshed and text property contains the good value.

Therefore how I refresh properties views programmatically
In fact I look for a method similar to
ControlDesigner.UpdateDesignTimeHtml() for properties view in VS.
Thank you in advance for your help.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
1 1902
Hi Laurent,

Frankly I haven't written web controls but in WindowsForms controls (and I
believe it goes for web too) in order to play nicely with the designer you
should notify for any the changes of the control in order property browser
to be refreshed accordingly and Undo/Redo to work. You can do that in two
ways.

1. When you change a property you should call IComponentChangeService's
OnComponentChanging and OnComponentChanged.

-or-

2. (This is what I sugges) to change the propties not directly, but via
PorpertyDescriptor obtained from components TypeDescriptor. This will take
kare of all notifications for you.

--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Laurent Liegeois" <ll*@lli.be> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...

Hi,
I try to write a Web Custom Control. But I have a little problem for
refreshing the properties view of my Web Control in Visual Studio ().

When I modify the value of text property of my Control by programing, it
changes in the Design view but no in properties viewAnd when in the
design view, I lost the focus and I click above my control. It is
refreshed and text property contains the good value.

Therefore how I refresh properties views programmatically
In fact I look for a method similar to
ControlDesigner.UpdateDesignTimeHtml() for properties view in VS.
Thank you in advance for your help.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mike N. | last post by:
Hello: I am new to T-SQL programing, and relativly new to SQL statements in general, although I have a good understanding of database theory. I'm a little confused as to the fundamental...
2
by: Avirneni | last post by:
With my understanding of indexed views and according to books I read "indexed views" are supposed to perform much better than "temp tables" (temp table having primary key and indexed view with...
0
by: clintonG | last post by:
I'm switching style sheets and the designer wants to maintain state at design-time so I'm not seeing the results of new styles displayed by the designer. Is there any way to refresh what is being...
3
by: R Reyes | last post by:
Just wondering if anyone knows the pros/cons between creating a database programmatically vs using the application's tool windows/features that come with SQLServer, Access, Oracle, etc... Is it...
13
by: Patrick * | last post by:
Reading a book on .ASP .NET I am getting a bit mixed up as to the difference between "property" and "attribute" as the terms don't seem to be used consistently in the book I am reading. Can anyone...
9
by: keithv | last post by:
I'm looking at a bunch of code which has lots of class fields converted into properties with just the simplest code: private int empID; public int empID { get { return empID; } set { empID =...
4
by: billy | last post by:
So let's say I start out with a new project (C++, CLR, Windows Form App). Then go right to Add Class | User Control and name it Foo. Then I add this code: public: int _propertyTest;
12
by: Dennis | last post by:
I am very clear on Properties and Methods and I think I understand Fields but not sure about this. Do I have the items marked properly in the below class? Any clarification would be appreciated. ...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.