Xfx.Controls icon indicating copy to clipboard operation
Xfx.Controls copied to clipboard

It doesn't seem the control works when in DataTemplate of repeating control.

Open agat366 opened this issue 5 years ago • 1 comments

Not sure what to specify. It just doesn't work.

I tried to use the control inside of ListView-like template. The way I define it is similar to how you do this withing ListView:

                        <controls:RepeaterView.ItemTemplate>
                            <DataTemplate>
                                   <xfx:XfxComboBox Placeholder="Enter prey"
                                                             Text="{Binding Title}"
                                                             ItemsSource="{Binding BindingContext.Items, Source={x:Reference list}}"
                                                             SortingAlgorithm="{Binding BindingContext.FilteringMethod, Source={x:Reference list}}"/>

where RepeaterView is my custom control, which generates the template content as follows:

            var template = ItemTemplate;
            if (ItemTemplate is DataTemplateSelector sel)
            {
                template = sel.SelectTemplate(item, null);
            }
            var content = template.CreateContent();

            view = content is View v ? v : ((ViewCell)content).View;

            view.BindingContext = item;

(pretty standard way).

But after all, when I am typing, the list doesn't show up and the filtering method is not being called.

XF: 4.6 Android: 6.0

agat366 avatar Jun 01 '20 11:06 agat366

Doesn't work for me as well. Have you found any solution?

Alicg avatar Oct 24 '20 11:10 Alicg