I'm developing a WPF application where I have various controls (both out of the box WPF controls and some Telerik controls). In one of the sections of the application is a grid with various items that can be dragged around to rearrange the position of the item on the grid in relation to other items.
When loading up the application the default tab order goes through all the various controls as expected and once it reaches the grid section it sequentially tabs through each control from top left down to the bottom right - as expected.
Then after I drag one of the items within the grid to another location all of the items shuffle along however when I try to tab through the items it does not recognise the new order of the tiles.
My question is, how am I able to reset the tabbing order on the controls to reflect the latest position of them within the grid?
Notes:
The controls which I am using are built for drag and drop.
The control is called a RadTileView (Telerik control), the sub-items which I am dragging and dropping are called RadTileViewItems
I don't believe that their is anything within the Telerik documentation that addresses this specifically
Surely this isn't a Telerik only problem; as it is possible to create custom drag and drop functionality within WPF so this would possibly be an issue there too.
I am currently implementing MVVM.
Related
I'm struggling to find clear and meaningful information on WPF and all the decent examples I find for what I want are in WinForms. Within a .NET 5 WPF application I've implemented dragging files from the file system into the application and display the filenames, for specific allowed extensions. I now want to add the ability to click and drag items with the list to re-order them (I hate having up and down buttons alongside the listbox). I would also like to display a red line between the items as a guide for where the item will be inserted when the mouse button is released. Can anyone suggest a pre-made preferably free library that provides a control that already does that OR point me to some current examples?
I'm on Windows 10, maintaining a C# Desktop application using Visual Studio 2019, putting controls onto a Form (System.Windows.Forms.Form). I'm attempting to change an application; reworking where the controls go etc., so there is code and control design that I want to keep and put into different locations. I am using the visual designer and connecting to code using the control events (as opposed to creating the forms dynamically).
I have Document Outline visible on the left; I cut several groups of controls I intend to paste back later, so all that one particular TableLayoutPanel has in it now is two buttons. But I cannot find those buttons in the designer. I can see them in the Document Outline; they're in a TableLayoutPanel (in a group box in another TableLayoutPanel on a TabPage, etc.). When I click on a control in the Document Outline, the corresponding control is usually highlighted in the View; however, when I click on either of these buttons, nothing is highlighted in the view.
I tried resizing the Form (which determines the sizes of all these panels/tableLayoutPanels set to 'fill'); it's currently at 1367,850; one of the button locations shows as 664,752, but I don't know in what coordinate system that applies. I tried manually setting the location to 50,50 in the properties window, but it won't let me change that there.
These buttons appear at the bottom of the form; they've never appeared there, but I've noticed sometimes the designer has shown dotted-line outlines of them outside the form entirely. They appear in place when the application is run.
I've tried changing between the 100% scaling and the 125% scaling; that didn't help. For two buttons, I suppose I could delete them and recreate them, but there are many, many controls on this UI, and if there's some trick to making things appear I'd like to know about it.
Is there a trick to this that I'm missing?
I have this problem: In my app, I need to show custom user control, for each element of the list that is provided from database at runtime. Each user control, when created, contains around 30 User objects (buttons, grid, labels, combo boxes etc), so, when the list contains over 300 elements, the limit of allowed USER Objects is reached.
There are no memory leaks, Handles are fine, GDI Objects are also fine. All the controls are added to a TableLayout.
Has anyone had a similar problem, and how did you fix it?
Is there any other way except paging or drawing each control dynamically by controlling if it should be visible on screen, based on the scroll position of the table layout?
Thanks in advanced.
I've written a Windows Store-type app where you drag Player objects back and forth between two Grids (onField and Sideline). Worked great, but you could only move by (1) tap Player (2) tap target position. Then I decided I wanted to also let the user drag Players. I tried adding a thumb to the Players ... considered and rejected the possibility of using a Canvas.
All signs pointed to ListView or Gridview solutions, so I tried changing the onField and Sideline Grids to GridViews, but couldn't see any way to get the layout+sizing I wanted for the positions. Finally, I put a Gridview in each cell of the big layout grids. This worked, but at a cost of latency in moving Players between positions as well as lag in certain sorting operations. Also, the drag operations only work if the initial drag direction is downward (???).
TLDR: GridView and ListView solutions seem sub-par for my grid-to-grid drag-and-drop needs.
In the WinRT xaml framework only GridView and ListView support drag and drop operations. I have no idea why but that's just the case.
This doesn't stop you creating your own but you really have to start from scratch which is a pain in the ass since you can't make use of the AllowDrop property etc.
You may have some luck porting the Silverlight Drag and Drop library to WinRT but it's not something I've tried.
I just tested the ListView control in Windows 8.1 for my Windows Store application. I really like the Reordering and Dragging of Items in the ListView and it is obviously required to use inside the Flyout for my application.
Unfortunately i get some problem with the Dragging and ReOrdering of ListView items when i use inside the Flyout. Begin with, Dragging of Items are working fine as expected in the normal display. If i use inside of Flyout, Dragging adorner is not visible over the Flyout and instead it comes beneath the Flyout.
I have attached the screenshots in the normal and Flyout display.
Sample has been attached in the below SkyDrive link. It would be helpful to you guys to grasp more information about the problem.
https://skydrive.live.com/embed?cid=89346CF5C45CEB8C&resid=89346CF5C45CEB8C%212942&authkey=APwj9svhnGFMqwY
This is not going to be a satisfying answer. I have been struggling with the same issue for a while now. I decided to move the reordering to the top AppBar only to discover that the same issue shows up there too.
I found an existing question on msdn and added my own comment and according to a Microsoft employee this is not a bug but a feature:
http://social.msdn.microsoft.com/Forums/windowsapps/en-US/c1add91a-e887-4d08-a3f8-884ec22239f6/dragged-gridview-item-is-not-visible-when-it-is-dragged-over-appbar
As for a solution:
You can change your design and move the reordering out of the settings flyout into the main screen.
You make your own flyout / top application bar control.