Skip to content

Proposal: ScrollViewer - Support Offset (begin and end) for scrollbar #1914

@harvinders

Description

@harvinders

Proposal: ScrollViewer should support BeginOffset and EndOffset for scrollbar

Summary

Sometime developers need to overlay a control on top of ScrollViewer. In these situations it is good to reduce the size of the scrollbar by setting some kind of begin and end offset.

Below is an example of a media app displaying the media control overlay with Acrylic Background on a ScrollViewer (ListView)

image

 Today                                                    Proposal utilising end offset

A Navigation Header with Acrylic background

image

 Today                                                    Proposal utilising begin offset

Extending ListView into Titlebar

image

 Today                                                    Proposal utilising begin offset

Rationale

  • The alternative to this proposal is to override the ControlTemplate which is messy and difficult to be kept in sync with UI changes happening in WinUI.
  • It is a popular pattern many apps do it. Groove did it with its media controls. Settings app does it with the header

Scope

Capability Priority
Allow to set the begin and end offset Must
Expression animations that was taking scroll position as input should not be impacted Must
Animate when the offset changes (if at that time scrollbar is visible) Should

Important Notes

   public double BeginOffset {get;set;} 
   public double EndOffset {get; set; } 

Open Questions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions