Cancel rating edit on escape
This commit is contained in:
parent
7ef666dc91
commit
0ed5062683
4 changed files with 18 additions and 5 deletions
|
|
@ -19,7 +19,7 @@ namespace LibationAvalonia.Controls
|
|||
OwningColumnProperty = typeof(DataGridCell).GetProperty("OwningColumn", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
public static void AttachContextMenuToCell(this DataGridCell cell)
|
||||
public static void AttachContextMenu(this DataGridCell cell)
|
||||
{
|
||||
if (cell is not null && cell.ContextMenu is null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace LibationAvalonia.Controls
|
|||
};
|
||||
|
||||
ToolTip.SetTip(myRatingElement, "Click to change ratings");
|
||||
cell?.AttachContextMenuToCell();
|
||||
cell?.AttachContextMenu();
|
||||
|
||||
if (Binding != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace LibationAvalonia.Controls
|
|||
{
|
||||
protected override IControl GenerateElement(DataGridCell cell, object dataItem)
|
||||
{
|
||||
cell?.AttachContextMenuToCell();
|
||||
cell?.AttachContextMenu();
|
||||
return base.GenerateElement(cell, dataItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue