Results 1 to 4 of 4

Thread: [RESOLVED] Application Settings Bind to Variable

Threaded View

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Resolved [RESOLVED] Application Settings Bind to Variable

    hi guys! help please...how can i bind the application settings to a variable..currently i have the code below which bind the value to a property of the control in that case the .Text Property of the TxtSettingsStartLocation Textbox.

    Code:
    private Application_Settings AppSettings = new Application_Settings();
    
    Binding Binding_Start_Location = new Binding("Text", AppSettings, "Start_Location", true, DataSourceUpdateMode.OnPropertyChanged);
                    txtSettingsStartLocation.DataBindings.Add(Binding_Start_Location);
    
    
    sealed class Application_Settings : ApplicationSettingsBase
    {
            [UserScopedSetting()]
            public string Start_Location
            {
                get { return (string)this["Start_Location"]; }
                set { this["Start_Location"] = value; }
            }
     }
    Thanks in advance!
    Last edited by daimous; Dec 6th, 2006 at 03:03 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width