A question on Properties.Settings.Default

D

Dom

I notice from the IntelliSense window that Properties.Settings.Default
have events, such as PropertyChanged. This could be useful, but how
do I capture this event? I'm used to inserting a control onto a form,
then using the property box to set the name for an eventhandler. I
can't seem to do this for Properties.

Dom
 
P

Peter Duniho

I notice from the IntelliSense window that Properties.Settings.Default
have events, such as PropertyChanged. This could be useful, but how
do I capture this event? I'm used to inserting a control onto a form,
then using the property box to set the name for an eventhandler. I
can't seem to do this for Properties.

You can always subscribe to an event directly in code:

Settings.Default.MyPropertyChanged += MyPropertyChangedHandler;

Where:

void MyPropertyChangedHandler(object sender, EventArgs e)
{
// ...
}

Pete
 
D

Dom

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top