For example, add the entire view in an AbsoluteLayout could look like this:
// Get a reference to the content
var content = page.Content;
page.Content = null; // This line is key
// Create a new root element and add the content
var absoluteLayout = new AbsoluteLayout();
absoluteLayout.Children.Add(content);
// Replace the content
page.Content = absoluteLayout;
var content = page.Content;
page.Content = null; // This line is key
// Create a new root element and add the content
var absoluteLayout = new AbsoluteLayout();
absoluteLayout.Children.Add(content);
// Replace the content
page.Content = absoluteLayout;
I would do this directly after the call to InitializeComponent() in the code behind of the view.
No comments:
Post a Comment