How should I pass the view model to long press command?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- documentation, mobile-dev
Research direction
Start with docs/maui/behaviors/touch-behavior.md and review the LongPressCommandParameter guidance in the linked article. Determine whether the collection item's view model can be passed through the documented binding, then clarify the article with the supported usage or limitation. Done means the page answers this long-press binding question without requiring issue-thread context.
Written by the indexing model from the issue text.
Description
Type of issue
Missing information
Description
I'm using this behavior in a collection view to display images, and I want to handle the long press command.
LongPressCommandParameter="{Binding .}" However, the currently touched image's bound view model can't be passed to the command, where it shows null as the view model's value.
Page URL
Content source URL
https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/maui/behaviors/touch-behavior.md
Document Version Independent Id
98a8e0a6-ef8e-7427-100f-7b4448e0ffce
Platform Id
28950eda-3f84-b0ac-bd2b-243cce75aa34
Article author
@bijington
Metadata
- ID: 98a8e0a6-ef8e-7427-100f-7b4448e0ffce
- PlatformId: 28950eda-3f84-b0ac-bd2b-243cce75aa34
- Service: dotnet-communitytoolkit
- Sub-service: dotnet-maui-community-toolkit
- Dominant language
- No language data
- Stars
- 168
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MicrosoftDocs/CommunityToolkit
-
dotnet-communitytoolkit/svc dotnet-maui-community-toolkit/subsvc Pri2
Difficulty 1/5 1-3 hours Newbie friendliness 91/100
MicrosoftDocs/CommunityToolkit#651 · 1 comment ·
-
Just a typo? Opencommunity-toolkit/prod dotnet Pri2
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
dotnet-communitytoolkit/prod maui Pri1
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
dotnet dotnet-communitytoolkit/prod Pri1
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
MicrosoftDocs/CommunityToolkit#659 · 1 comment ·
All issues in MicrosoftDocs/CommunityToolkit
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·