Do we have a way to activate mouse gesture on UWP Desktop for a computer that does not have touch capability? On IOS (in the simulator) we can use the mouse to do PullToRefresh or CellSwipe on Listview.
I use Xamarin.forms
The problem here is that the ListView control in Xamarin.Forms doesn't Support PullToRefresh or CellSwipe on UWP. So you have to implement these functionalities by yourself and you can use the code provided by Shubham Sahu in the comments or you take a look at third pary libraries like Syncfusion. They provide also a ListView Control which is already able to handle PullToRefresh or CellSwipe on UWP.
Related
Is it possible to implement a draggable view with Xamarin View? Is there basically an event that I can use that gets triggered when a finger is pressed on the screen, then moved and then released without having to use native Android/iOS code? I don't mean a swipe event, I know this exists. I am looking for a event so I can let the user be able to drag a rectangle across the screen for example.
Looked for it on the internet, but can only seem to find just normal Touch, Swipe and Tap events. (Although I found it is possible using native Android/IOS code.
How do I create a platform-specific custom renderer within a Xamarin.Forms class library?
I'm creating a Xamarin Forms class library that allows me to expand a picker's list with a tap anywhere on the control. That means I need to open the picker's list programmatically within the control's Tapped event handler.
This is trivial in the Android and iOS picker implementations - just a call to the picker's .Focus() method. However, the .Focus() method of the UWP's picker doesn't respond the same way - mainly because UWP must also handle mouse events, not just touch events.
Conceptually no problem, though, since I should be able to create a custom renderer for UWP to set the combobox's .DropDown property within the Tapped even handler.
Except...I'm not sure how to create a platform-specific custom renderer within a class library, since - unlike a normal Xamarin.Forms project - there are no platform-specific projects in which to implement custom renderers. Unfortunately, I haven't been able to find information anywhere about how to do this.
I have a view in my Xamarin forms application where I need to detect if the user is interacting with the screen or not, and go back to the previous view afteer some time if there is no activity.
Is there a simple way to detect it from my ViewModel?
Otherwise, detecting the scrolling on a ListView can be enough. But the ListView has no "Scrolled" event... Maybe with a GestureRecognizer ?
What can I do ?
This was interesting so I tried it on a project I am working on
I added this to the scrollview which contains all the views in my page but you can add it to any view you want:
<ScrollView.GestureRecognizers>
<TapGestureRecognizer Command="{Binding HelpClickedCommand}" NumberOfTapsRequired="1" />
</ScrollView.GestureRecognizers>
It's working fine and the command is fired when you tab on the screen but not when you swipe or scroll.
I think the new update of Xamarin will include the Swipe gesture but for now, many people implemented the swipe using pan gesture and some other simple gestures.
Here is a nice article I found with sample code in GitHub and I am sure that I found a nice example with all gestures. If I found it I will update you
Gesture Recognizers with Xamarin.Forms
I have developed a Xamarin forms app for Android and I have a listview and one of devices where I test it has a keyboard, so I use the device with arrow in order to control instead the mouse. But the app that I have developed, doesn’t work with keyboard.
Do you know what should I do in order to work with arrow in order to select item of listview?
Thank you
i want realize a page like the one below, using xamarin.forms mixing up some renderers.
This is a pure Android example, and it works fine http://blog.iamsuleiman.com/toolbar-animation-with-android-design-support-library/
but how to achieve it with .forms?
As shown in the example code, the page is composed by a
CoordinatorLayout
. AppBarLayout
.. CollapsingToolbarLayout
... ImageView (etc...)
. RecycleView --> It should be fine use the .forms listview here, but how?
If you insist on forms project and not native I would go by inserting complete native page into xamarin forms project. You can find more info how to create a renderer for native page in forms: https://blog.xamarin.com/customize-your-xamarin-forms-app-with-pages-for-each-platform/