Problem statement
NavigationView.Items currently only accepts icons as Func<T, PathGeometry?>.
Apps that want richer SVG icons (especially via Aprillz.MewUI.Svg / SvgImageSource)
cannot use them directly in the navigation pane.
Today the practical workaround is to extract SVG path d strings and call
PathGeometry.Parse. That works for simple monochrome icons, but it does not
compose well with multi-path SVGs, tinting, or the SvgImageSource workflow
already documented for Image controls.
Why the current approach is insufficient
- PathGeometry-only icons force a second icon pipeline alongside MewUI.Svg.
- SvgImageSource + Image works elsewhere, but NavigationView cannot consume it.
- Converting every icon to a single path string loses SVG flexibility
(multiple fills, strokes, complex groups) and is hard to maintain for large
Fluent / custom icon packs.
- App-level workarounds (custom sidebar, drawing icons manually) abandon
NavigationView's built-in icon slot and rail/compact layout behavior.
Type of change
Public API change
Expected impact
- App developers using NavigationView + SVG icon packs can keep one icon source.
- Existing PathGeometry-based apps remain unaffected if the API is additive
(overload / optional alternate selector).
- Slightly broader icon rendering path in NavigationView pane items.
Alternatives or tradeoffs
Alternatives already available in app code:
- Keep using PathGeometry.Parse with Fluent SVG
d paths (current workaround).
- Build a custom navigation list instead of NavigationView.
- Rasterize SVGs to bitmaps (worse for DPI / theme tint).
Tradeoffs if added to MewUI:
- Need a clear icon abstraction (PathGeometry vs IImageSource vs Element).
- Pane measurement/layout must handle non-path icons consistently in
expanded / compact / rail modes.
- Prefer additive API to avoid breaking existing PathGeometry callers.
Additional context
Current signature (0.19.1):
.Items(
items,
text: item => item.Text,
icon: item => item.Icon, // PathGeometry only
kind: item => item.Kind,
keySelector: item => item.Key,
content: ...)
Possible directions (any would help):
- Overload icon selector to accept IImageSource / SvgImageSource
- Allow Func<T, Element?> for custom icon content
(e.g. Image { Source = SvgImageSource.From... })
- If PathGeometry-only is intentional, document the recommended SVG → PathGeometry
workflow for NavigationView
Related package: Aprillz.MewUI.Svg (SvgImageSource + Image already works)
Environment:
- Aprillz.MewUI 0.19.1
- Considering Aprillz.MewUI.Svg for navigation icons
Before submitting
Problem statement
NavigationView.Items currently only accepts icons as Func<T, PathGeometry?>.
Apps that want richer SVG icons (especially via Aprillz.MewUI.Svg / SvgImageSource)
cannot use them directly in the navigation pane.
Today the practical workaround is to extract SVG path
dstrings and callPathGeometry.Parse. That works for simple monochrome icons, but it does not
compose well with multi-path SVGs, tinting, or the SvgImageSource workflow
already documented for Image controls.
Why the current approach is insufficient
(multiple fills, strokes, complex groups) and is hard to maintain for large
Fluent / custom icon packs.
NavigationView's built-in icon slot and rail/compact layout behavior.
Type of change
Public API change
Expected impact
(overload / optional alternate selector).
Alternatives or tradeoffs
Alternatives already available in app code:
dpaths (current workaround).Tradeoffs if added to MewUI:
expanded / compact / rail modes.
Additional context
Current signature (0.19.1):
.Items(
items,
text: item => item.Text,
icon: item => item.Icon, // PathGeometry only
kind: item => item.Kind,
keySelector: item => item.Key,
content: ...)
Possible directions (any would help):
(e.g. Image { Source = SvgImageSource.From... })
workflow for NavigationView
Related package: Aprillz.MewUI.Svg (SvgImageSource + Image already works)
Environment:
Before submitting