Difference between revisions of "Property Wizard (Client)"
Line 4: | Line 4: | ||
* once done, the object will be immediately saved (and committed if in online mode) automatically. | * once done, the object will be immediately saved (and committed if in online mode) automatically. | ||
{{Attention|If the user presses {{key press|Cancel}} in any of the dialogs during the creation process, the creation will be canceled and the object will be discarded.}} | {{Attention|If the user presses {{key press|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 {{Version/WinXSince|3.6}}. For that specific UBIKEdit template has to be extended by the following: | ||
+ | |||
+ | <syntaxhighlight lang="xml"> | ||
+ | <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> | ||
+ | </syntaxhighlight> | ||
[[Category:WinX|Property Wizard (Client)]] | [[Category:WinX|Property Wizard (Client)]] |
Latest revision as of 10:22, 25 September 2019
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.
If 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>
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>