microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Proposal: Enable ItemsView selection via binding

Open weitzhandler opened this issue 6 months ago • 0 comments

Proposal: Enable ItemsView selection via binding

Currently the ItemsView only enables selection by index, and it's achieved by calling itemsView.Select(index). Please convert the currently read-only SelectedItem and SelectedItems properties to dependency properties so we can bind to them efficiently and in a loosely coupled way from the view-model.

Summary

The only way to invoke a selection of items in the ItemsView is by calling itemsView.Select(index) or itemsView.SelectAll(). There should be a better more MVVM-friendly way to achieve that.

Rationale

  • ItemsView is not MVVM-ready
  • ItemsView should enable selection via binding

Scope

Capability Priority
ItemsView.SelectedItem should be a read-write dependency property Must
ItemsView.SelectedItems should either be a read-write dependency property or become a modifiable ObservableCollection Must

weitzhandler avatar Apr 10 '25 05:04 weitzhandler