-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] TabView #121
Comments
I am currently working on a project which requires a |
Thanks @ChaplinMarchais! That'd be fantastic! I'll assign this to you 👍 |
Added properties and the corresponding `BindableProperty` backing fields as defined in CommunityToolkit#121
…olkit#121) * Added comments on the public members of `TabView` * Removed the explicit `private` access modifier from members of `TabView`
@brminnick just a quick question for you about how you guys want events to be implemented in the
Any suggestions for improvements would be welcomed! |
Yup! That looks good 👍 |
…it#121) Incorporated the generic version of the `WeakEventManager` from (pictos@42343f3e83d98c08e06fcf23f3a470ff77276a46).
…it#121) * Refactored the logic in the constructor of `TabView` into it's own `Initialize()` method. * Added a `Loading` event which is fired off at the start of `Initialize()` to allow the consumer to hook into the `TabView` before content is assigned. The idea here is to support the following scenarios: * Tabs are dynamically generated at runtime from data within the `TabView` itself. * Easy method for instrumenting performance monitoring/tracing/etc.
…olkit#121) The following outlined changes to the sample project's page system were adopted from https://github.com/CommunityToolkit/Maui/tree/badgeview - - - - * Refactored the `SectionModel` to take a `Type` rather than a `Page` as the first argument. * Refactored the `BaseGalleryPage` to utilize the new construction method for `SectionModel` * Remove the generic `BasePage` * Update `BasePage` to utilize a parameter-less constructor with a `protected static Page PreparePage(SectionModel)` for construction of the child pages. * Update all pages to utilize the aforementioned changes.
…tyToolkit#121) * Add enum values for placement of the tab strip on the screen * Add `BindableProperty` values for the features specified in the design specification
…kit#121) * Remove the original csharp only implementation of `TabViewPage` and replaced it with a XAML with code-behind implementation. * Add `TabViewViewModel` for the `TabView` sample page.
…mmunityToolkit#121) Add two helper methods in `ArgumentNullExceptionExtensions.shared.cs` which take a `object?` and attempts to cast it to a string and perform the static call to the corresponding guard clause helper on `String` then throws `ArgumentNullException(parameterName)` if it returns true, or the object cannot be cast to string and is null.
@ChaplinMarchais If this control should be a way to substitute the native TabBar, then it would make sense that it also taps into Shell's navigation so that the content of the TabView can be controlled using Routes/URIs using |
@ewerspej ok I am going to take a look at the @brminnick do you have any further insight into the inner-workings of |
* Renamed `TabView.TabIndicatorDataTemplate` -> `TabView.TabIndicatorTemplateProperty` * Add default style const properties to `TabViewItem` ** `LabelStyle` ** `ImageStyle` ** `LayoutStyle`
Add a `TabViewIndicator` type which will be responsible for managing the logical collection of `TabViewItem` instances being displayed in the Tab Indicator, as well as providing the logic for correctly constructing the `TabViewItem` based on the proper template and styling.
Any updates on this issue? |
It doesn't look like it. Would you be willing to provide assistance? |
@ewerspej it would be easier to make shell looks like TabView rather then integrating navigation. Here is an example how you can customize shell appearance: https://vladislavantonyuk.github.io/articles/Customizing-.NET-MAUI-Shell |
I think trying to incorporate Shell will side-track this issue. If you want tabs these options are available but with limitations to Shell usage.
This proposed TabView would be a good addition and should be unrelated to Shell so there's freedom to use it elsewhere. For e.g. I want to use Shell and Flyout but I want tabs on one of the pages. |
Hi @JRosanowski , were you able to validate for the second point ? |
Any updates on this Proposal? |
Hello @ChaplinMarchais! I see you referenced some commits with this issue. What is your progress with the issue? Could you create a PR with your implementation? Do you need any help? |
I'll be happy to help too |
I would suggest to investigate if it can be achived using InticatorView and CarouselView. if yes, we can close this proposal. |
I don't think the combination of |
Yes, I can confirm 1000% that a tabview system can be achieved by using CarouselView and Indicator View. I have developed apps simulating tabs with this approach and work fantastic!! Also I have developed an app using CollectionView with horizontal scrolling simulating the tabs, then on each item selected I perform UI changes to show or hide content views. Additionally, CarouselView and CollectionView allows you to perform loading on-demand, this means that you don't have to load all tabs contents at first load. Alert!: While developing the apps, there are some performance impacts when loading the information while switching the position in a carousel view. So, for simple tabs where you render only a ListView/CollectionView with no heavy data it is fine. However, if what it renders is heavy, then this approach may not work. I just wanted to share my grain of salt. |
@vhugogarcia let's discuss it on standup. I will show different implementations. and we can decide together if we can close it or not |
sounds like a plan! Thanks @VladislavAntonyuk 😃 |
TabView can be easily implemented using the combination of .NET MAUI controls, like CarouselView and IndicatorView; ContentView and RadioButton, HorizontalStackLayout and ContentView. |
Since it is easy to implement and there is a high demand for it, why not package it more comprehensively and include it in the community toolkit? |
@sharpwood Feel free to submit us a Pull Request, complete with Unit Tests and Documentation! |
The toolkit would benefit greatly from having a tabview control instead of having thousands of custom implementations. A tabview control could then be used as the base control to expand functionality has a developer seems fit. |
TabView
Summary
The TabView control allows the user to display a set of tabs and their content. The TabView is fully customizable, other than the native tab bars
Detailed Design
TabView.shared.cs
Usage Syntax
XAML Usage
C# Usage
The text was updated successfully, but these errors were encountered: