Swipe Buttons On Listview Row - c#

I am currently setting up a new xamarin app which will target UWP / Android and one of the things I need to do is to swipe a row on a list view to show an action button (which will more than likely be an edit / delete button depending on the side of swiping). I have had a look at GestureRecognizers which I have not got to work - this was quite possibly because I was trying to put this on a label control, however, after a couple of days of trying to locate a best practice way of doing this I'm coming up against a brick wall. Suggestions and ideally github repos at this stage to demonstrate a working solution would be really useful.
I have gone around google looking for a solution, I have a subscription with DevExpress and used their grid when I had an Android only app. This worked absolutely brilliantly - however, their xamarin.forms control does not work with UWP.
The expected result is to look the same as a DevExpress grid view: https://documentation.devexpress.com/HelpResource.ashx?help=Xamarin&document=img18128.jpg
Thanks
Chris

Related

How to stick a button to the top of the screen in Xamarin.Forms

I've been trying to get better at implementing UI in Xamarin.Forms. I have been searching online and on my phone for cool layouts and trying to recreate them in Xamarin.Forms to increase my skills. I want to recreate the UI for playlists in Spotify on iOS (possibly Android as well but I don't know). I know the whole solution might be too complicated to post so even just tips on how to get started on something like this or at the very least somewhere to look to learn how to implement a sticky button like they have. I thought about having a hidden button that gets shown when the real button scrolls out of view but I'm wondering if there is a better way. Here is what Spotify looks like:
Button starts stuck to top:
If you scroll up past the top it shows a hidden album art and search:
The when you scroll down the button sticks to the top again:

Any way to stop focussing a WPF textcontrol slowing application update performance?

I'm developing a C# WPF XAML-based Windows desktop application, and the UI is beautifully smooth and slick until I focus a textbox. Once focussed, the update rate of the whole UI is much lower. I'd estimate it all runs at the "full" (?) 60fps originally, dropping to more like 30fps after the text control gains focus. I've dug around all sorts of Microsoft documentation and advice on WPF performance, but nothing seems to mention the mere act of a control gaining focus being a problem. It's quite mystifying. I've tried to use the Windows Performance Toolkit to analyse the issue, but I'm getting nowhere. I've been able to do a klugey workaround in some scenarios with judicious use of Keyboard.ClearFocus() when clicking any other control, which returns the update rate to normal, but it's not great to have to do that.
This issue can be readily replicated - a brand new VS2015 WPF project, with a text box and a button will show the issue (add Keyboard.ClearFocus() to the button's click handler). This demonstrates it's nothing specific to my application code, it's a framework issue.
Does anyone have an idea why the described issue may be occurring, or how I may be able to resolve it?
Update: I've uploaded a sample project showing the issue, here: http://muuh.co.uk/SlowTextbox.zip

How to create WPF dynamic list of paragraphs?

I'm using Elysium for creation Metro-like GUI for Windows 7.
I want to create GUI for app with 3 columns with dynamic content with similar animation like its done in many mobile apps and some websites with Javascript ("infinite scrolling pages").
So you press refresh button and it adds few new feeds to each column with smooth animation.
I'm trying to move away from idea of using Javascript itself for rendering results but I pretty much don't see any other option.
What kind of controls should I use for that or/and how to implement such effect?
Update 1: Looks like its called Pile Board
Update 2: Currently looking into ObservableCollection and Elysium.Extras (DataGrid) combo.
Seems like there's also MahApps as alternative to Elysium with Pile control included.

Drag an image from window in a wpf project to another window in a separate project?

I am very new to WPF and I've tried to find the guides and tutorials about this but haven't found exactly I wanted.
This post has been the closest, a solution for moving an item between two different windows (in the same project). However this limits any other drag and drop features you want to do (e.g. within a canvas).
In a similar fashion, I want to move something (an image, within a listbox specifically) from one app to another (when both are running at the same time).
Any help or tips would be appreciated, thank you!

Change view when using WinForm and MVC

As part of a school project, a group and I will develop a Windows application using C#.
We are not very experienced in C# but has some basic understanding for it. We do however have experience from other languages and platforms.
We would like to build an application in which the layout is split into two primary parts: the menu, which will reside to the left and the content which will be to the right.
The menu will be more or less static and when an entry in the menu is chosen, the content will be changed.
We have not been able to figure out the best way for achieving this nor have we been able to find good material on this. The idea is to have one window and add a view (as far as I can understand, this should be a UserControl?) to this window. This control will be the menu.
Now, our question is if anyone can point us in the right direction to achieve the navigation in the program. Say, when a menu entry is clicked, how will we change the content of the window and how will we manage which view is active? I suppose that every view (in the "content area") will have a controller.
We are interested in the "best practices" for this when using WinForms and the MVC pattern.
We hope that someone can help us further in this project.
If I were you I would seriously consider using WPF instead of winforms.
It, and the use of the MVVM pattern, allows you to do some pretty impressive stuff with far less code than if you are using winforms. If you don't already know winforms then it might also be a slightly less steep learning curve as WPF is a better thought out framework (at least in my opinion).
If you go the WPF route spend some time getting to understand how bindings work and how to bind your ViewModel to the UI. Once you have a good understanding of proper UI separation you are able to do far more than you could with the old WinForms framework.
I found this link quite useful when I first started looking at WPF. Especially the RelayCommand.
If you are using Winforms the options that you have got is:
-dynamically clearing forms and generating content on menu navigation
-using mdi container form, which can be parent to a number of child forms
If you are using for WPF you could use Pages in a Frame control loaded based on used menu selection. You could also use MVVM pattern to build your app.

Categories

Resources