Jump to: navigation, search

Changes


XAML Tips

25 bytes added, Yesterday at 09:00
<!--</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Button ...
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Button
* First, you need to setup a filtered list
**UWP: Setup a ListCollectionView in the Resources section of a UI element (e.g. Grid). This list is only available/visible within that UI element (the Grid in this case).
**XamarinMobile: Setup a String with a filtering expression & a SfDataSourceExt in the ResourceDictionary of the ContentView. For the Expression property of the SfDataSourceExt refer to the created expression String.
* The ItemsSource uses Children.Items. Use the [[Developer_Mode|developer mode]] if necessary to find out if this is available where you intend to define the list;
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<ContentView
With the filtered list configured, you can then insert the following code snippet to execute the SetPropertyValueCommand for the filtered result items.
* The example code assumes that the child objects have an editable property called "VALUE" and tries to set 50 as their value;
* The "Filtered" refers to the ListCollectionView (UWP) or SfDataSourceExt (XamarinMobile) configured above.
<br />
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Button
</tab>
<tab name="Xamarin / MauiMobile">
<source lang = "xml">
<Button
</tab>
<tab name="Xamarin/MauiMobile">
<source lang="xml">
<Button
</source>
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Button
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Button ...
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Label Text="{Binding ObjectByUID[paste-your-uid].Properties.VisibleItems[add-your-property-name].DisplayValue}" />
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<Label Text="{Binding CallingViewModel.ObjectByUID[paste-your-uid].Properties.VisibleItems[add-your-property-name].DisplayValue}" />
| One metaproperty per UI Label || Bind the label text to the metaproperty Description || Database / UBIK Studio || Recommended for UWP, customizings with fewer UI texts, finalized customizings.
|-
| One metaproperty delivering a localization "tag" (such as: "EN" / "DE") || Use something like DataTrigger (XamarinMobile) to hardcode a different localized text per tag (such as: "eg." / "zb.") || XAML || Recommended for XamarinMobile, highly customized UIs with many texts, customizings that tend to change often.
|}
<br>
</tab>
<tab name="Mobile(Xamarin)">
'''UBIKThemes:'''
<source lang = "xml">
<tabs>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<tabView:SfTabView EnableVirtualization="true">
Adding the classification to a metaclass is enough for UWP.
</tab>
<tab name="Mobile(Xamarin)">
Xamarin currently requires additional customizing to make use of the TabSelector property. One approach is to add a DataTrigger to the SfTabView found in UBIKContentArea that is triggered by the value of the TabSelector property, as shown below;
<source lang = "xml">
</tab>
<tab name="Mobile(Xamarin)">
<source lang = "xml">
<x:String x:Key="AutoSaveDocumentsOnPageClose">true</x:String>
== Platform and Device-specific UI with OnPlatform and OnIdiom =={{UnderConstructionStartVersion/MobileSince|5.0}}<br>==Although '''OnPlatform''' and '''OnIdiom''' are used in Xamarin, the following wiki article is valid from MAUI 5.0 (add version flag)Maui, as the syntax changed.
'''OnPlatform''' can be used to define different property values based on the platform. Valid Platform names are:
{{Attention|Unreliable Support: Behavior may vary when using bindings or complex resources. Although it seems to work with the inline syntax according to our experiences, it is recommended to test these edge cases thoroughly.}}
 
{{UnderConstructionEnd}}
[[Category:Client|XAML Tips]]
[[Category:Mobile|XAML Tips]]
[[Category:WinX|XAML Tips]]
[[Category:XAML|XAML Tips]]
[[Category:Mobile|XAML Tips]]
561
edits