VS Code – Emmet is built in

Earlier posts on Emmet.

And if you go here, you see confirmation that it is part of VS Code.
By default, the tab key is not enabled for Emmet completion. Want that?

"emmet.triggerExpansionOnTab": true

Komplete: Strummed Acoustic

As I couldn’t get the lovely Dell XPS-13 on Black Friday at the right price, I went for the reduction that Native Instruments were offering on the Komplete 11 upgrade (£79.50, now back up to £159). The items of most interest to me were Strummed Acoustic, and India.

I did a few bars (right-click to download the mp3 is easiest) on Strummed Acoustic – disgracefully simple, and doubtless cheating, but if a nice clean tone helps with your composition thoughts, I say why not. Chords are F, A, G, Bb.

XAML in UWP: Basic examples

Mostly just playing with height, width, basic styles. Gist.

Prism: INotifyPropertyChanged implementation usage with BindableBase

Did one of these 3 years back for Windows Phone 8.1 I guess.

Gist for this new one here.

Step 0 – In Visual Studio, start a new Blank App (Universal Windows)

Step 1 – In Visual Studio, install Prism.Windows

PM> Install-Package prism.Windows -Version 6.3

Note that doing this caused prism.Windows to appear in the project references.

Step 2 – to start off tidy, add folders View, Model, ViewModel to the project

Step 3 – create a viewmodel file(s) (e.g. MahVm.cs as below),  and follow the code below, noting that MahVm inherits from BindableBase (once you add in the using for Prism.Mvvm)


WPF/MVVM: Minimal implementation

Er, why? At work, we have no Windows 10, so the choices are Silverlight, or WPF. WPF then.

As you might expect, comparing this with the previous UWP post, the model and view model parts are identical, precisely because the view model depends on the model, but the view model is not aware of the view implementation (to discuss). So the only thing that needs to change is the view.

Some differences in principle I found (nothing surprising maybe, but worth knowing, for me):

In UWP, I could just drag the XAML and its code-behind under a View folder, and everything would just build. In contrast, in WPF, just dragging caused a build failure, because the StartupUri in App.xaml was not automatically updated to change the relative path. So you need to update that, as shown in the pink underline:

Linking the view to the view model

There are possibly countless ways to do this.. but I only know, or at least can be bothered with, 2.

DataContext in the code-behind, binding referenced in the XAML

No update in the code-behind, XAML handles it all

UWP/MVVM: minimal implementation

And barely that. Code

Azure: no RDP available

Summary: normally, when I create a VM, the RDP connection is setup by default. But tonight, the Connect button on the portal was greyed out, and the RDP link in my local RDP Manager just dumbly timed out. This shows the things to check and add to resolve.

(This before I met the problem). Decided to treat myself to an SSD…

No screenshot, but the VM overview, once created and running, shows the VM both  running AND connectable. However this time the Connect button was greyed out. So from the menu for the VM, I selected Inbound security rules…

This showed that I indeed had no RDP rule:

I went ahead and added a rule…


and after a while it is there:

Note that a refresh of the portal left the Connect button still grey, but my DNS entry from the RDP manager now worked, and that’s all I need:

Job done.