Author: John Rah

Visual Studio Environment Set Up Tips

We all like our development environment set up our own way but I wanted to put together a list of the handy tips and tricks I use every day when developing in Visual Studio with VB.Net. Keyboard Shortcuts Code Formatting CTRL + M + M   Collapse/Expand the current code regionDepends where your cursor is as to what region will be affected. If inside a sub for example it will only work on the sub itself. CTRL + M + O   Collapse DefinitionsDo this inside a #Region to collapse all subs inside that region but leave the region...

Read More

Uploading files with Windows.Networking.BackgroundTransfer

Uploading (or downloading) large files to your web server has always been a dangerous process. Too many users with large files can cause server overload, users trying to upload files beyond the accepted server size, giving reliable feedback to the user while uploading and handling file interruptions are common causes. So when I had to build uploading large files into a UWP app I really didn’t want to rely on the standard HTTP Post method. Thankfully there is an awesome API built in to the framework called Background Transfer. Windows.Networking.BackgroundTransfer Background Transfer has some really great features that tie...

Read More

Telerik RadDataGrid Hints and Tips

The Telerik RadDataGrid is perfect for displaying lots of data on any size screen in your UWP app. There’s just a few little, not so obvious tricks and tips which isn’t covered in their documentation. Working with Template Columns Let’s say I have a data source and one of the fields is a phone number. What I want to do is display an icon of a phone in front of the number in my data grid cell and drop the phone number into a HyperlinkButton so that the user can press on it to call the number. This is...

Read More

XAML Designer slows me down

One of the biggest workflow stoppers I have when developing UWP apps is visual studio itself. The XAML designer has always been very slow but it also gets in the way when debugging and general coding. You can disable the XAML designer and this makes a massive difference but it’s also nice to still be able to visually see your pages while coding. The answer is to use Blend. It actually has a better XAML designer than visual studio (the built in storyboarding is awesome) and you can have both open at the same time. First let’s disable the...

Read More

Close Content Dialog in Code Behind

Have a look at this simple bit of code: ... Dim result As ContentDialogResult = Await cldEdit.ShowAsync() If result = ContentDialogResult.Primary Then DoTextChange() End If ... Looks pretty straight forward? If the content dialog return result is that the primary button has been pressed then call DoTextChange(). That all works well if the users presses the primary button but what happens if you want your dialog control to act like a standard WinForms dialog and accept Enter or Cancel keyboard presses to close the content dialog? Have a look at this code: Private Sub txtEdit_KeyUp(sender As Object, e As...

Read More