, aber mein Element muss doppelklick gemacht werden, um ein Fenster zu öffnen, um die Daten eines Elements zu ändern, sodass ich nicht sehen kann.
< /code>
public partial class BtnItem:ObservableObject
{
[ObservableProperty]
private int row;
[ObservableProperty]
private int col;
public string info;
[RelayCommand]
private void DClick(BtnItem btnItem)
{
//open a window, set datacontext = this to change the info.
}
}
< /code>
And you could see if I want to select item I need to click the place outside the item.

How could I select the item which need to be double-clicked in MVVM ?