chaosifier / TabView

TabView control for Xamarin.Forms.
MIT License
124 stars 32 forks source link

Adding pages to tab items #5

Closed masiri201 closed 6 years ago

masiri201 commented 6 years ago

When you add a page to the tabview's items, the content of that tab comes without any bindings or other stuff, what i mean is you can't interact with the controls like use button clicks and other things.

I've noticed that in carousel view this doesnt happen, so it is a problem with the tabview it self, still trying to figer out what causes this.

chaosifier commented 6 years ago

Could you be more specific? I don't quite get your question. Sharing some code would help.

masiri201 commented 6 years ago

Doing this:

TabItem tabEntradas = new TabItem("Entradas", hEntradas.Content); tabs.Add(tabEntradas);

hEntradas is an instace of a content page.

They layout is drawn, every control is drawn but if your page has any events or methods they don't get executed, im talking like button clicks etc.

The code behind of that page doesn't get executed, only the content is shown but it is unusable because you cant do nothing with it.

Carousel View works fine and executes the code.

A possible solution for this could be like adding the tabs in the item source property instead of passing in the constructor. But i'm not sure it will work.

Let me know if you figered it out.

Thanks

masiri201 commented 6 years ago

Actually I think I know how this happens, The carousel view does work and the pages inside have the code being executed, but, the binding context of carousel view and those pages needs to be the same for it to work.

I think that's why its not working.

masiri201 commented 6 years ago

Any luck @chaosifier ?

chaosifier commented 6 years ago

@masiri201, I've been extremely busy these past couple of days.. I will work on it as soon as I'm able to catch some breath.