public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (!(holder is ComputerViewHolder vh)) { return; } vh.Caption.Text = Computers[position].Ip; vh.ConnectButton.Click += (sender, args) => ConnectClick?.Invoke(holder, position); vh.RemoveButton.Click += (sender, args) => RemoveClick?.Invoke(holder, position); vh.PinButton.Click += (sender, args) => PinClick?.Invoke(holder, position); }
private void ConnectButton_Click(object sender, EventArgs e) { ConnectClick?.Invoke(this, EventArgs.Empty); }
private void Connect_Click(object sender, RoutedEventArgs e) { ConnectClick?.Invoke(this, EventArgs.Empty); }