Skip to content
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

[Enhancement] Prism v9.0.x - Implement SelectorRegionAdapter #139

Open
DamianSuess opened this issue Apr 11, 2024 · 3 comments
Open

[Enhancement] Prism v9.0.x - Implement SelectorRegionAdapter #139

DamianSuess opened this issue Apr 11, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@DamianSuess
Copy link
Collaborator

Description

As a user, I'd like to use SelectorRegionAdapter with for Avalonia's namespace, Avalonia.Styling.

Context

This includes:

  • SelectorRegionAdapter
  • SelectorItemsSourceSyncBehavior
  • SelectorRegionAdapterFixture
@DamianSuess DamianSuess added the enhancement New feature or request label Apr 11, 2024
@DamianSuess DamianSuess added this to the Prism 9.0.x milestone Apr 11, 2024
@dhhunter
Copy link

dhhunter commented Apr 11, 2024

I am unfamiliar with SelectorRegionAdapterFixture, where would I find that in the Source? Shouldn't SelectorRegionAdapter be derived from RegionAdapterBase of SelectingItemsControl? I started working on that feature myself in an attempt to get TabControl regions to work out of the box like.

@DamianSuess
Copy link
Collaborator Author

DamianSuess commented Apr 12, 2024

@dhhunter, Here's an excerpt from the legacy Prism over at Microsoft Patterns and Practices:

Adapter that creates a new Region and binds all the views to the adapted Selector. It also keeps the ActiveViews and the selected items of the Selector in sync.

In the WPF world, the Selector class represents a control that allows a user to select items from among its child elements

For a sample using TabControl, check out my sample repo, Prism.Avalonia Outlookish. The "Mail Module" utilizes the TabControl.

@dhhunter
Copy link

In WPF, the TabControl derives from Selector which derives from ItemsControl. In Avalonia, the equivalent to the WPF Selector, seems to be SelectingItemsControl which derives from ItemsControl and is the base class for TabControl...

WPF TabControl
Avalonia SelectingItemsControl

Avalonia.Styling.Selector is used to apply a style to controls...

Avalonia.Styling.Selector

It seems to me that SelectingItemsControl is a better fit for trying to mirror the originals functionality...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants