This is a general question and specific one. For general purpose - to understand how XF works and specifically - for using in my custom controls.
So, the thing is that I should put the elements (generated by XF for specific system (iOS or Android)) into some custom place within custom renderer
.
In a nutshell, it's embedding XF controls into native interface, in more details I need to put the controls into custom alert/popup. The issue is that the final size of the elements (views) can be different from initially generated XF ones. So I need further adjustment of them (for instance, to fit parent view bounds (as again, the parent size is custom one and usually platform-dependent and screen-size-dependent)).
Let's say, I have:
<controls:AlertPanel
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
where AlertPanel is:
public class AlertPanel : Frame
inside of the custom renderer (of the AlertPanel for iOS):
// container is my native (manually created) view
container.AddSubview(this);
and this
is the renderer class (inherited basically from UIView).
But if I do this right on IsVisible
attribute setting to true
(and the whole UI control block is dynamically created (or at least positioned)), the bounds setup via:
this.Frame = new CGRect(...);
... doesn't quite properly reflect what I expect.
It's much better when I apply that after (for instance) 10 ms delay, however, this is neither nice approach, nor having clear understanding of which way this all works.
In addition, I haven't found any constrains applied to the view generated by XF, so I am considering the bounds are strictly defined or calculated dynamically.
Any clues?