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

How Change ToolbarItem properties dynamically?

$
0
0

Simple test

`ToolbarItem A;
ToolbarItem B;
ToolbarItem C;

        A = new ToolbarItem {
            Name = "A",
        };

        B = new ToolbarItem {
            Name = "B",
            Command = new Command (() => {
                A.Name = "B";
            })
        };

        C = new ToolbarItem {
            Name = "C",
            Command = new Command (() => {
                A.Name = "C";
            })
        };

        ToolbarItems.Add (C);
        ToolbarItems.Add (B);
        ToolbarItems.Add (A);`

A name never change when tap C or B, same problem with Icon property, any idea?


Viewing all articles
Browse latest Browse all 58056

Trending Articles