protected override void OnDeactivate(bool close) { //re-enable underlying event handling _root.IfHasValueThenDo(ui => ui.IsHitTestVisible = true); // reset the application bar _scope.IfHasValueThenDo(scope => scope.Dispose()); }
protected void UpdateApplicationBar(Action <ApplicationBar> builder) { _applicationBar.IfHasValueThenDo(bar => { var previous = bar.Instance; _scope = Disposable .Create(() => bar.Update(previous)) .Maybe(); bar.UpdateWith(config => config.Setup(builder)); }); }
public May <T> Set <T>(string key, May <T> value) { value.IfHasValueThenDo(x => { var existing = Get <T>(key); if (!existing.HasValue || IsDifferent(existing.ForceGetValue(), x)) { Store(key, x); } }); return(value); }
protected override void OnActivate() { // disable underlying event handling _root.IfHasValueThenDo(ui => ui.IsHitTestVisible = false); }