Tuesday, September 5, 2017

Injecting a new root element in a Xamarin Forms Content Page

If you want to insert a new root element on a content page (using Xamarin Forms) you must set the Content to null first before assigning it again. Otherwise touch events will not register (at least not on iOS).

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;

I would do this directly after the call to InitializeComponent() in the code behind of the view.


122 comments:

  1. You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! online marketing

    ReplyDelete
  2. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site. xamarin training in Chennai

    ReplyDelete
  3. Extraordinary blog. you put Good stuff. All the themes were clarified briefly.Thanks for sharing that post.Keep in blogging…
    No.1 Software Testing Training Institute in Chennai | Best Selenium Training Institute in Chennai | Web Designing Training Institute in Chennai

    ReplyDelete
  4. Great Article… I love to read your articles because your writing style is good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Graphic Design Training Institute in Chennai | Graphic Design Training Institute in Velachery

    ReplyDelete
  5. Thank you for taking the time to provide us with your valuable information.keep sharing your post regularly..
    Certified Ethical Hacking Training in Chennai | Hacking Training in Saidapet

    ReplyDelete
  6. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Cisco CCNP Certification Exam Center in Chennai | Best CCNP Training in Alandur

    ReplyDelete
  7. Great Article… I love to read your articles because your writing style is good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    No.1 Microsoft Azure Training Institute in Chennai | No.1 Microsoft Azure Training Institute in Velachery

    ReplyDelete
  8. Thank you for taking the time to provide us with your valuable information.keep sharing your post regularly..
    Certified Ethical Hacking Training in Chennai | Blue Prism Training Institute in Chennai

    ReplyDelete
  9. Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
    Cloud Computing Training Institute in Chennai | Cloud Computing Training Institute in Velachery

    ReplyDelete
  10. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    xamarin classes
    best xamarin course

    ReplyDelete
  11. Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
    CLOUD COMPUTING Classes in Chennai | CLOUD COMPUTING Courses in Velachery

    ReplyDelete
  12. These provided information was really so nice, thanks for giving that post and the more skills to develop after refer that post.
    Best Dotnet Training Institute in Chennai|Best Dotnet Training Institute in Velachery

    ReplyDelete
  13. I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You.
    No.1 Automation Anywhere Training Institute in Chennai | No.1 Automation Anywhere Training Institute in Kanchipuram | No.1 Automation Anywhere Training Institute in Velachery

    ReplyDelete
  14. My rather long internet look up has at the end of the day been compensated with pleasant insight to talk about with my family and friends.
    No.1 Blue Prism Training Institute in Chennai | No.1 Blue Prism Training Institute in Velachery | No.1 Blue Prism Training Institute in Kanchipuram

    ReplyDelete
  15. I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
    Automation Anywhere Training with Placement in Chennai | Automation Anywhere Training with Placement in Tambaram

    ReplyDelete
  16. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    SEO Training Institute in Chennai | SEO Training Institute in Velachery

    ReplyDelete
  17. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    JAVA and J2EE Training Institute in Chennai | JAVA and J2EE Training Institute in Velachery

    ReplyDelete
  18. Hi, I am really happy to find such a helpful and fascinating post that is written in well manner. Thanks for sharing such an informative post.
    No.1 Automation Anywhere Training Institute in Chennai | No.1 Automation Anywhere Training Institute in Velachery

    ReplyDelete
  19. I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
    No.1 Blue Prism Training Institute in Chennai | No.1 Blue Prism Training Institute in Kanchipuram

    ReplyDelete
  20. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    Python Certification Course in Chennai | Python Certification Course in OMR

    ReplyDelete
  21. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving. Most of ideas can be nice content.
    Best Cloud Computing Training Institute in Chennai |Best Cloud Computing Training Institute in Taramani

    ReplyDelete
  22. Thank you for taking the time to provide us with your valuable information. Keep sharing your post regularly..
    Blue Prism Robotic Process Automation in Chennai | Blue Prism Robotic Process Automation in Chennai

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
  24. Nice Blog… Wonderful Information and really very much useful. Thanks for sharing and keep updating…
    Python Training Institute in Chennai | Python Training Institute in Velachery

    ReplyDelete
  25. I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
    Python Exam Centers in Chennai | Python Exam Centers in Chennai

    ReplyDelete
  26. Awesome post. Really you are shared very informative concept... Thank you for sharing. Keep on updating...
    C and C++ Training in Chennai | C and C++ Training in Taramani

    ReplyDelete
  27. Really it was an awesome blog...... Very interesting to read, .It’s very helpful for me, Big thanks for the useful info and keep updating…
    CCNP Training Institute in Chennai | CCNP Training Institute in Velachery

    ReplyDelete
  28. Nice Post! It is really interesting to read from the beginning and Keep up the good work and continue sharing like this.
    Oracle Training in Chennai | Oracle Training in Kanchipuram

    ReplyDelete
  29. Your Blog is really amazing with useful information you are shared here...Thank you for sharing such an informative and awesome post with us. Keep blogging article like this……..
    AWS Training Institute in Chennai | AWS Training Institute in Velachery

    ReplyDelete
  30. Post is very informative… It helped me with great information so I really believe you will do much better in the future.
    Blueprism Exam Center in Chennai | Blueprism Exam Center in Velachery

    ReplyDelete
  31. Really I enjoy this blog….. Very nice post… Thanks for sharing and keep updating
    AWS Training Institute in Chennai | AWS Training Institute in Velachery

    ReplyDelete
  32. Your Blog is really awesome with useful and helpful content for us.Thanks for sharing ..keep updating more information..
    Best UIPath Training Institute in Chennai | Best UIPath Training Institute in Velachery

    ReplyDelete
  33. Thank you so much for sharing such an amazing post with useful information with us. Keep updating such a wonderful blog….
    Best CCNA Training Institute in Chennai| CCNA Training Center in Velachery

    ReplyDelete
  34. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    Ethical Hacking Training Course in Chennai | Ethical Hacking Training Course in Nanganallur

    ReplyDelete
  35. Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it…
    Best Dotnet Training Institute in Chennai |Best Dotnet Training Institute in Kanchipuram

    ReplyDelete
  36. Nice blog…. with lovely information. Really very useful article for us thanks for sharing such a wonderful blog. Keep updating…..
    Best Linux Training Institute in Pallikaranai| Best Linux Training Institute in Velachery

    ReplyDelete
  37. Awesome article…. Really very helpful information for us. Keep it up. Keep blogging. Looking to reading your next post,. Thank You for Sharing This Information
    Best PCB Training Institute in Taramani| Best PCB Training Institute in Velachery

    ReplyDelete
  38. Awesome article…. Really very helpful information for us. Keep it up. Keep blogging. Looking to reading your next post,. Thank You for Sharing This Information
    Best PCB Training Institute in Taramani| Best PCB Training Institute in Velachery

    ReplyDelete
  39. Awesome article…. Really very helpful information for us. Keep it up. Keep blogging. Looking to reading your next post,. Thank You for Sharing This Information
    Best PCB Training Institute in Taramani| Best PCB Training Institute in Velachery

    ReplyDelete
  40. Very informative blog. Thanks for sharing such good information and keep on updating.
    RPA Training in Chennai | RPA Training in Pallikaranai

    ReplyDelete
  41. Nice Blog… Wonderful Information and really very much useful. Thanks for sharing and keep updating…
    Automation Anywhere Training in Chennai | Automation Anywhere Training in Pallavaram

    ReplyDelete
  42. Good Post…. Thanks for the useful information it’s very useful to read your blog. Keep blogging article like this.
    Best JAVA/J2EE Training Institute in Perungudi| Best JAVA/J2EE Training Institute in Velachery

    ReplyDelete
  43. Nice blog, really I feel happy to see this useful blog… Thanks for sharing this valuable information to our vision....
    Best AWS Training Institute in Medavakkam| Best AWS Training Institute in Velachery

    ReplyDelete
  44. Nice..You have clearly explained about it ...Its very useful for me to know about new things..Keep on blogging..
    Blue prism Training in Chennai | Blue prism Training in Besant Nagar

    ReplyDelete
  45. Thank you so much for sharing such an amazing post with useful information with us. Keep updating such a wonderful blog….
    Ethical Hacking Training in Chennai | Ethical Hacking Training in ST. Thomas Mount

    ReplyDelete
  46. Really wonderful post.... My sincere thanks for sharing very useful information to the users... Please continue to share this kind of post
    Best Python Exams Center in OMR| Best Python Certification Exams in OMR

    ReplyDelete
  47. Thanks for sharing this valuable information.. I saw your website and get more details..Nice work...
    Graphic Designing Training in Chennai | Graphic Designing Training in Keelkattalai

    ReplyDelete
  48. Wonderful blog… You provided very interesting information here. I feel happy to read this post. I hope that you will write many posts like this… Thanks for sharing and Keep updating…..
    Python Training Institute in Chennai | Python Training Institute in Velachery

    ReplyDelete
  49. Thank you so much for sharing such an amazing post with useful information with us. Keep updating such a wonderful blog….
    UIPath Training in Chennai | UIPath Training in Kanchipuram

    ReplyDelete
  50. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    RPA Training in Chennai | RPA Training in Pallavaram

    ReplyDelete
  51. Nice blog…. with lovely information. Really very useful article for us thanks for sharing such a wonderful blog. Keep updating…..
    UIPath Training in Chennai | UIPath Training in Adyar

    ReplyDelete
  52. Simply wish to say your article is as astonishing. The clarity in your post is simply great, and I could assume you are an expert on this subject. Thanks a million, and please keep up the gratifying work.
    Ethical Hacking Training in Chennai | Ethical Hacking Training in Kanchipuram

    ReplyDelete
  53. Nice Blog… Wonderful Information and really very much useful. Thanks for sharing and keep updating…
    Blue prism Training in Chennai | Blue prism Training in Medavakkam

    ReplyDelete
  54. Nice blog, really I feel happy to see this useful blog… Thanks for sharing this valuable information to our vision....
    No.1 RPA Training institute in Chennai | No.1 RPA Training institute in Kanchipuram

    ReplyDelete
  55. Wonderful blog… You provided very interesting information here. I feel happy to read this post. I hope that you will write many posts like this… Thanks for sharing and Keep updating…..
    No.1 Blue Prism Training Institute in Chennai | No.1 Blue Prism Training Institute in Velachery

    ReplyDelete
  56. Your Blog is really amazing with useful information you are shared here...Thank you for sharing such an informative and awesome post with us. Keep blogging article like this……..
    Automation Anywhere Certification in Chennai | Automation Anywhere Training in Pallikaranai

    ReplyDelete
  57. Your Blog is really amazing with useful information you are shared here...Thank you for sharing such an informative and awesome post with us. Keep blogging article like this……..
    RPA Training in Chennai | RPA Training in Madipakkam

    ReplyDelete
  58. Post is very informative… It helped me with great information so I really believe you will do much better in the future.
    Blue prism Exam Centers in Chennai | Blue prism Certifications in Kanchipuram

    ReplyDelete
  59. Great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    Ethical Hacking Training in Chennai | Ethical Hacking Training in Taramani

    ReplyDelete
  60. I have read your blog and I got very useful and knowledgeable information from your blog. It’s really a very nice article
    No.1 Ethical Hacking Training institute in Chennai | No.1 Ethical Hacking Training institute in Velachery

    ReplyDelete
  61. Games are fun. Come to us and play we have new casino games online .Excitement and emotions are what a casino is.

    ReplyDelete
  62. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Ethical Hacking Training in Chennai | Ethical Hacking Training in Taramani

    ReplyDelete
  63. Nice info! It would be really useful for those who are Searching ..Thanks for sharing..
    Blueprism Exam Center in Chennai | Blueprism Exam Center in Velachery

    ReplyDelete
  64. Wonderful blog!!! I liked the complete article…. great written,Thanks for all the information you have provided…
    Best Dot Net Training center in Chennai|Best Dot Net Training center in Velachery

    ReplyDelete
  65. Thank you for your information. I have got some important suggestions from it. Keep on sharing.
    Best Selenium Training Institute in Chennai |Best Selenium Training Institute in Medavakkam

    ReplyDelete
  66. Very informative blog. Thanks for sharing such good information and keep on updating..
    Best MCSE Training Institute in Chennai| Best MCSE Training Institute in Velachery

    ReplyDelete
  67. This article is very much helpful and i hope this will be an useful information for the needed one.Keep on updating these kinds of informative things...
    Blue Prism Training in Chennai | UI Path Training in Chennai | Automation Anywhere Training in Chennai

    ReplyDelete
  68. Wonderful blog… You provided very interesting information here. I feel happy to read this post. I hope that you will write many posts like this… Thanks for sharing and Keep updating…..
    No.1 Automation Anywhere Training Institute in Chennai | No.1 Automation Anywhere Training Institute in Velachery

    ReplyDelete
  69. Качественная лед лента разных цветов, герметичные и нет, я обычно беру в Экодио

    ReplyDelete
  70. Good Post…. Thanks for the useful information it’s very useful to read your blog. Keep blogging article like this.
    No.1 RPA Training institute in Chennai | No.1 RPA Training institute in Velachery

    ReplyDelete
  71. Nice post. Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
    No.1 Ethical Hacking Training institute in Chennai |No.1 Ethical Hacking Training institute in Velachery

    ReplyDelete
  72. These provided information was really so nice, thanks for giving that post and the more skills to develop after refer that post.
    Robotic Process Automation Training course in Chennai | Robotic Process Automation Training course in Velachery

    ReplyDelete
  73. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.
    Automation Anywhere in Chennai | Automation Anywhere in Velachery

    ReplyDelete
  74. I think great site for these post and i am read the most of contents have useful for my Carrier. Thanks for these useful information. Any information is commands like to share him.
    Android Training Institute in Chennai | Android Trainning Institute in Velachery | Android Trainning Institute in Kanchipuram

    ReplyDelete
  75. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.
    Advanced .Net Course in Chennai |
    Advanced .Net Course in Velachery |
    Advanced .Net Course in Kanchipuram |

    ReplyDelete
  76. Thank you for taking the time and sharing this information with us. It was

    indeed very helpful and insightful while being straight forward and to the

    point. Linux server Administration Training in Chennai | Linux server Administration Training in Velachery | Linux server Administration Training in Kanchipuram

    ReplyDelete

  77. Post shows good and much informative, thanks for sharing and

    your valuable time.To keep share this kind of useful things.Advance JAVA / J2EE Training courses in

    Chennai
    | Advance JAVA / J2EE Training courses in

    Chennai

    ReplyDelete
  78. Nice blog, really I feel happy to see this useful blog… Thanks for sharing this valuable information to our vision.I’m expecting much of these useful things. JAVA Certification Course in Chennai | JAVA Certification Course in Velachery

    ReplyDelete
  79. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge.
    No.1 Ethical Hacking Training institute in Chennai | No.1 Ethical Hacking Training institute in Kanchipuram

    ReplyDelete
  80. Its really informative blog.I found useful. Thanks for sharing

    awesome post. JAVA Training Course in Chennai | JAVA Training Course in Velachery

    ReplyDelete
  81. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
    Selenium Training Institute in Chennai | Selenium Certification in Pallikaranai | Selenium Course in Velachery | Selenium Training Center in Medavakkam

    ReplyDelete
  82. Really i enjoyed very much. And this may helpful for lot of peoples. So you are provided such a nice and great article within this.
    Android Training Center in Chennai | Android Training Centre in Velachary | Android Training Centre in Kancheepuram |

    ReplyDelete
  83. Nice blog, really I feel happy to see this I enjoyed reading the Post. It was very informative and useful. It is a great post. Keep sharing such kind of useful information.
    Advanced Web Designing and Development courses in Chennai|
    Advanced Web Designing and Development courses in Velachery|
    Advanced Web Designing and Development courses in Kanchipuram|

    ReplyDelete
  84. This is really too useful and have more ideas from yours. Keep sharing many techniques and thanks for sharing the information.
    Android Training in Chennai | Android Training Center in Velachery | Android Training Institute in Pallikaranai

    ReplyDelete
  85. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving. Most of ideas can be nice content.
    Advanced Microsoft .Net Training institute in Chennai | Advanced Microsoft .Net Training institute in Kanchipuram |Advanced Microsoft .Net Training institute in Velachery

    ReplyDelete
  86. Nice and good info. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating...
    No.1 CCNA certification Training institute in Chennai|
    No.1 CCNA certification Training institute in Velachery|
    No.1 CCNA certification Training institute in Kanchipuram|

    ReplyDelete
  87. This is really too useful and have more ideas from yours. Keep sharing many techniques. Eagerly waiting for your new blog and useful information. Keep doing more.
    Selenium Training Center in Chennai | Selenium Training Center in Velachery | Selenium Training Center in Taramani | Selenium Training Center in Madipakkam | Selenium Training Center in Pallikaranai

    ReplyDelete
  88. Excellent post. I have read your blog it's very interesting and informative. Keep sharing this kind of worthful ideas. Web Design Training in Chennai | Web Design Training in Velachery

    ReplyDelete
  89. Good Informative post. I have read your blog it's very interesting and useful. Keep sharing this kind of worthful ideas. Android Training in Chennai | Android Training in Velachery

    ReplyDelete
  90. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
    Android Training Institute in Chennai | Android Training Institute in Velachery | Android Training Institute in Kanchipuram

    ReplyDelete