Forum Xamarin.Forms

How to change a property in a controltemplate

I'm currently trying to create a side menu for my app. It is my very first Xamarin project so it is mostly trial and error.. This was my idea of how to create my menu:

So, I have created a controlTemplate in my app.xaml which is a basic grid with 1 row and 2 columns. The first column is hidden (width set to 0) and contains the menu, and the other column contains another grid with two rows with the first one a containing a button and the second one holding the contentPresenter. The idea was that the once the button is pressed the hidden column will be visible by setting the width to 200 (for example).

Any idea how I can do the following:

  • Bind an OnClicked method to a controlTemplate button
  • Change the width value of the column

Best Answer


  • JeffreyWienenJeffreyWienen USMember ✭✭

    Solved the menu problem by using Master Detail Page, but I'm still curious on how to accomplish what I was initially trying to do.

  • N_BauaN_Baua INMember ✭✭✭✭✭

    Hi @JeffreyWienen ,

    Take a look at my post in another thread, where a similar concern is solved.

    Hope this helps.

    N Baua

  • JeffreyWienenJeffreyWienen USMember ✭✭

    Like I said, I already figured out how to make a menu (by using the same method you talked about in your post), but
    I'm still curious if it is possible to bind methods to Clicked events and within a controlTemplate

Sign In or Register to comment.