Rock Mobile Docs

Picker

Inherits from Xamarin.Forms.Picker

The picker will allow the user to select from a list of available items. If the field is not marked as required then the user can also leave it empty. When the field is tapped then a popup will appear allowing the user to select which item to choose.

Properties

PropertyTypeDescription
LabelstringThe label title to be used when wrapped in a control that displays a label for the field.
IsRequiredboolIf True then any validation performed will require that a value be selected.
ItemsListThe items to be made available for user selection. (readonly)
SelectedItemPickerItemThe item that has been selected by the user. (readonly)
SelectedValuestringThe item value that has been selected by the user.
SelectedValueAsIntint?The currently selected value cast to an integer, or null if there is no valid selection. (readonly)
SelectedValueAsGuidGuid?The currently selected value cast to a Guid, or null if there is no valid selection. (readonly)

Example

<Rock:FieldContainer>
    <Rock:Picker Label="Rock Picker"
                 IsRequired="false"
                 SelectedValue="2">
        <Rock:PickerItem Value="1" Text="One" />
        <Rock:PickerItem Value="2" Text="Two" />
        <Rock:PickerItem Value="3" Text="Three" />
        <Rock:PickerItem Value="4" Text="Four" />
        <Rock:PickerItem Value="5" Text="Five" />
    </Rock:Picker>
</Rock:FieldContainer>