Introduction
If an Active List is defined on a Content Object that is associated with an integer MetaProperty, the property is displayed like a usual SelectiveList which is based on a MetaProperty. An ActiveList (i.e., if it has been configured on the server for a content object) always takes precedence over a MetaProperty SelectiveList. For editing, it behaves exactly the same as with a standard SelectiveList.
Limitations
- Mass editing is currently not supported for Properties containing Active Lists.
- Copy and Paste for Active Lists is not supported. When copying an object containing Active Lists, the copy of the object will not contain these Active Lists. In this case, the editing UI of the pasted object will appear like that of a standard Integer Property. If a value has already been selected, this value will be copied, though.
XAML
A new SelectiveItems property was added to the PropertyViewModel to enable access to an ActiveList via XAML. No DataTriggers or additional checks are required, as the correct list selection is handled automatically.
Mobile (MAUI)
xmlns:controls="clr-namespace:UBIK.MAUI.Controls"
<controls:SfListViewExt
x:Name="SelectiveList"
BindingContext="{TemplateBinding BindingContext}"
ItemSize="40"
ItemTemplate="{StaticResource PopupSelectiveListItemTemplate}"
ItemsSource="{Binding SelectiveItems}"
SelectedItem="{Binding ValueItem.PropertyValue, Mode=OneWay, Converter={StaticResource PropertyValueToSelectiveItem}, ConverterParameter={Binding Source={x:Reference SelectiveList}, Path=ItemsSource}}"
SelectionBackground="{DynamicResource UBIKAccentColor}"
SelectionMode="Single"
Style="{DynamicResource UBIKListView}" />
<controls:SfListViewExt
x:Name="SelectiveList"
BindingContext="{TemplateBinding BindingContext}"
ItemSize="40"
ItemTemplate="{StaticResource PopupSelectiveListItemTemplate}"
ItemsSource="{Binding SelectiveItems}"
SelectedItem="{Binding ValueItem.PropertyValue, Mode=OneWay, Converter={StaticResource PropertyValueToSelectiveItem}, ConverterParameter={Binding Source={x:Reference SelectiveList}, Path=ItemsSource}}"
SelectionBackground="{DynamicResource UBIKAccentColor}"
SelectionMode="Single"
Style="{DynamicResource UBIKListView}" />
UWP
xmlns:controls="using:UBIK.WinX.Controls"
<controls:ComboBoxExt
x:Name="ComboBox"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
DisplayMemberPath="DisplayText"
ItemsSource="{Binding PropertyViewModel.SelectiveItems}"
PlaceholderText="{Binding PropertyEdit_PickerPlaceholder, Source={StaticResource AppResources}}"
SelectedValue="{Binding PropertyValue, Mode=TwoWay}"
SelectedValuePath="Value"
Visibility="{Binding PropertyViewModel.ShowComboBox, Converter={StaticResource BoolToVisConverter}}" />
<controls:ComboBoxExt
x:Name="ComboBox"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
DisplayMemberPath="DisplayText"
ItemsSource="{Binding PropertyViewModel.SelectiveItems}"
PlaceholderText="{Binding PropertyEdit_PickerPlaceholder, Source={StaticResource AppResources}}"
SelectedValue="{Binding PropertyValue, Mode=TwoWay}"
SelectedValuePath="Value"
Visibility="{Binding PropertyViewModel.ShowComboBox, Converter={StaticResource BoolToVisConverter}}" />