mac-samples/NSTableViewBinding
Craig a6577adcdf sample metadata schema fix (remove tech) 2019-07-19 18:59:42 -07:00
..
Screenshots Added some screenshots 2012-12-11 17:39:08 -05:00
AppDelegate.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
EditController.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
Info.plist Updated min deployment version (#113) 2018-11-15 03:52:17 -05:00
LICENSE.txt [NSTableViewBinding] Update license 2016-02-22 01:51:22 -03:00
Main.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
MainMenu.xib [samples] fix layout 2010-12-30 11:32:23 -05:00
MainMenu.xib.designer.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
Metadata.xml Add brief description tag to metadata.xml 2015-04-16 15:35:20 -04:00
NSTableViewBinding.csproj Set HttpClientHandler to NSUrlSessionHandler for all samples 2018-05-02 13:22:24 -06:00
NSTableViewBinding.sln Manually upgrade the solutions 2012-01-26 23:54:36 -05:00
README.md sample metadata schema fix (remove tech) 2019-07-19 18:59:42 -07:00
TableEdit.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
TableEdit.xib [samples] fix layout 2010-12-30 11:32:23 -05:00
TableEdit.xib.designer.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
TestWindow.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
TestWindow.xib [samples] fix layout 2010-12-30 11:32:23 -05:00
TestWindow.xib.designer.cs NSImageName and NSTableViewBinding migrated to unified 2014-11-21 18:48:41 -05:00
TestWindowController.cs [NSTableViewBinding] Add USE_BINDINGS_BY_CODE to release configuration + expected type changes 2014-12-16 23:30:46 +03:00

README.md

name description page_type languages products urlFragment
Xamarin.Mac - NSTableViewBinding NSTableViewBinding is an application that demonstrates how to use Cocoa Bindings with a NSTableView. It demonstrates how to setup bindings in both... sample
csharp
xamarin
nstableviewbinding

NSTableViewBinding

NSTableViewBinding is an application that demonstrates how to use Cocoa Bindings with a NSTableView.

It demonstrates how to setup bindings in both Interface Builder or programatically.

The compile directive flag "USE BINDINGS BY CODE" defined in the projects's Options will instruct the compiler to build code that establishes the very same bindings created in Interface Builder.

Of course, to set this flag will mean that these bindings setup in Interface Builder will not be necessary and become redundant.

  • NSArrayController drives the content for each table column.
  • NSArrayController drives the table's current selection.
  • Provides table row double-click inspection.
  • Proper enabling/disabling of buttons based on the table's current selection.
  • NSArrayController drives the content of several NSTextFields based on the controller's selection.
  • Provides notification of table selection changes through the use of observeValueForKeyPath.

Steps for setting the Compiler Directive "USE BINDINGS BY CODE"

Running example with code binding:

  1. From the MonoDevelop Menu select Project -> NSTableViewBinding Options.
  2. The project options panel will be be opened.
  3. Under the category Build -> Compiler look for the field labeled Define Symbols half way down the panel page.
  4. Add the symbol "USE BINDINGS BY CODE"

Steps for un-setting the Compiler Directive "USE BINDINGS BY CODE"

Running example without code binding where the bindings are established in Interface Builder:

  1. From the MonoDevelop Menu select Project -> NSTableViewBinding Options.
  2. The project options panel will be be opened.
  3. Under the category Build -> Compiler look for the field labeled Define Symbols half way down the panel page.
  4. Make sure the symbol "USE BINDINGS BY CODE" is not in this field.

Instructions

  • Use the Add and Remove buttons (small square buttons marked with "+" and "-") to add and remove people from the table.
  • You can edit each person's info by changing the first, last, and phone text fields.
  • By double-clicking a row in the table can also alternately edit a given person through the use of a sheet window.

Xamarin port changes are released under the MIT license

NSTableViewBinding application screenshot

Author

Ported to Xamarin.Mac by Kenneth J. Pouncey.