How to override default drag&drop cursors when the darg source is outside my application - wpf

In Drag&Drop, if I want to customize the cursors, I can subscribe to GiveFeedback on the drag source and set e.UseDefaultCursors = false, and the render the content I want.
But that only work if the drag source is my application. If I want to do the same when dragging files from explorer, for example, I can not subscribe to that event because I only have access to the drop target and not to the drag source.
Is there any other way to disable the built in cursors and copy and link signs so I can render my own in that case?

Hmm... this probably wont help at all (i hope it does somehow) but in visual basic, using a language in the .NET Framework, when creating a form, there is an option for drag and drop to disable it, so whatever compiler your using, there maybe some sort of option in there.
I would look specifically at what you are working with and read up on the drag and dropping, so maybe something to do with a form/GUI.
I hope this has helped in some way, if not, i apologize and gl.

Related

How to configure Combobox from Gui Builder?

I can not make combobox from gui builder.
I drag and drop a combobox into place from Components Pallete/Core Combonets.
I am setting two values as is shown in the screen shot bellow:
I am saving the From in the gui builder and then I hit the run on netbeans. On simulator the combobix is shown empty as you can see on the next screenshot:
am I dong something wrong?
This seems to be a bug in the GUI builder. We generally recommend avoiding combo boxes so people don't test this much. Please file an issue here. As a workaround just use setModel within the constructor and define the elements that go in.

Coded UI Test - get my custom object (WinForms)?

I want to create an automated UI test that will test my syncfusion grid. My problem is that the recorder can't recognize this control (or any syncfusion control). I've searched a lot in the internet but I couldn't find any extension so the recorder will recognize my controls (I'm using WinForms, not WPF!), or at least a way to extend the recorder abilities so syncfusion's controls will be recognized somehow.
Is there any easy way to extend the recorder? Or is there any extension available?
Or maybe can I get the grid object from the WinClient that the recorder generates?
Thanks!
Start your program. Run the Spy++ utility. Type Ctrl+F to start the finder tool and drag the bulls-eye onto your form. Ok, Synchronize and have a look-see at the windows that are visible in the tree. If you see regular Windows Forms controls, like a Button or a Label, but not any of the SyncFusion controls then you've probably found the source of the problem.
Component vendors that try to improve .NET controls typically do so by creating 'window-less' controls. They are not really controls, they don't derive from the Control class and don't have a Handle property. They use the surface of the parent to draw themselves, making them look just like controls. The .NET ToolStripItem classes do this. And this is also the approach WPF uses.
The big advantage is that they render quickly and support all kinds of effects that regular controls can't support, like transparency, rotation and anti-aliased window edges. The big disadvantage is that the kind of tool that you are using suddenly gets noddy and can't find the control back. Because they work by finding the Windows window back on your form, there is no window for them.
This is a hard problem to solve, the 'control' exists only in memory and there's no good way for a tool to find it back. Using Accessibility is about the only other way for such a tool to find a control that I can think of. Which would have to be implemented by the control vendor first, a somewhat obscure feature that gets easily overlooked. You really do need the help of the vendor to find a workaround for this. Shouldn't be a problem, that's why you paid them the big money.
This is Rajadurai from Syncfusion. Thank you for your interest in Syncfusion Products. To make UI Test Automation recognize Syncfusion grids(WinForms), some internal support need to be provided in grid whose implementation is in progress and about to be completed. Please submit an incident through Direct-Trac for any further related inquiries in the following link.
http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac
You can also contact us through support#syncfusion.com. We are happy to assist you.
Regards,
Rajadurai

Image drag and drop in wpf application

I want to drag and drop an image on wpf application form. Can anyone provide me the code and other links for that?
If you want to D&D within a single WPF application; then this code should get you going:
Drag and Drop within WPF
If you want to D&D between WPF applications, or between another non-WPF application you've got some options, but probably the easiest is to use a bitmap transfer (it takes a bit more code, so let me know and I'll publish it).

Creating a winforms app that allows drag and dropping of custom 'widgets'

I want to create a winforms application, this application will be similiar to the vs.net winforms designer (in certain aspects).
Basically it is going to be a blank page, where the user can drag and drop a bunch of 'widget's onto the screen. The widgets are basically custom images that I will create, that the user can resize, and it has some text on it by default which the user can double click on it to change the text.
Is this doable in winforms? If yes, what are the key aspects that I have to learn?
This is pretty easy to do in WinForms. Check out basic drag and drop. It's targeted toward 2.0. You'll use the DoDragDrop() method and capture data in drag and drop events. It requires some verbosity, but it gets the job done.
If you're keen on using WPF, take a look at MSDN's topic.

Is a drag-over checkbox list useful?

A while ago I created a drag-over check box list which allows you to check many check boxes in a single gesture. Do you think it is viable and usable on the web where people might not know how to use it. The default behaviour still works for the individual check boxes.
1 - The idea
The idea is nice and can probably be used in professional applications where you have direct contact with users and can explain them how things work, but not necessarily on public websites where users don't want to RTFM and are just looking for familiar behaviours. Unless it was just a sample exercise or a control meant to be included it in a control pack, it violates the YAGNI principle ;)
2 - The implementation
You certainly noticed that the implementation is buggy (at least on IE7 and FF3.1B2). Sometimes, a gesture above all checkboxes will select all of them but one or two. Moving the mouse over the div's above or below the list will stop the drag (I know it's a "feature", but it's not very user friendly). I Checked the source code and to be honnest, while it looks pretty neat, I just didn't want to deal with it because it is plain javascript. Don't you know that...
3 - Possible improvements
...you can write less and do more with a javascript library, typically jQuery. I would completely rewrite this control as a jQuery plugin. It will provide you with a lot of tools to make your code much easier to write, maintain and extend. Just try it, you'll love it. This is from a technical point of view. From a user point of view, try to make you control as familiar as possible, like what Angela suggested, windows explorer : a nice selection rectangle, the ability to use shit + click, or something like that. Finally, remember that for many windows checklistbox users, "selected" and "checked" are two different things.
The demo definitely needs a few enhancements to make it even a little bit useful (although I am not sure if it would be enough):
Allow the dragging to start somewhere that is not a check box.
Allow selection by dragging over the labels as well.
This problem seems similar to the action of selecting multiple files in a file explorer like Windows Explorer. Maybe it can work like the action of selecting multiple files by dragging a rectangle shape around the items to be selected (select one corner, drag to the other corner)? This has the advantage of being similar to an interface element that people may already be familiar with.
For some reason I can't open your link (it says my ip address was blocked). But I think what you're looking for is what I already did in jquery, I uploaded a plugin which I basically ported from crossbrowser.com's dragcheck functionality, it was to be found at http://plugins.jquery.com/project/dragCheck but currently the jquery plugin site is being revamped and my plugin has disappeared. I'm trying to see if they're going to put it back up or if I have to create a new project again...
Anyways until we get that worked out you can see a demo here: http://jsbin.com/ibihi

Resources