C
C#8mo ago
Brady Kelly

Ambiguous reference with MAUI attached property

I have XAML like this, quickly copied from an example on the DevExpress git repo, and my XAML is quite rusty, so I'm not sure what to make of the errors I'm getting. I'm trying to use their DataGridView control:
<dxg:DataGridView.Columns>
<dxg:TemplateColumn MinWidth="310" Caption="Customers" FieldName="Name" IsGrouped="true" GroupInterval="Alphabetical" SortOrder="Ascending">
<dxg:TemplateColumn.DisplayTemplate>
<DataTemplate>
<Grid VerticalOptions="Center" Padding="15, 5, 0, 10" RowDefinitions="*" ColumnDefinitions="Auto, 3*, *">
<dx:DXStackLayout Orientation="Vertical" Grid.SetRow="0" Grid.SetColumn="1" Padding="0"
Margin="0" Opacity="0.7">
<Label Text="{Binding Item.Name}" FontSize="16" FontAttributes="Bold" />
<dxg:DataGridView.Columns>
<dxg:TemplateColumn MinWidth="310" Caption="Customers" FieldName="Name" IsGrouped="true" GroupInterval="Alphabetical" SortOrder="Ascending">
<dxg:TemplateColumn.DisplayTemplate>
<DataTemplate>
<Grid VerticalOptions="Center" Padding="15, 5, 0, 10" RowDefinitions="*" ColumnDefinitions="Auto, 3*, *">
<dx:DXStackLayout Orientation="Vertical" Grid.SetRow="0" Grid.SetColumn="1" Padding="0"
Margin="0" Opacity="0.7">
<Label Text="{Binding Item.Name}" FontSize="16" FontAttributes="Bold" />
Now on Grid.SetRow and Grid.SetColumn I get "Ambiguous reference" errors. I suspect it's because the DataTemplate.Grid is nested inside a higher up ContentPage.Grid and MAUI doesn't know which property to attach, but I'm completely stumped as to what to do. Surely these things are normally more tightly scoped?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server