Dealing with TabControls #88
-
First of all, i wanted to thank you for your work on this project. I've been wondering what would be the correct way to handle TabControls in Prism.Avalonia. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Thank you @B-B-Christian for reaching out and for your support. If you don't mind, could you reference the StackOverflow and videos that you're referencing? I just want to make sure that I have a full grasp of the intent of what you're trying to perform. No doubt, a sample project could be created for working with Tabs |
Beta Was this translation helpful? Give feedback.
-
Gotta rely on memory since i've been working on this project for some time, but for the adapter part, one of my main sources of info ended up being this youtube video (granted, given i hadn't used either WPF, Avalonia or Prism before, it took some searching just to understand and learn that you do have to make a separate region to make a TabControl work to begin with).
With the command calling a method from viewmodel. What i was wondering was mainly the correctness of such an approach, though, both for the adapter part and this other workaround. |
Beta Was this translation helpful? Give feedback.
I see what you mean, @B-B-Christian. Though you do bring up an interesting point, thus far, my implementations of
TabControl
in Avalonia thus far have been pretty simple, not relying on the need for navigation strategies - except for my MAUI/Xamarin.Forms apps.While awaiting your response, I was thinking along the same lines as your code reference, Avalonia.Xaml.Behaviors. Based on your inquiry and samples, the Prism.Avalonia Outlookish project will be getting a TabControl update with something similar in mind.
Check out the PR:
This pull request is an example of using the TabControlAdapter based on the sample video. This, however, does not provide the IActiveAware linkages.