public ArchiSteamFarmPlusPage() { ViewModel = IViewModelManager.Instance.GetMainPageViewModel <VM>(); Actions = Interface.InitToolbarItems(this); ASFService.Current.WhenAnyValue(x => x.IsASFRuning).Subscribe(value => { const VM.ActionItem actionItem = VM.ActionItem.StartOrStop; if (Actions.ContainsKey(actionItem)) { var item = Actions[actionItem]; IActionItem <VM.ActionItem> itemHost = ViewModel; item.Text = itemHost.ToString2(actionItem); item.IconImageSource = itemHost.GetIcon(actionItem); } }); }