Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to write tap event for textcell ???

$
0
0

Hi..

can anyone help me with this.
actually i tried this code .it's building fine but when am tapping on it the app is closing with error "unfortunately app has stopped."

public Action OnMenuTap;

    public MenuPage ()
    {
        this.Title = "Sample MasterPage";

        var sec = new TableSection () {

            new TextCell{ Text = "Menu1", Command = new Command (() => Navigation.PushAsync (new WebViewDemoPage ())) },
            new TextCell{ Text = "Menu2" },
            new TextCell{ Text = "Menu3" },
            new TextCell{ Text = "Menu4" },
            new TextCell{ Text = "Menu5" },
        };

        var root = new TableRoot () { sec };
        var tableView = new TableView () { 
            Root = root,
            Intent = TableIntent.Menu,
            BackgroundColor = Color.White,

        };

        Content = new StackLayout { 
            Children = {
                tableView,          
            }
        };
    }

Viewing all articles
Browse latest Browse all 77050

Trending Articles