Windowscommunitytoolkit: SwipeTriggerBehavior

Created on 24 Sep 2020  路  8Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

Describe the problem this feature would solve

There is no easy way to detect a swipe interaction in UWP.

Describe the solution

I think a Behavior could make this much easier. I have created a SwipeTriggerBehavior for this. A demo app including the source and video can be found in this repository.

Maybe this is useful for the toolkit.

feature request open discussion

Most helpful comment

Yeah, I think the main thing with behaviors is we're getting enough now that we probably want them to be split out into their own Microsoft.Toolkit.Uwp.UI.Behaviors NuGet package as well so that we don't pull in the Behaviors package for everyone else who may not be using them?

All 8 comments

Hello, 'sonnemaf! Thanks for submitting a new feature request. I've automatically added a vote 馃憤 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

@sonnemaf Thanks for presenting a demo via repo and looks very interesting. Opening the request for discussion with the community members to explore the possibilities of adoption in the toolkit 馃檪

The behavior looks pretty handy!
Not sure it should be in the toolkit though, instead of being added to the XAML Behaviors repo directly? 馃
I've created a new behavior as well (to support the ListView.ItemClick event with commands) and opened a PR there too 馃憤

I already created a PR in the XAML Behaviors repository. It was rejected (closed) because it was a "novelty" behavior, The XAML Behaviors is only for "generic" behaviors.

The toolkit is the best alternative. I also suggested to move all "generic" XAMLs to the toolkit but that idea is also rejected.

Oh, I didn't know they had decided to restrict the main repo in that sense, this makes sense now 馃槉

Personally I think this could be a nice addition to the Microsoft.Toolkit.Uwp.UI.Behaviors namespace, sure 馃殌

@michael-hawker thoughts?

Yeah, I think the main thing with behaviors is we're getting enough now that we probably want them to be split out into their own Microsoft.Toolkit.Uwp.UI.Behaviors NuGet package as well so that we don't pull in the Behaviors package for everyone else who may not be using them?

@sonnemaf we have a working branch where we've created the new Behavior focused package here: https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/dev/new-animations (Microsoft.Toolkit.Uwp.UI.Behaviors)

Did you want to copy over your code to a PR based on this branch in the Toolkit for us to include in the upcoming release?

If you could get your PRs open in the next week or so, I think we should be able to include this one and #3392 and #2713?

Was this page helpful?
0 / 5 - 0 ratings