Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

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

Open
agat366 opened this issue Jun 1, 2020 · 1 comment

Comments

@agat366
Copy link

agat366 commented Jun 1, 2020

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

@Alicg
Copy link

Alicg commented Oct 24, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants