Skip to content

🧪 [Experiment] SizerBase class for GridSplitter + ContentSizer + PropertySizer #101

@michael-hawker

Description

@michael-hawker

Approved from Discussion #96

Problem Statement (copied from Discussion):

We have various types of experience which need 'gripper bars' in order to provide a user with the ability to resize/drag an area of UI around in an application. These all have similar visual and behavior cues, but may require different logic to manipulate the underlying UI structure.

Overview

This experiment adds the following components:

  • SizerBase an abstract base class to centralize logic around input, visuals, and accessibility.
  • GridSplitter knows how to manipulate a Grid's rows/columns
  • ContentSizer knows how to manipulate the Width/Height of any FrameworkElement
  • PropertySizer knows how to directly manipulate any bound double value

SizerBase

Using

You can try it out via the NuGet Packages here:

Read more about Preview Packages here.

This control has moved from Labs to the new main repo.

CommunityToolkit members can also try it out with Codespaces.

## TO DO
- [x] Fix Mouse Extension Cursor change for WASM (was working at one point, think messed up conditional logic again) See #208 
- [x] Add some enum/bool for auto hiding the splitter and having it appear on hover (think size should be consistent, so just an animation?)
- [x] WinUI 3 may behave oddly - see https://github.com/microsoft/microsoft-ui-xaml/issues/6847
- [x] Orientation Property #388

Not all these items are required to submit a PR. This list is here to help track what is remaining to implement before a technical review and discussion of moving into the main repository can occur.

## Implementation Requirements
- [x] Working Prototype
- [x] Feature Complete
- [ ] Documentation
  - [ ] SizerBase
  - [x] ContentSizer
  - [x] PropertySizer
  - [ ] GridSplitter
- [ ] Samples
  - [ ] SizerBase
  - [x] ContentSizer
  - [x] PropertySizer
  - [x] GridSplitter
- [ ] Tests
- [ ] Community Feedback / Usage Testimonies
## Tested Platforms
- [x] UWP
- [x] WinAppSDK / WinUI 3
- [x] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK

These items can sometimes be done ahead of time, but are usually started and completed after all implementation details are finished.

## Technical Review
- [ ] Accessibility Audit
- [ ] API/Naming Review
- [ ] Code Quality/Style
- [ ] Dependency Review
- [ ] Design/Style Review
- [ ] Final Approval

Metadata

Metadata

Labels

enhancementImprovement to an existing featureexperiment 🧪Used to track issues that are experiments (or their linked discussions)partner ⏹Label for issues that are being depended on by Toolkit partners.

Type

No type

Projects

Status

Done

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions