Skip to content

AOT ICustomProperty Error for 'WinUI.TableView.TableViewCell' #289

@ghost1372

Description

@ghost1372

Hi @w-ahmad
i get following error when using TableView under Native AOT.

ICustomProperty support used by XAML binding for type 'WinUI.TableView.TableViewCell' (property 'TableView') requires the type to marked with 'WinRT.GeneratedBindableCustomPropertyAttribute'. If this is a built-in type or a type that can't be marked, a wrapper type should be used around it that is marked to enable this support.

<tv:TableView.Columns>
    <tv:TableViewTextColumn x:Uid="SearchPage_SuraId"
                            Width="80"
                            Binding="{Binding SuraId}" />
    <tv:TableViewTextColumn x:Uid="SearchPage_SuraName"
                            Width="100"
                            Binding="{Binding SuraName}" />
    <tv:TableViewTextColumn x:Uid="SearchPage_AyaId"
                            Width="80"
                            Binding="{Binding AyaId}" />
    <tv:TableViewTemplateColumn x:Uid="SearchPage_AyaText"
                                Width="500"
                                CanFilter="True"
                                CanSort="True">
        <tv:TableViewTemplateColumn.CellTemplate>
            <DataTemplate>
                <common:TextBlockEx FontFamily="{x:Bind common:ProxyService.Instance.QuranFontFamily, Mode=OneWay}"
                                    FontSize="{x:Bind common:ProxyService.Instance.QuranFontSize, Mode=OneWay}"
                                    Foreground="{x:Bind common:ProxyService.Instance.QuranColor, Mode=OneWay}"
                                    HighlightingText="{Binding ElementName=Root, Path=ViewModel.Query}"
                                    Text="{Binding Aya, Mode=OneWay}"
                                    TextAlignment="{x:Bind common:ProxyService.Instance.VerseTextAlignment, Mode=OneWay}"
                                    TextWrapping="Wrap" />
            </DataTemplate>
        </tv:TableViewTemplateColumn.CellTemplate>
    </tv:TableViewTemplateColumn>
    <tv:TableViewTemplateColumn x:Uid="SearchPage_Translation"
                                Width="500"
                                CanFilter="True"
                                CanSort="True">
        <tv:TableViewTemplateColumn.CellTemplate>
            <DataTemplate>
                <common:TextBlockEx FontFamily="{x:Bind common:ProxyService.Instance.TranslationFontFamily, Mode=OneWay}"
                                    FontSize="{x:Bind common:ProxyService.Instance.TranslationFontSize, Mode=OneWay}"
                                    Foreground="{x:Bind common:ProxyService.Instance.TranslationColor, Mode=OneWay}"
                                    HighlightingText="{Binding ElementName=Root, Path=ViewModel.Query}"
                                    Text="{Binding Translation, Mode=OneWay}"
                                    TextAlignment="{x:Bind common:ProxyService.Instance.TranslationTextAlignment, Mode=OneWay}"
                                    TextWrapping="Wrap" />
            </DataTemplate>
        </tv:TableViewTemplateColumn.CellTemplate>
    </tv:TableViewTemplateColumn>
</tv:TableView.Columns>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions