lepoco / lepoco/wpfui

no way to dynamically change the breadcrumb title in the navigation

Open
#985 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Sometimes we need to dynamically provide page titles, such as modifyXXX, addXXX, XXXinformation, etc。
I hope to obtain these titles through implementing interfaces, which should also dynamically generate the content of the navgationItem, making it more convenient for us。
Each of these navigationItem has an independent Id for each object.

另:dataContext 也应该提供给接口方法,而不是frameworkViewContent.DataContext,因为frameworkViewContent.DataContext应该是viewmodel,viewmodel的初始化应该交给页面。我们有理由相信初始化过程是有一定业务逻辑的,且viewmode与页面的绑定应该交给页面本身,而不是外部。

所以INavigableView这个接口不应该如此简单!!

再另:internal 关键字是个好东西,但是有些工具方法,工具类能否public;
private bool TryToNavigateWithoutINavigationViewItem;private bool NavigateInternal( 这些方法能否改为 protecte ,否则,即使我继承了NavigateView也不好处理,毕竟这些方法的上层方法都是 public virtual 。

该死的,NavigationStackOnCollectionChanged也是私有的,我清空事件也麻烦。

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

OS version

No response

.NET version

No response

WPF-UI NuGet version

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing INavigableView and the navigation implementation, especially TryToNavigateWithoutINavigationViewItem, NavigateInternal, and NavigationStackOnCollectionChanged. Clarify the intended API for dynamic breadcrumb titles, navigation item content, DataContext, and subclass customization before identifying tests. Done should include an agreed design and coverage for the requested navigation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.