Skip to content

Commit b50bb63

Browse files
authored
Merge pull request #186 from w-ahmad/flyout_datacontext
set cell & row flyout's datacontexts to backing item on Uno
2 parents 3cbacb2 + 44b37cb commit b50bb63

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/TableView.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,9 +1384,10 @@ internal bool ShowRowContext(TableViewRow row, Point position)
13841384

13851385
if (RowContextFlyout is not null && !eventArgs.Handled)
13861386
{
1387-
var presenter = row.FindDescendant<ListViewItemPresenter>();
1388-
1389-
RowContextFlyout.ShowAt(row, new FlyoutShowOptions
1387+
#if !WINDOWS
1388+
RowContextFlyout.DataContext = row.Content;
1389+
#endif
1390+
RowContextFlyout.ShowAt(row.CellPresenter, new FlyoutShowOptions
13901391
{
13911392
#if WINDOWS
13921393
ShowMode = FlyoutShowMode.Standard,
@@ -1411,6 +1412,9 @@ internal bool ShowCellContext(TableViewCell cell, Point position)
14111412

14121413
if (CellContextFlyout is not null && !eventArgs.Handled)
14131414
{
1415+
#if !WINDOWS
1416+
CellContextFlyout.DataContext = cell.Row?.Content;
1417+
#endif
14141418
CellContextFlyout.ShowAt(cell, new FlyoutShowOptions
14151419
{
14161420
#if WINDOWS

0 commit comments

Comments
 (0)