How to remove selection rectangle using CSS

Have you ever noticed that when you click a link (in Firefox,IE etc) a dotted rectangle appears around it? (see the image above)

I don’t have a problem with it. But if you find it boring and want to get rid of it. Then I’ve the best solution for you. You can get rid of it with one line of code.

All you have to do is to insert this into your CSS:

And those rectangles (or outlines) will never appear again.

Read More

Drag and Drop using C#

I was working on an App and needed Drag & Drop support for it. I thought it’ll be complicated but its very easy. Here’s how its done:

For this tutorial I’ll be using a listBox. You can use any control but make sure you set the “AllowDrop” to “true“.

Checking what has been dragged

Select the listBox and add the DragEnter event.

Add this code:

The above code first makes sure that files are dragged and not text, folders etc; and then allows the files to be dragged into the control.

(more…)

Read More