Jump to: navigation, search

Property Wizard (Client)


UBIK® objects can be configured to be property wizard-enabled. This means:

  • when a user creates such an object on the client, a series of editor dialogs are shown for all of its important properties (namely properties with priorities not lower than the PriorityThreshold;
  • the user should enter values for these properties one after the other;
  • once done, the object will be immediately saved (and committed if in online mode) automatically.
IC Attention.pngIf the user presses Cancel in any of the dialogs during the creation process, the creation will be canceled and the object will be discarded.

Using a customized Editor Template it is possible to attach documents during content creation using the property wizard . For that specific UBIKEdit template has to be extended by the following:

<AppBarButton
        Icon="Camera"
        IsEnabled="{Binding EditDialogViewModel.CallingViewModel.IsPictureChildCreationAllowed}"
        Style="{ThemeResource UBIKGlobalChildAppBarAppBarButton}"
        Visibility="{Binding EditDialogViewModel.CallingViewModel.IsPropertyWizardActive, Converter={StaticResource BoolToVisConverter}, FallbackValue=Collapsed}">
        <Interactivity:Interaction.Behaviors>
                <Core:EventTriggerBehavior EventName="Tapped">
                        <Core:InvokeCommandAction Command="{Binding EditDialogViewModel.CallingViewModel.CaptureMediaCommand}" />
                </Core:EventTriggerBehavior>
        </Interactivity:Interaction.Behaviors>
</AppBarButton>
<ScrollViewer
        MaxWidth="500"
       HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        HorizontalScrollBarVisibility="Auto"
        VerticalScrollBarVisibility="Auto"
        Visibility="{Binding EditDialogViewModel.CallingViewModel.IsPropertyWizardActive, Converter={StaticResource BoolToVisConverter}, FallbackValue=Collapsed}">
        <ListView
                HorizontalContentAlignment="Stretch"
                ItemTemplate="{Binding EditDialogViewModel.CallingViewModel.TemplateService[UBIKDocumentItemSmall]}"
                ItemsSource="{Binding EditDialogViewModel.CallingViewModel.Documents.Items}">
                <ListView.ItemsPanel>
                        <ItemsPanelTemplate>
                                <ItemsStackPanel Orientation="Horizontal" />
                        </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                                <Setter Property="VerticalAlignment" Value="Center" />
                                <Setter Property="VerticalContentAlignment" Value="Center" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Margin" Value="10,8,0,0" />
                        </Style>
                </ListView.ItemContainerStyle>
        </ListView>
</ScrollViewer>