Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public void BeginEdit()
{
if (!_isEditing && !IsReadOnly)
{
_isEditing = true;
_editText = Text;
_isEditing = true;
}
}

Expand All @@ -103,6 +103,7 @@ public void CancelEdit()
{
_isEditing = false;
_editText = null;
RaisePropertyChanged(nameof(Value));
}
}

Expand All @@ -114,6 +115,7 @@ public void EndEdit()
_isEditing = false;
_editText = null;
Text = text;
RaisePropertyChanged(nameof(Value));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e
}
}

protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
base.OnDetachedFromLogicalTree(e);
ContentTemplate = null;
EditingTemplate = null;
}

protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
Expand All @@ -121,6 +128,11 @@ protected override void OnDataContextChanged(EventArgs e)
ContentTemplate = cell.GetCellTemplate(this);
EditingTemplate = cell.GetCellEditingTemplate?.Invoke(this);
}
else
{
ContentTemplate = null;
EditingTemplate = null;
}
}
else
{
Expand Down