Skip to content

windows-reactor: Expose PaneFooter and OpenPaneLength on NavigationView #4669

Description

@ruizlenato

Suggestion

Problem

The windows-reactor NavigationView widget does not expose two important WinUI 3 properties:

  1. PaneFooter accepts a generic UIElement to render at the bottom of the navigation pane. The underlying WinUI NavigationView has SetPaneFooter in its vtable, but the reactor widget does not expose it.
  2. OpenPaneLength controls the width of the pane when expanded. The underlying WinUI NavigationView has SetOpenPaneLength, but the reactor only exposes this on SplitView, not on NavigationView.

Suggestion

PaneFooter

Add a pane_footer field and builder method to NavigationView:

// In widgets/navigation_view.rs
pub struct NavigationView {
    // ... existing fields ...
    pub pane_footer: Option<Box<Element>>,
}

impl NavigationView {
    pub fn pane_footer(mut self, el: impl Into<Element>) -> Self {
        self.pane_footer = Some(Box::new(el.into()));
        self
    }
}

This would require:

  • A new Prop::PaneFooter variant (or reuse an existing element-passing mechanism)
  • A match arm in backend/winui/mod.rs that calls SetPaneFooter with the element's handle
  • The children() method to include the footer element

OpenPaneLength

Add an open_pane_length field and builder method:

pub struct NavigationView {
    // ... existing fields ...
    pub open_pane_length: Option<f64>,
}

impl NavigationView {
    pub fn open_pane_length(mut self, len: f64) -> Self {
        self.open_pane_length = Some(len);
        self
    }
}

This would require a match arm in backend/winui/generated_set_prop.rs:

(Prop::OpenPaneLength, PropValue::F64(v), Handle::NavigationView(h)) => {
    h.SetOpenPaneLength(*v)?;
}

Optionally, also expose CompactPaneLength, ExpandedModeThresholdWidth, and CompactModeThresholdWidth for full control over the adaptive pane behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    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