public void Bind(MenuItem menuItem) { // set the colors for the labels // lblTitle.TextColor = Themes.CellTheme.TextForegroundColor; // lblTitle.HighlightedTextColor = Themes.CellTheme.TextHightlightColor; // lblSubTitle.TextColor = Themes.CellTheme.TextSubForegroundColor; // lblSubTitle.HighlightedTextColor = Themes.CellTheme.TextSubHighlightColor; // // // bind the data // if (!menuItem.IsHeroItem) { // lblTitle.Text = menuItem.Title; // lblSubTitle.Text = menuItem.SubTitle; // imgIcon.Image = UIImage.FromFile (menuItem.IconFileName); // // } else { // lblSubTitle.Text = ""; // lblTitle.Text = ""; // lblTitle.Bounds = new RectangleF(0,0,this.Bounds.Width, this.Bounds.Height); // } // update the view _view.Update(menuItem); }
private void OnRowClicked(MenuItem item) { if(RowClicked!=null) RowClicked(this, new RowClickedEventArgs<MenuItem>(){ Item = item}); }
// Public method, that allows the code to externally update // what we are rendering. public void Update(MenuItem menuItem) { this._menuItem = menuItem; SetNeedsDisplay (); }