PC Review


Reply
Thread Tools Rate Thread

ApplicationSettingsBase, Databinding, and INotifyPropertyChanged not working. (example proj given)

 
 
Kevin
Guest
Posts: n/a
 
      1st Feb 2007
Hi All

I have two problems related to persistent settings in my application.
They are kind of similar so I have included them in the same post.

I have put a mini project here:
http://www.kevinandkiran.com/BindingTest.zip
so that you can see what I am talking about. I think the cause is a
basic lack of understanding of databinding on my behalf, but lets see.

Problem 1 - Making a ToolStripButton bindable doesn't work.

MS didn't make the ToolStripButton bindable and I need to store
whether or not a button is checked when the program exits. I have
followed the example here:
http://blogs.msdn.com/jfoscoding/arc...23/507164.aspx
I add my new BindableToolStripButton to my form, added a property to
my ApplicationSettingsBase class (UserSettings) and then bind the two
together with:

ToolStripButton1.DataBindings.Add(New Binding("Checked", us,
"tsb_Checked"))

I also added a console output when the value of tsb_checked changes.
Basically I would expect that when I click the toolStripButton it will
print a line to the console, but it doesnt.
I also added "implements System.ComponentModel.INotifyPropertyChanged"
and raise the event when the CheckChanged event is fire. Still no
luck.
So I am now confused. what am I doing wrong?


Problem 2 - binding to a property in the current control

This is very similar to the first problem, except the property is in
the control as opposed to a child control.
When you click the button it should change the property "More_Text" to
the current time.
However, what happens is, click it once and it prints out the default
value, but any further clicks dont do anything.

The help files have a reasonable coverage on the whole application
settings and all that but I can't find anything about my problem, so I
hope somebody can please help me!

Thanks in advance
Kevin

 
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
ComboBox DataBinding 1/2 working Steve K. Microsoft Dot NET Framework Forms 1 17th Mar 2008 11:17 AM
ApplicationSettingsBase Wrapper Not Working WayneB Microsoft Dot NET Framework 0 5th Aug 2007 12:32 PM
DataBinding not working Uncle Sammy Microsoft C# .NET 5 6th May 2006 12:36 AM
Databinding not working Aaron Microsoft Dot NET Compact Framework 10 17th Jan 2005 08:28 PM
Exporting Proj data to an Access mdb not working with masters =?Utf-8?B?U21taWxlcw==?= Microsoft Outlook Discussion 1 5th Jan 2004 09:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:43 PM.