public Button(TextureAtlasSrc bg, TextureAtlasSrc title, ButtonTapped buttonTapped) { this.enabled = true; this.bg = bg; this.title = title; this.screenRect.width = bg.atlasRect.width; this.screenRect.height = bg.atlasRect.height; this.onTap = buttonTapped; }
public Button(TextureAtlasSrc bg, TextureAtlasSrc title, ButtonTapped buttonTapped) { this.enabled = true; this.bg = bg; this.title = title; this.screenRect.width = bg.atlasRect.width; this.screenRect.height = bg.atlasRect.height; this.onTap = buttonTapped; }
protected void OnButtonTapped() { if (IsEnabled) { Device.BeginInvokeOnMainThread(() => { OnTabAnimation?.Commit(this, "OnTabAnimation" + DateTime.Now.Millisecond, finished: AnimationCallback); Command?.Execute(null); ButtonTapped?.Invoke(this, EventArgs.Empty); }); } }
public ToggleButton(TextureAtlasSrc bg, TextureAtlasSrc title, ButtonTapped buttonTapped, TextureAtlasSrc toggleOn, TextureAtlasSrc toggleOff) : base(bg, title, buttonTapped) { this.toggleOn = toggleOn; this.toggleOff = toggleOff; }
public ToggleButton(TextureAtlasSrc bg, TextureAtlasSrc title, ButtonTapped buttonTapped, TextureAtlasSrc toggleOn, TextureAtlasSrc toggleOff) : base(bg, title, buttonTapped) { this.toggleOn = toggleOn; this.toggleOff = toggleOff; }
protected virtual void OnButtonTapped() { ButtonTapped?.Invoke(); ButtonCommand?.Execute(null); }
private void RaiseButtonTapped(ToolbarButton button) { ButtonTapped?.Invoke(button, new EventArgs()); }