PC Review


Reply
Thread Tools Rate Thread

c# accessors

 
 
ramo9941
Guest
Posts: n/a
 
      21st Jul 2008
İ have a property like this.

[TypeConverterAttribute(typeof(AConverter))]
public class Expandable
{
[NotifyParentProperty(true)]
public Color Color
{
get { return _a; }
set { _a = value; }
}
}

and use above code:

Expandable _exp;
public Expandable Exp
get { return _exp; }
set { _exp = value; }

If user change Color in Properties at right side of the visual studio
editor, i want invoke Exp set value but Color set invoke.
How can i do this?
 
Reply With Quote
 
 
 
 
ramo9941
Guest
Posts: n/a
 
      21st Jul 2008
ok, sorry my english.

i change Exp value by visual studio editor's properties and I watch debug.
When these changing occurs, Expandable class Color property change so i want
signals to Exp property's set method.
And
Expandable class used by other properties similiar "public Expandable Exp;",
like this "public Expandable Exp2;" so above signaling changable. how can i
know whom called Expandable class Color property?

i hope this is helpfull.

"Peter Duniho" wrote:

> On Sun, 20 Jul 2008 18:27:03 -0700, ramo9941
> <(E-Mail Removed)> wrote:
>
> > [...]
> > If user change Color in Properties at right side of the visual studio
> > editor, i want invoke Exp set value but Color set invoke.

>
> The phrase "i want invoke Exp set value but Color set invoke" has no clear
> meaning in the English language. It doesn't make any sense.
>
> Care to try rephrasing your question so that you are actually describing
> what you are trying to do?
>
> Pete
>

 
Reply With Quote
 
ramo9941
Guest
Posts: n/a
 
      23rd Jul 2008
i read your above link's web page, i knew most of them and i have used my
project. i hope INotifyPropertyChanged event but nothing because this event
requires datasource and i does not want to use it. Advice
"RefreshPropertiesAttribute" but it is not good solution.

so thanks your help, i'm going to change my code.

"Peter Duniho" wrote:

> On Mon, 21 Jul 2008 05:03:01 -0700, ramo9941
> <(E-Mail Removed)> wrote:
>
> > ok, sorry my english.
> >
> > i change Exp value by visual studio editor's properties and I watch
> > debug.
> > When these changing occurs, Expandable class Color property change so i
> > want
> > signals to Exp property's set method.

>
> You would have to hook that up explicitly yourself in code. The
> NotifyParentProperty attribute is for the VS Designer. It doesn't have
> anything to do with the actual C# property.
>
> Here's a web page that has a discussion that elaborates somewhat on the
> issue:
> http://forums.msdn.microsoft.com/en-...5-fcaa11c038e2
>
> Pete
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Events with accessors Harlan Messinger Microsoft Dot NET 7 30th Nov 2007 10:59 PM
Collections set accessors Mikeyranks Microsoft Dot NET 1 2nd Aug 2007 10:48 PM
Collections set accessors michael.grounds@googlemail.com Microsoft C# .NET 3 2nd Aug 2007 08:47 PM
Allows CLR more than 2 accessors for a property? cody Microsoft Dot NET 2 4th Jun 2005 10:20 AM
Event accessors Rafael Pivato Microsoft VB .NET 1 21st Oct 2003 12:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.