private void click(object sender, EventArgs args) { View view = sender as View; switch (view.Id) { case Resource.Id.AddPage: pageLayout.AddPageView(createNewPage()); break; case Resource.Id.RemovePage: pageLayout.RemovePageView(pageLayout.PageCount - 1); break; case Resource.Id.ClearPage: pageLayout.ClearPage(); break; } setPageCount(); }