Skip to content

Commit

Permalink
Explicitly declare reflection bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
daltzctr committed Sep 11, 2024
1 parent 5d2ec38 commit 37c2c1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Maui.DataGrid.Sample/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
<dg:DataGridColumn PropertyName="." Width="0.75*">
<dg:DataGridColumn.CellTemplate>
<DataTemplate x:DataType="m:Team">
<Button Text="Edit" BackgroundColor="LightSkyBlue" Command="{Binding BindingContext.Commands[Edit], Source={Reference self}}" CommandParameter="{Binding .}" />
<Button Text="Edit" BackgroundColor="LightSkyBlue" Command="{Binding BindingContext.Commands[Edit], Source={Reference self}, x:DataType={x:Null}}" CommandParameter="{Binding .}" />
</DataTemplate>
</dg:DataGridColumn.CellTemplate>
<dg:DataGridColumn.EditCellTemplate>
<DataTemplate x:DataType="m:Team">
<Button Text="Done" BackgroundColor="MediumSeaGreen" Command="{Binding BindingContext.Commands[CompleteEdit], Source={Reference self}}" CommandParameter="{Binding .}" />
<Button Text="Done" BackgroundColor="MediumSeaGreen" Command="{Binding BindingContext.Commands[CompleteEdit], Source={Reference self}, x:DataType={x:Null}}" CommandParameter="{Binding .}" />
</DataTemplate>
</dg:DataGridColumn.EditCellTemplate>
</dg:DataGridColumn>
Expand Down
2 changes: 1 addition & 1 deletion Maui.DataGrid/DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
ItemSizingStrategy="{Binding ItemSizingStrategy, Source={Reference self}}"
SelectionMode="{Binding SelectionMode, Source={Reference self}}">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="x:Object">
<DataTemplate x:DataType="{x:Null}">
<local:DataGridRow DataGrid="{Reference self}" RowToEdit="{Binding RowToEdit, Source={Reference self}}" HeightRequest="{Binding RowHeight, Source={Reference self}, Mode=OneTime}" />
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down

0 comments on commit 37c2c1a

Please sign in to comment.