C5.02 "ScrollView" and "ControlTemplate" issue (Xamarin non UWP) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki
We start with note: All works fine for UWP-app!!!!
- If we open any O2m page, we see an issue
- Let's take a look at Xaml of any O2m page. Looks fine (we mean, correct).
- Another issue related Feature-forms, after Expand(Collapse) - actions
Solution approach # 1 (may be not so good):
- Do not use Feature-forms and O2m-forms for mobile app. Anyway, they are not that useful and convenient.
- For mobile app, instead of O2m-forms please use page navigation chains. Here is one of the examples.
- Almost all generated forms support one-to-many relationship !!!
- lforms do not support navigation (but do support one-to-many relationship). They are used as a building blocks for O2m-forms.
Solution approach # 2 (may be a little bit better):
With this approach the issue is gone !!! But additional code will appear in the generated code. At first glance, this code is a little redundant and incomprehensible. Our goal is to explain why this code is generated.
-
The approach is to put "visual control" at the beginning of each Feature-form and O2m-form. This "visual control" must occupy non-empty space.
- right before "UI switching (or UI changes)" make this "visual control" to be visible
- right after "UI switching (or UI changes)" make this "visual control" to be hidden with a small delay.
-
we decided to use ActivityIndicator (But you can use any control you like)
- in the code of mvvm ViewModel we show and hide our "visual control" in "OnLoaded"-method
- the second method is "OnContainerMenuItemsCommandAction"
Note about Solution approach # 2
- Note 1: We do not use external libraries in our generators.
- Note 2:
- If you will decide to use Xamarin community library
- Maybe it is better to use "RefreshView"-control instead of ActivityIndicator.
- If you will decide to use Xamarin community library
- Note 3:
- If you will develop only UWP app
- maybe this "additional code" should be removed
- If you will develop only UWP app