Difference between revisions of "XAML Changes in UBIK WinX 3.5"
(Created page with "Due to the changes we made in the {{UBIK}} WinX client, certain modifications in the customizable XAML templates are required. Please refer to each individual change to see wh...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== Filtering by expressions == | == Filtering by expressions == | ||
− | Customizers can define expressions in XAML to get different filtered | + | Customizers can define expressions in XAML to get different filtered lists of content (objects, properties, etc.). This was done previously using the CollectionToViewConverter. It is now replaced by the ListCollectionView. '''Existing XAMLs are still compatible.''' |
=== Before 3.5 === | === Before 3.5 === | ||
Line 12: | Line 12: | ||
<Grid> | <Grid> | ||
<Grid.Resources> | <Grid.Resources> | ||
− | <x:String x:Key="MetaClassExpression">Item.Content.MetaUID.ToString().ToLower()==" | + | <x:String x:Key="MetaClassExpression">Item.Content.MetaUID.ToString().ToLower()=="D09E0F2E-1D2C-49C5-8285-585E2C83280C"</x:String> |
<converters:CollectionToViewConverter x:Key="FilterByMetaClass" Source="{Binding Children.Items}" /> | <converters:CollectionToViewConverter x:Key="FilterByMetaClass" Source="{Binding Children.Items}" /> | ||
</Grid.Resources> | </Grid.Resources> | ||
− | < | + | <SelectionBoundListView ... |
ItemsSource="{Binding Source={StaticResource MetaClassExpression}, Converter={StaticResource FilterByMetaClass}}"/> | ItemsSource="{Binding Source={StaticResource MetaClassExpression}, Converter={StaticResource FilterByMetaClass}}"/> | ||
</Grid> | </Grid> | ||
Line 25: | Line 25: | ||
<DataTemplate ... | <DataTemplate ... | ||
xmlns:cv="using:UBIK.WinX.UI.CollectionView"> | xmlns:cv="using:UBIK.WinX.UI.CollectionView"> | ||
− | + | <Grid> | |
− | + | <Grid.Resources> | |
− | + | <x:String x:Key="MetaClassExpression">Item.Content.MetaUID.ToString().ToLower()=="D09E0F2E-1D2C-49C5-8285-585E2C83280C"</x:String> | |
− | + | <cv:ListCollectionView x:Key="FilterByMetaClass" Expression="{StaticResource MetaClassExpression}" ItemsSource="{Binding Children.Items}" /> | |
− | + | </Grid.Resources> | |
− | + | <SelectionBoundListView ... | |
− | + | ItemsSource="{StaticResource FilterByMetaClass}"/> | |
− | + | </Grid> | |
</DataTemplate> | </DataTemplate> | ||
</source> | </source> | ||
+ | |||
+ | == AR related refactoring == | ||
+ | The AR related view models are restructured and cleaned up. '''Existing XAMLs are NOT compatible and must be updated according to the table below.''' | ||
+ | |||
+ | {| class="wikitable" | width = "75%" | ||
+ | |- | ||
+ | !style="text-align:left;"|XAML template!!style="text-align:left;"|Binding content in V.3.4!!style="text-align:left;"|Binding content in V.3.5 | ||
+ | |- | ||
+ | |rowspan="4"|UBIK''XXX''POI<br/>UBIKPOIFlyout | ||
+ | |Content.''XXX''||ContentViewModel.''XXX'' | ||
+ | |- | ||
+ | |Name||ContentViewModel.Title | ||
+ | |- | ||
+ | |Description||ContentViewModel.SubTitle | ||
+ | |- | ||
+ | |Image||Icon | ||
+ | |- | ||
+ | |UBIKDirectPOI||ShowInCameraView||IsVisible | ||
+ | |- | ||
+ | |rowspan="2"|UBIKGeoPOI | ||
+ | |ShowInGlobalView||IsVisible | ||
+ | |- | ||
+ | |GeoLocation.''XXX''||GeoCoordinates.''XXX'' | ||
+ | |- | ||
+ | |UBIKIDPOI||ShowInLocalView||IsVisible | ||
+ | |- | ||
+ | |UBIKUserPin(Small)||Attitude.''XXX''||Orientation.''XXX'' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ''XXX'' is a placeholder text. For example, the UBIKMapPOI template in version 3.4 had a binding <source lang = "xml">{Binding Content.ClassificationHandler.StatusColor, ...}</source> | ||
+ | Now in version 3.5, it needs to be changed to <source lang = "xml">{Binding ContentViewModel.ClassificationHandler.StatusColor, ...}</source> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == Bugfix related == | ||
+ | A few bugfixes we included in version 3.5 require some modifications in the XAML templates. If you have customized the following templates, we recommend that you fetch their latest default version and customize them again. | ||
+ | * UBIKPOIFlyout; | ||
+ | * UBIKEdit. | ||
+ | |||
+ | [[Category:Client|XAML Changes in UBIK WinX 3.5]] | ||
+ | [[Category:Version 3.5|XAML Changes in UBIK WinX 3.5]] | ||
+ | [[Category:WinX|XAML Changes in UBIK WinX 3.5]] |
Latest revision as of 09:38, 24 February 2020
Due to the changes we made in the UBIK® WinX client, certain modifications in the customizable XAML templates are required. Please refer to each individual change to see whether your existing templates might still be compatible.
- If not compatible, you must modify those templates or the relevant features will no longer function;
- If compatible, your existing templates can still be used. Nevertheless, we recommend updating them as soon as possible since all future bugfixes, improvements, etc. will not apply otherwise.
Contents
Filtering by expressions
Customizers can define expressions in XAML to get different filtered lists of content (objects, properties, etc.). This was done previously using the CollectionToViewConverter. It is now replaced by the ListCollectionView. Existing XAMLs are still compatible.
Before 3.5
xmlns:converters="using:UBIK.WinX.Converters">
<Grid>
<Grid.Resources>
<x:String x:Key="MetaClassExpression">Item.Content.MetaUID.ToString().ToLower()=="D09E0F2E-1D2C-49C5-8285-585E2C83280C"</x:String>
<converters:CollectionToViewConverter x:Key="FilterByMetaClass" Source="{Binding Children.Items}" />
</Grid.Resources>
<SelectionBoundListView ...
ItemsSource="{Binding Source={StaticResource MetaClassExpression}, Converter={StaticResource FilterByMetaClass}}"/>
</Grid>
</DataTemplate>
After 3.5
xmlns:cv="using:UBIK.WinX.UI.CollectionView">
<Grid>
<Grid.Resources>
<x:String x:Key="MetaClassExpression">Item.Content.MetaUID.ToString().ToLower()=="D09E0F2E-1D2C-49C5-8285-585E2C83280C"</x:String>
<cv:ListCollectionView x:Key="FilterByMetaClass" Expression="{StaticResource MetaClassExpression}" ItemsSource="{Binding Children.Items}" />
</Grid.Resources>
<SelectionBoundListView ...
ItemsSource="{StaticResource FilterByMetaClass}"/>
</Grid>
</DataTemplate>
The AR related view models are restructured and cleaned up. Existing XAMLs are NOT compatible and must be updated according to the table below.
XAML template | Binding content in V.3.4 | Binding content in V.3.5 |
---|---|---|
UBIKXXXPOI UBIKPOIFlyout |
Content.XXX | ContentViewModel.XXX |
Name | ContentViewModel.Title | |
Description | ContentViewModel.SubTitle | |
Image | Icon | |
UBIKDirectPOI | ShowInCameraView | IsVisible |
UBIKGeoPOI | ShowInGlobalView | IsVisible |
GeoLocation.XXX | GeoCoordinates.XXX | |
UBIKIDPOI | ShowInLocalView | IsVisible |
UBIKUserPin(Small) | Attitude.XXX | Orientation.XXX |
A few bugfixes we included in version 3.5 require some modifications in the XAML templates. If you have customized the following templates, we recommend that you fetch their latest default version and customize them again.
- UBIKPOIFlyout;
- UBIKEdit.