mac-samples/PopupBindings
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 Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
Info.plist Updated min deployment version (#113) 2018-11-15 03:52:17 -05:00
LICENSE.txt [PopupBindings] Add license 2016-02-22 01:34:22 -03:00
Main.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
MainMenu.xib [samples] fix layout 2010-12-30 11:33:46 -05:00
MainMenu.xib.designer.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
Metadata.xml Shorten brief descriptions 2015-04-23 14:06:18 -04:00
Person.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
PopupBindings.csproj Set HttpClientHandler to NSUrlSessionHandler for all samples 2018-05-02 13:22:24 -06:00
PopupBindings.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
TestWindow.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
TestWindow.xib [samples] fix layout 2010-12-30 11:33:46 -05:00
TestWindow.xib.designer.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00
TestWindowController.cs Macsamples migrated to unified with tool 2014-11-21 20:09:57 -05:00

README.md

name description page_type languages products urlFragment
Xamarin.Mac - PopupBindings PopupBindings is a Xamarin.Mac sample application that demonstrates how to use the bindings to manage the contents and selection of the... sample
csharp
xamarin
popupbindings

PopupBindings

"PopupBindings" is a Xamarin.Mac sample application that demonstrates how to use the bindings to manage the contents and selection of the NSPopupButton class. It uses the NSArrayController class to hold the data and track the selection.

This is done using the following NSPopupButton bindings:

The content binding describes the collection of objects. The collection is the objects in the array controller.

Bind to: PopupList
Controller Key: arrangedObjects
Model Key Path: (leave blank)

The contentValues binding describes what will be displayed in the pop-up menu. In this example it will be "name" portion of the Person object. Use the following choices for the contentValues binding:

Bind to: PopupList
Controller Key: arrangedObjects
Model Key Path: name

The selectedIndex binding describes the indexed selection the user chose from the menu. Use the following choices for the selectedIndex binding:

Bind to: PopupList
Controller Key: selectionIndex
Model Key Path: (leave blank)

All four Form Cells describing the person's address is bound to the array controller's selection using a specific NSDictionary key. So for the "street" Form Cell (Street), its value binding should look like:

Bind to: PopupList
Controller Key: selection
Model Key Path: addressStreet

Xamarin port changes are released under the MIT license

PopupBindings application screenshot

Author

Ported to Xamarin.Mac by Kenneth J. Pouncey.