Interface IItemPicker
Provides methods for showing an item picker dialog
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public interface IItemPicker
Remarks
If you need an item picker as a control use the ItemPicker custom control.
Examples
The following example shows the item picker as dialog and shows the properties 'Header' and 'Description' of the items picked:
The following example shows the item picker and uses the Closed event to get the result:
The items picked in the above examples look like this:
The following example shows an dialog and binds the Order and IsSelected members directly. When using binding the dialog only shows an OK button as the selection is directly bound to the IsSelectedMemberPath of the picked objects.
Methods
View SourceShow(ItemPickerDialogArgs)
Shows the dialog.
Declaration
void Show(ItemPickerDialogArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemPickerDialogArgs | args | The arguments to configure the dialog. |
Remarks
Use the Closed event to get the result.
ShowDialog(ItemPickerDialogArgs)
Shows the dialog modally.
Declaration
MessageBoxResult ShowDialog(ItemPickerDialogArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemPickerDialogArgs | args | The arguments. |
Returns
| Type | Description |
|---|---|
| MessageBoxResult | OK if the user acknowledged his selection, Cancel otherwise. |
Remarks
args will contain the current selection of the user.
Events
View SourceClosed
Occurs when the item picker dialog is closed.
Declaration
event EventHandler<ItemPickerClosedEventArgs> Closed
Event Type
| Type | Description |
|---|---|
| EventHandler<ItemPickerClosedEventArgs> |