private static AppBarButton FindButton(string label, ActionsCommandBar bar) { return(bar.PrimaryCommands .OfType <AppBarButton>() .Union(bar.SecondaryCommands.OfType <AppBarButton>()) .FirstOrDefault(b => b.Label == label)); }
private static AppBarButton FindButton(string label, ActionsCommandBar bar) { return bar.PrimaryCommands .OfType<AppBarButton>() .Union(bar.SecondaryCommands.OfType<AppBarButton>()) .FirstOrDefault(b => b.Label == label); }