Jump to: navigation, search

Changes


XAML Best practices

956 bytes added, Monday at 09:45
* 🏆 Empty out your UBIKThemes for a new customizing.
** When working in Xamarin, it is recommended to empty out your UBIKThemes file (ie. delete everything between the <ResourceDictionary> tags) and only add what you intend to customize.
** Unfortunately, this approach is currently not 100% possible in UWP xamls, as we noticed that custom styles are not utilized on controls unless the controls are also in UBIKThemes, shown instead using the standard grey/orange. However, diligent customizers are still welcome to clear can find out their how to do so below: <div class="toccolours mw-collapsible mw-collapsed" data-expandtext="Read More" data-collapsetext="Close"> An issue with dynamically refreshing style resources causes emptying of UBIKThemes to be much more complicated on UWP than in Xamarin.<br>This is because StaticResources are only updated once they are overwritten again in Themes. The most common symptom of this issue is that for example, if UBIKAccentColor is changed to blue, this customization will not be reflected by styles for any control defined in UBIKThemes anyway , unless the styles are 'written' again in UBIKThemes. So in this example, the regular button hover state will remain orange, unless UBIKButtonStyle is included in the UBIKThemes of that project.<br>Therefore, the only approach we can recommend is to remove everything from UBIKThemes, and add styles back when requiredonce they fail to reflect the customized color resources. Since this approach is impractical, we do not encourage emptying UBIKThemes for UPW as strongly as we do for Xamarin. </div> 
* Organize UBIKThemes in sections.
423
edits