Posts

Showing posts with the label how to

SharePoint's Choice Fields: how to arrange checkboxes or radiobutto in one row

Image
Of course there are multiple reasons to use checkboxes or radiobuttons - even in SharePoint. But the most common problem: if you have more than three choices your form is blowing up. The solution is to arrange them in a row. To do so we need to take a deeper look.

How to embed an image into your WPF application

If you are building an WPF application you could need images as background or as buttons or whatever. With your  first build or debug you will see the images will be stored in a folder that should not change. If you change it the application cannot find its images and crashes. So if your installing this application you will need to make sure the pictures are in the exact place. There are possibilities to make the path of the path dynamic, but even that is not the best solution.  So how to make sure your files will be where your application will be.  The solution is to embed the images, but how..? Of course there are some hacks you need to know. First of all you need to right click on your project in Visual Studio. Go to "Properties" and then "Resources". Add a resource and choose existing file. Choose your image.

How to make sure only one instance is running

Some application cannot be run in multiple instance for several reasons. So you need to avoid a second instance will run, but how? You cannot directly block the execution of your application, so you need to take care of the problem in your code.

jQuery set the click event the right way

Everybody should know multiple ways how to set click events in JavaScript and jQuery. But if there are multiple different ways which one is the right one? First of all what ways do we have? There are the declaratively ways: 1 2 3 4 5 <!-- declaratively example one --> <a href= "javascript:myFunction()" > click me </a> <!-- declaratively example two --> <button onclick= "myFunction()" > Click me </button>