System.Windows.Forms.ControlBindingsCollection.Add(System.Windows.Forms.Binding)

Here are the examples of the csharp api class System.Windows.Forms.ControlBindingsCollection.Add(System.Windows.Forms.Binding) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

83 Examples 7

1. Example

Project: openHistorian
Source File: FrmMain.Designer.cs
private void InitializeComponent()
        {
            this.BtnStart = new System.Windows.Forms.Bu/n ..... /n //View Source file for more details /n }

2. Example

Project: Nexus-Mod-Manager
Source File: BindingHelper.cs
public static Binding CreateManualBinding<T, K>(Control p_ctlControl, Expression<Func<T>> p_expControlProperty, object p_objDataSource, Expression<Func<K>> p_expBoundProperty)
		{
			Binding bdgBinding = new Binding(ObjectHelper.GetPropertyName<T>(p_expControlProperty), p_objDataSource, ObjectHelper.GetPropertyName<K>(p_expBoundProperty), false, DataSourceUpdateMode.Never);
			p_ctlControl.DataBindings.Add(bdgBinding);
			bdgBinding.ControlUpdateMode = ControlUpdateMode.Never;
			return bdgBinding;
		}

3. Example

Project: Nexus-Mod-Manager
Source File: BindingHelper.cs
public static Binding CreateManualBinding<T, K>(Control p_ctlControl, Expression<Func<T>> p_expControlProperty, ConvertEventHandler p_cehFormatHandler, object p_objDataSource, Expression<Func<K>> p_expBoundProperty, ConvertEventHandler p_cehParseHandler)
		{
			Binding bdgBinding = new Binding(ObjectHelper.GetPropertyName<T>(p_expControlProperty), p_objDataSource, ObjectHelper.GetPropertyName<K>(p_expBoundProperty), false, DataSourceUpdateMode.Never);
			bdgBinding.Format += p_cehFormatHandler;
			bdgBinding.Parse += p_cehParseHandler;
			p_ctlControl.DataBindings.Add(bdgBinding);
			bdgBinding.ControlUpdateMode = ControlUpdateMode.Never;
			return bdgBinding;
		}

4. Example

Project: Nexus-Mod-Manager
Source File: BindingHelper.cs
public static Binding CreateManualBinding<T, K>(Control p_ctlControl, Expression<Func<T, object>> p_expControlProperty, object p_objDataSource, Expression<Func<K, object>> p_expBoundProperty)
		{
			Binding bdgBinding = new Binding(ObjectHelper.GetPropertyName<T>(p_expControlProperty), p_objDataSource, ObjectHelper.GetPropertyName<K>(p_expBoundProperty), false, DataSourceUpdateMode.Never);
			p_ctlControl.DataBindings.Add(bdgBinding);
			bdgBinding.ControlUpdateMode = ControlUpdateMode.Never;
			return bdgBinding;
		}

5. Example

Project: Nexus-Mod-Manager
Source File: BindingHelper.cs
public static Binding CreateFullBinding<T, K>(Control p_ctlControl, Expression<Func<T>> p_expControlProperty, object p_objDataSource, Expression<Func<K>> p_expBoundProperty)
		{
			Binding bdgBinding = new Binding(ObjectHelper.GetPropertyName<T>(p_expControlProperty), p_objDataSource, ObjectHelper.GetPropertyName<K>(p_expBoundProperty), true, DataSourceUpdateMode.OnValidation);
			p_ctlControl.DataBindings.Add(bdgBinding);
			return bdgBinding;
		}

6. Example

Project: Nexus-Mod-Manager
Source File: BindingHelper.cs
public static Binding CreateFullBinding<T, K>(Control p_ctlControl, Expression<Func<T, object>> p_expControlProperty, object p_objDataSource, Expression<Func<K, object>> p_expBoundProperty)
		{
			Binding bdgBinding = new Binding(ObjectHelper.GetPropertyName<T>(p_expControlProperty), p_objDataSource, ObjectHelper.GetPropertyName<K>(p_expBoundProperty), false, DataSourceUpdateMode.OnValidation);
			p_ctlControl.DataBindings.Add(bdgBinding);
			return bdgBinding;
		}

7. Example

Project: justdecompile-plugins
Source File: ConfigureForm.Designer.cs
private void InitializeComponent()
		{
            this.LabInputBase = new System.Windows.Forms.Labe/n ..... /n //View Source file for more details /n }

8. Example

Project: justdecompile-plugins
Source File: ConfigureForm.Designer.cs
private void InitializeComponent()
		{
            this.LabInputBase = new System.Windows.Forms.Labe/n ..... /n //View Source file for more details /n }

9. Example

Project: screencast-capture
Source File: Bindings.cs
public static Binding Bind(this IBindableComponent component, Binding binding)
        {
            if (component == null) throw new ArgumentNullException("component");
            component.DataBindings.Add(binding);
            return binding;
        }

10. Example

Project: HOPE
Source File: Binding.cs
public void EndInit()
		{
			Control.DataBindings.Add(new System.Windows.Forms.Binding(ControlPropertyName, Source, PropertyName));
		}

11. Example

Project: beakn
Source File: Settings.Designer.cs
private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceMana/n ..... /n //View Source file for more details /n }

12. Example

Project: magicaltrevor
Source File: Binder.cs
protected IDisposable CreateBinding(Control c, string controlProperty, object source, string sourceProperty)
        {
            var binding = new Binding(controlProperty, source, sourceProperty);
            c.DataBindings.Add(binding);
            return Disposable.Create(() => c.DataBindings.Remove(binding));
        }

13. Example

Project: justdecompile-plugins
Source File: SyncWarningForm.Designer.cs
private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager re/n ..... /n //View Source file for more details /n }

14. Example

Project: justdecompile-plugins
Source File: SyncWarningForm.Designer.cs
private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager re/n ..... /n //View Source file for more details /n }

15. Example

Project: AVPI
Source File: frmSettings.Designer.cs
private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceMana/n ..... /n //View Source file for more details /n }

16. Example

Project: StackBuilder
Source File: OptionPanelDebugging.Designer.cs
private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceMana/n ..... /n //View Source file for more details /n }

17. Example

Project: screencast-capture
Source File: Bindings.cs
public static Binding Bind<TSource, TDestination>(this IBindableComponent component,
            Binding binding, Func<TSource, TDestination> format)
        {
            if (component == null) throw new ArgumentNullException("component");
            if (binding == null) throw new ArgumentNullException("binding");
            binding.Format += (sender, e) => e.Value = format((TSource)e.Value);
            binding.FormattingEnabled = true;
            component.DataBindings.Add(binding);
            return binding;
        }

18. Example

Project: TaskScheduler
Source File: Main.Designer.cs
private void InitializeComponent()
		{
			GrpCtrl::GroupControls.RadioButtonListItem radioButtonList/n ..... /n //View Source file for more details /n }

19. Example

Project: playground
Source File: frmAccount.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

20. Example

Project: MvvmFx
Source File: StripWindow.cs
private void BindButtons()
        {
            var collection = ButtonModelCollection.GetButtonModelCollection();

            foreach (var item in collection)
            {
                var button = (Button) GetMainControlByName(item.Name);
                if (button.Name == item.Name)
                {
                    Binding binding = new Binding("Text", item, "Text");
                    button.DataBindings.Add(binding);
                    button.DataBindings.Add("Enabled", item, "Enabled");
                    button.DataBindings.Add("Visible", item, "Visible");
                }
            }
        }

21. Example

Project: MvvmFx
Source File: WindowManager-pre_context.cs
protected virtual Window CreateWindow(object rootModel, bool isDialog, object context,
            IDictionary<string, object> settings, Window rootForm = null)
        {
            Window view;
            if (rootForm != null)
                view = rootForm;
            else
                view = EnsureWindow(rootModel, ViewLocator.LocateForModel(rootModel, null, null), isDialog);

            ViewModelBinder.Bind(rootModel, view, null);

            var haveDisplayName = rootModel as IHaveDisplayName;
            if (haveDisplayName != null && !ConventionManager.HasBinding(view, "Text"))
            {
                view.DataBindings.Add(new Binding("Text", rootModel, "DisplayName", true,
                    DataSourceUpdateMode.OnPropertyChanged));
            }

            ApplySettings(view, settings);

            new WindowConductor(rootModel, view);

            return view;
        }

22. Example

Project: MvvmFx
Source File: WindowManager.cs
protected virtual Window CreateWindow(object rootModel, bool isDialog, object context,
            IDictionary<string, object> settings, Window rootForm = null)
        {
            Window view;
            if (rootForm != null)
                view = rootForm;
            else
                view = EnsureWindow(rootModel, ViewLocator.LocateForModel(rootModel, null, null), isDialog);

            ViewModelBinder.Bind(rootModel, view, null);

            var haveDisplayName = rootModel as IHaveDisplayName;
            if (haveDisplayName != null && !ConventionManager.HasBinding(view, "Text"))
            {
                view.DataBindings.Add(new Binding("Text", rootModel, "DisplayName", true,
                    DataSourceUpdateMode.OnPropertyChanged));
            }

            ApplySettings(view, settings);

            new WindowConductor(rootModel, view);

            return view;
        }

23. Example

Project: SharpMap
Source File: LayerTest.cs
[Test(Description = "SRID property must be bindable")]
        public void SRID_Winform_ShouldBeBindable()
        {
            var layer = new DummyLayer();
            layer.SRID = 0;

            var binding = new Binding("IntProperty", layer, "SRID");
            
            var targetComponent = new BindableComponent();
            targetComponent.DataBindings.Add(binding);

            layer.SRID = 4326;

            Assert.That(targetComponent.IntProperty, Is.EqualTo(4326),
                "Binding on Layer.SRID did not work");
        }

24. Example

Project: open3mod
Source File: NormalVectorGeneratorDialog.Designer.cs
private void InitializeComponent()
        {
            this.buttonOk = new System.Windows.Forms.Bu/n ..... /n //View Source file for more details /n }

25. Example

Project: screencast-capture
Source File: Bindings.cs
public static Binding Bind<TSource, TDestination>(this IBindableComponent component,
            Binding binding, Func<TSource, TDestination> format, Func<TDestination, TSource> parse)
        {
            if (component == null) throw new ArgumentNullException("component");
            if (binding == null) throw new ArgumentNullException("component");
            binding.Parse += (sender, e) => e.Value = parse((TDestination)e.Value);
            binding.Format += (sender, e) => e.Value = format((TSource)e.Value);
            binding.FormattingEnabled = true;
            component.DataBindings.Add(binding);
            return binding;
        }

26. Example

Project: FunctionHacker
Source File: userSettings.designer.cs
private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Conta/n ..... /n //View Source file for more details /n }

27. Example

Project: PicasaUploader
Source File: NewAlbumDialog.Designer.cs
private void InitializeComponent ()
		{
            this.components = new System.ComponentModel.Cont/n ..... /n //View Source file for more details /n }

28. Example

Project: BindingListView
Source File: Form1.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

29. Example

Project: open3mod
Source File: TabUISkeleton.Designer.cs
private void InitializeComponent()
        {
            this.splitContainer = new System.Windows.Fo/n ..... /n //View Source file for more details /n }

30. Example

Project: NoteHighlight2016
Source File: MainForm.Designer.cs
private void InitializeComponent()
        {
            NoteHighlightForm.Properties.Settings setti/n ..... /n //View Source file for more details /n }

31. Example

Project: NClass
Source File: CompileForm.Designer.cs
private void InitializeComponent()
    {
      this.grpRunFor = new System.Windows.Forms.GroupBox();/n ..... /n //View Source file for more details /n }

32. Example

Project: NClass
Source File: RunVisitorsForm.Designer.cs
private void InitializeComponent()
    {
      this.lstVisitors = new System.Windows.Forms.CheckedLi/n ..... /n //View Source file for more details /n }

33. Example

Project: open3mod
Source File: ExportDialog.Designer.cs
private void InitializeComponent()
        {
            this.buttonSelectFolder = new System.Window/n ..... /n //View Source file for more details /n }

34. Example

Project: open3mod
Source File: NodeItemsDialog.Designer.cs
private void InitializeComponent()
        {
            this.groupBox1 = new System.Windows.Forms.G/n ..... /n //View Source file for more details /n }

35. Example

Project: InnovatorAdmin
Source File: ParameterGrid.cs
private void AddControl(BindingSource source, PropertyDescriptor prop, Type type, int row)
    {
      var paramControl = prop.Attributes.OfType<ParamControlAttribute>().FirstOrDefault();

      type = type ?? prop.PropertyType;
      Control ctrl;
      if (paramControl != null && typeof(Control).IsAssignableFrom(paramControl.ControlType))
      {
        ctrl = (Control)Activator.CreateInstance(paramControl.ControlType);
        var optCtrl = ctrl as IOptionsControl;
        if (optCtrl != null)
          optCtrl.SetOptions(paramControl.Options);
        ctrl.DataBindings.Add("Text", source, prop.Name);
      }
      else if (type == typeof(bool))
      {
        ctrl = new CheckBox();
        ctrl.DataBindings.Add("Checked", source, prop.Name);
      }
      else if (type == typeof(DateTime))
      {
        var picker = new DateTimePicker();
        picker.ShowCheckBox = true;
        ctrl = picker;
        var binding = new Binding("Value", source, prop.Name, true);
        binding.Format += dateTimeBinding_Format;
        binding.Parse += dateTimeBinding_Parse;
        ctrl.DataBindings.Add(binding);
      }
      else
      {
        var txt = new TextBox();
        txt.Multiline = true;
        txt.Height = 45;
        txt.ScrollBars = ScrollBars.Vertical;
        ctrl = txt;
        ctrl.DataBindings.Add("Text", source, prop.Name);
      }
      ctrl.Anchor = AnchorStyles.Left | AnchorStyles.Right;
      tblMain.Controls.Add(ctrl, 2, row);
    }

36. Example

Project: openHistorian
Source File: FrmMain.Designer.cs
private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Labe/n ..... /n //View Source file for more details /n }

37. Example

Project: WYZTracker
Source File: SongProperties.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

38. Example

Project: NClass
Source File: OptionsPanel.Designer.cs
private void InitializeComponent()
    {
      System.ComponentModel.ComponentResourceManager resour/n ..... /n //View Source file for more details /n }

39. Example

Project: SmartStoreNET
Source File: MainForm.Designer.cs
private void InitializeComponent()
		{
            this.label1 = new System.Windows.Forms.Label();
 /n ..... /n //View Source file for more details /n }

40. Example

Project: VSProjectConverter
Source File: fmMain.Designer.cs
[System.Diagnostics.DebuggerStepThrough()]
		private void InitializeComponent()
		{
            Syst/n ..... /n //View Source file for more details /n }

41. Example

Project: JiraSVN
Source File: IssuesList.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

42. Example

Project: TaskScheduler
Source File: ScriptTestDlg.Designer.cs
private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources =/n ..... /n //View Source file for more details /n }

43. Example

Project: MinidumpExplorer
Source File: ModuleDetailsDialog.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

44. Example

Project: BrawlBuilder
Source File: FlexibleMessageBox.cs
private void InitializeComponent()
            {
                this.components = new System.Compon/n ..... /n //View Source file for more details /n }

45. Example

Project: Demo-EF7
Source File: WarrantyForm.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

46. Example

Project: Demo-EF7
Source File: WarrantyForm.Designer.cs
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

47. Example

Project: BraveHaxvius
Source File: MainWindow.Designer.cs
private void InitializeComponent()
        {
            this.tabControl1 = new System.Windows.Forms/n ..... /n //View Source file for more details /n }

48. Example

Project: TaskScheduler
Source File: TaskWatcherForm.designer.cs
private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
	/n ..... /n //View Source file for more details /n }

49. Example

Project: simpleDLNA
Source File: FormSettings.Designer.cs
private void InitializeComponent()
    {
      this.components = new System.ComponentModel.Container/n ..... /n //View Source file for more details /n }

50. Example

Project: Outliner-3.0
Source File: MainControl.Designer.cs
private void InitializeComponent()
      {
         this.components = new System.ComponentModel.Cont/n ..... /n //View Source file for more details /n }