HandyOrg / HandyOrg/HandyControl

SideMenu控件没办法动态绑定数据吗?

Open
#1,613 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

hc:TransitioningContentControl
<hc:SideMenu BorderThickness="1" Width="200" Margin="32" ItemsSource="{Binding DataList}">
hc:Interaction.Triggers
<hc:EventTrigger EventName="SelectionChanged">
<hc:EventToCommand Command="{Binding SwitchItemCmd}" PassEventArgsToCommand="True" />
</hc:EventTrigger>
</hc:Interaction.Triggers>
<hc:SideMenu Margin="10">
hc:SideMenu.ItemTemplate

<hc:SideMenuItem Header="{Binding MenuHeader}"/>

</hc:SideMenu.ItemTemplate>
</hc:SideMenu>
</hc:SideMenu>
</hc:TransitioningContentControl>

Steps to reproduce the bug

SideMenu控件没办法动态绑定数据吗?试了很久,是不是这个控件只能把菜单写死

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

Visual Studio 2022

Framework type

.Net 6.0

Windows version

May 2021 Update (19043)

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

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

The report shows a WPF SideMenu using ItemsSource, ItemTemplate, and SelectionChanged/EventToCommand; start by inspecting the SideMenu control's binding and item-generation entry points. Confirm whether a DataList can render SideMenuItem instances and whether selection events reach SwitchItemCmd; done when the dynamic menu and command work.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.