VideoOS.Platform.UI.ItemPickerWpfWindow Class Reference

The ItemPickerWpfWindow can be used as a Dialog to allow the user to select one or more Items from a provided list. It should be configured using the properties. More...

Inheritance diagram for VideoOS.Platform.UI.ItemPickerWpfWindow:
VideoOS.Platform.UI.Controls.VideoOSDialog VideoOS.Platform.UI.Controls.VideoOSWindow

Public Member Functions

void Dispose ()
 Dispose, calling Dispose(bool disposing)
 
void EnableHelpLink (string linkText, Action linkAction)
 Call this method to enable a link that will allow the user to launch a custom help function from the ItemPicker window.
 
 ItemPickerWpfWindow ()
 The Item picker window is a treeview, where Items to make use of can be selected. This constructor creates an Item picker window with a configurable setup.
 
- Public Member Functions inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
 VideoOSDialog ()
 Constructs a VideoOSDialog instance.
 
- Public Member Functions inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
 VideoOSWindow ()
 Constructs a VideoOSWindow instance.
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Clean up any components being used.
 
- Protected Member Functions inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
override AutomationPeer OnCreateAutomationPeer ()
 
- Protected Member Functions inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
override AutomationPeer OnCreateAutomationPeer ()
 

Properties

string AcceptButtonText [get, set]
 Custom text for the accept/ok button. Inappropriately long text will be truncated.
 
bool AllowGroupSelection [get, set]
 If the boolean is set to true, groups can be selected. If false and SelectionMode is MultiSelect, selecting a group will select all Items within the group.
 
bool AutoExpand [get, set]
 Controls whether nodes in the Item tree will automatically expand when populating. Note that setting this will not cause the tree to repopulate, so to ensure this setting is respected, it should be set prior to setting Items.
 
string CancelButtonText [get, set]
 Custom text for the cancel button. Inappropriately long text will be truncated.
 
string CustomErrorText [get, set]
 Gets or sets the error text displayed if the user clicks on the accept button without selecting any items.
 
string Description [get, set]
 String to be shown at the top of the selection as a description of what should be selected.
 
string EmptyListOverlayText [get, set]
 Sets an overlay text placed on top of the selected items list while the list is empty. The overlay text is automatically hidden if the list is not empty. Only relevant if SelectionMode is set to MultiSelect.
 
string Header [get, set]
 String to be shown in the window bar and as the title of the dialog.
 
Func< Item, bool > IsValidSelectionCallback [set]
 Sets a custom validator for Items to determine whether they are valid selections or not. Return true if the Item is a valid selection, otherwise false.
 
Func< Item, bool > IsVisibleCallback [set]
 Sets a custom validator for Items to determine whether they should be shown or not. Return true if the Item should be visible, otherwise false.
 
IEnumerable< ItemItems [set]
 The list of Items that populates the item picker.
 
List< Guid > KindsFilter [get, set]
 Filter which Items to display. The list will display only Items of the appropriate Kind(s).
 
string RemoveActionTooltipText [get, set]
 Sets the tooltip on the remove button in the selected items list, the button is visible if you hover the mouse over an Item in the list of selected items and the tooltip is visible if you hover the mouse over the button. The list of selected items is visible when SelectionMode is set to MultiSelect./>
 
Func< Item, ItemReplaceSelectionCallback [set]
 Add a custom handler so that the item can be replaced by another. Practical application is the possibility to convert a ViewItem Item to the corresponding camera Item, when the ViewItem contains reference to a camera.
 
bool SearchEnabled [get, set]
 Controls whether it is possible to search for items by name. The search textbox will display if true. Per default the value is false and the search is not enabled.
 
string SearchPlaceholderText [get, set]
 Sets the placeholder text in the search textbox. The search textbox with placeholder text is only visible if SearchEnabled is set to true.

 
IEnumerable< ItemSelectedItems [get, set]
 List of Items which have been selected Set this in order to highlight a previously selected Item(s), after the Items list has been populated.
 
SelectionModeOptions SelectionMode [get, set]
 Selection mode. Options are:
 
string TableHeader [get, set]
 String to be shown in the table header of the selected items list.
 
- Properties inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
ICollection< VideoOSDialogActionBaseDialogActions [get, set]
 Gets or sets the list of dialog actions for the dialog. NOTE: If making changes to the underlying collection or its content, you must call the property setter again to ensure the change takes effect.
 
ActionsSize DialogActionsSize [get, set]
 Gets or sets the sizes of the dialog actions.
 
- Properties inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
MaximizeModes MaximizeMode [get, set]
 Gets or sets a value indicating the current full screen mode. This is a helper property and setting it will temporarily modify the value of WindowState, WindowStyle and ResizeMode.
 

Additional Inherited Members

- Public Types inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
enum  ActionsSize { Large , Medium }
 Specifies dialog action sizes. More...
 
- Public Types inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
enum  MaximizeModes {
  None , MaximizeWorkArea , MaximizeMonitorArea , FullScreenWorkArea ,
  FullScreenMonitorArea
}
 Specifies the full screen modes. More...
 
- Static Public Attributes inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
static readonly DependencyProperty DialogActionsProperty
 Identifies the DialogActions dependency property.
 
static readonly DependencyProperty DialogActionsSizeProperty
 Identifies the DialogActionsSize dependency property.
 
- Static Public Attributes inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
static readonly DependencyProperty MaximizeModeProperty
 Identifies the MaximizeMode dependency property.
 
- Package Functions inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
- Static Package Attributes inherited from VideoOS.Platform.UI.Controls.VideoOSDialog
- Static Package Attributes inherited from VideoOS.Platform.UI.Controls.VideoOSWindow
- Events inherited from VideoOS.Platform.UI.Controls.VideoOSWindow

Detailed Description

The ItemPickerWpfWindow can be used as a Dialog to allow the user to select one or more Items from a provided list. It should be configured using the properties.

Constructor & Destructor Documentation

◆ ItemPickerWpfWindow()

VideoOS.Platform.UI.ItemPickerWpfWindow.ItemPickerWpfWindow ( )
inline

The Item picker window is a treeview, where Items to make use of can be selected. This constructor creates an Item picker window with a configurable setup.

Member Function Documentation

◆ Dispose() [1/2]

void VideoOS.Platform.UI.ItemPickerWpfWindow.Dispose ( )
inline

Dispose, calling Dispose(bool disposing)

◆ Dispose() [2/2]

virtual void VideoOS.Platform.UI.ItemPickerWpfWindow.Dispose ( bool disposing)
inlineprotectedvirtual

Clean up any components being used.

Parameters
disposing

◆ EnableHelpLink()

void VideoOS.Platform.UI.ItemPickerWpfWindow.EnableHelpLink ( string linkText,
Action linkAction )
inline

Call this method to enable a link that will allow the user to launch a custom help function from the ItemPicker window.

Parameters
linkTextThe text to display in the link.
linkActionThe action to perform when the link is clicked.

Property Documentation

◆ AcceptButtonText

string VideoOS.Platform.UI.ItemPickerWpfWindow.AcceptButtonText
getset

Custom text for the accept/ok button. Inappropriately long text will be truncated.

◆ AllowGroupSelection

bool VideoOS.Platform.UI.ItemPickerWpfWindow.AllowGroupSelection
getset

If the boolean is set to true, groups can be selected. If false and SelectionMode is MultiSelect, selecting a group will select all Items within the group.

◆ AutoExpand

bool VideoOS.Platform.UI.ItemPickerWpfWindow.AutoExpand
getset

Controls whether nodes in the Item tree will automatically expand when populating. Note that setting this will not cause the tree to repopulate, so to ensure this setting is respected, it should be set prior to setting Items.

◆ CancelButtonText

string VideoOS.Platform.UI.ItemPickerWpfWindow.CancelButtonText
getset

Custom text for the cancel button. Inappropriately long text will be truncated.

◆ CustomErrorText

string VideoOS.Platform.UI.ItemPickerWpfWindow.CustomErrorText
getset

Gets or sets the error text displayed if the user clicks on the accept button without selecting any items.

◆ Description

string VideoOS.Platform.UI.ItemPickerWpfWindow.Description
getset

String to be shown at the top of the selection as a description of what should be selected.

◆ EmptyListOverlayText

string VideoOS.Platform.UI.ItemPickerWpfWindow.EmptyListOverlayText
getset

Sets an overlay text placed on top of the selected items list while the list is empty. The overlay text is automatically hidden if the list is not empty. Only relevant if SelectionMode is set to MultiSelect.

◆ Header

string VideoOS.Platform.UI.ItemPickerWpfWindow.Header
getset

String to be shown in the window bar and as the title of the dialog.

◆ IsValidSelectionCallback

Func<Item, bool> VideoOS.Platform.UI.ItemPickerWpfWindow.IsValidSelectionCallback
set

Sets a custom validator for Items to determine whether they are valid selections or not. Return true if the Item is a valid selection, otherwise false.

◆ IsVisibleCallback

Func<Item, bool> VideoOS.Platform.UI.ItemPickerWpfWindow.IsVisibleCallback
set

Sets a custom validator for Items to determine whether they should be shown or not. Return true if the Item should be visible, otherwise false.

◆ Items

IEnumerable<Item> VideoOS.Platform.UI.ItemPickerWpfWindow.Items
set

The list of Items that populates the item picker.

◆ KindsFilter

List<Guid> VideoOS.Platform.UI.ItemPickerWpfWindow.KindsFilter
getset

Filter which Items to display. The list will display only Items of the appropriate Kind(s).

◆ RemoveActionTooltipText

string VideoOS.Platform.UI.ItemPickerWpfWindow.RemoveActionTooltipText
getset

Sets the tooltip on the remove button in the selected items list, the button is visible if you hover the mouse over an Item in the list of selected items and the tooltip is visible if you hover the mouse over the button. The list of selected items is visible when SelectionMode is set to MultiSelect./>

◆ ReplaceSelectionCallback

Func<Item, Item> VideoOS.Platform.UI.ItemPickerWpfWindow.ReplaceSelectionCallback
set

Add a custom handler so that the item can be replaced by another. Practical application is the possibility to convert a ViewItem Item to the corresponding camera Item, when the ViewItem contains reference to a camera.

◆ SearchEnabled

bool VideoOS.Platform.UI.ItemPickerWpfWindow.SearchEnabled
getset

Controls whether it is possible to search for items by name. The search textbox will display if true. Per default the value is false and the search is not enabled.

◆ SearchPlaceholderText

string VideoOS.Platform.UI.ItemPickerWpfWindow.SearchPlaceholderText
getset

Sets the placeholder text in the search textbox. The search textbox with placeholder text is only visible if SearchEnabled is set to true.

◆ SelectedItems

IEnumerable<Item> VideoOS.Platform.UI.ItemPickerWpfWindow.SelectedItems
getset

List of Items which have been selected Set this in order to highlight a previously selected Item(s), after the Items list has been populated.

◆ SelectionMode

SelectionModeOptions VideoOS.Platform.UI.ItemPickerWpfWindow.SelectionMode
getset

Selection mode. Options are:

  • SingleSelect - will display only the items to choose from. A single item can be selected.
  • AutoCloseOnSelect - works like SingleSelect, but automatically accepts when an item is selected.
  • MultiSelect - Any number of Items can be selected. A separate column will show selected items.

◆ TableHeader

string VideoOS.Platform.UI.ItemPickerWpfWindow.TableHeader
getset

String to be shown in the table header of the selected items list.