Skip to content
25 changes: 25 additions & 0 deletions src/TableViewCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@

/// <summary>
/// Begins a live resize-drag preview for this cell: generously (re)measures its content once so
/// widening can freely reveal more of it, and creates this cell's own <see cref="Clip"/> geometry

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (ARM64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (ARM64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x86)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x86)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 237 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-uno-wasm

XML comment has cref attribute 'Clip' that could not be resolved
/// and gridline shift transform. These are per-cell instances (not shared across cells — WinUI
/// throws if the same <see cref="RectangleGeometry"/> is assigned as <see cref="Clip"/> on more

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (ARM64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (ARM64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x64)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x86)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-winui-sample (x86)

XML comment has cref attribute 'Clip' that could not be resolved

Check warning on line 239 in src/TableViewCell.cs

View workflow job for this annotation

GitHub Actions / build-uno-wasm

XML comment has cref attribute 'Clip' that could not be resolved
/// than one element at a time), mutated in place every frame by
/// <see cref="UpdateResizePreviewClip"/>/<see cref="UpdateGridLineShift"/> — still no Measure/Arrange
/// per frame, just not a single shared instance across every row.
Expand Down Expand Up @@ -502,6 +502,31 @@
return false;
}

/// <summary>
/// Begins editing this cell, as a double tap or F2 does.
/// </summary>
/// <remarks>
/// The control starts an edit session from <see cref="OnDoubleTapped"/> and from the
/// <c>TableView</c> key handler, but offers no public way to ask for one. A column whose RESTING
/// cell carries an affordance of its own - a drop-down arrow, a picker button - needs to open the
/// editor on a single click of that affordance, and that is not a gesture the control can infer.
/// <para>The same conditions apply as to a double tap: a read-only cell, a cell with no owning
/// <see cref="TableView"/>, a table that is already editing, or a column drawing itself through
/// <see cref="TableViewColumn.UseSingleElement"/> will not begin an edit, and this returns
/// <see langword="false"/>. <c>BeginningEdit</c> is raised, and a handler that cancels it is
/// honoured, exactly as on the existing paths.</para>
/// </remarks>
/// <returns><see langword="true"/> if the cell entered edit mode; otherwise <see langword="false"/>.</returns>
public bool BeginEdit()
{
if (IsReadOnly || TableView is null || TableView.IsEditing || Column?.UseSingleElement is not false)
{
return false;
}

return BeginCellEditing(new RoutedEventArgs());
}

/// <summary>
/// Prepares the cell for editing.
/// </summary>
Expand Down
Loading