Menus appear to the left of cursor

I recently had an odd behaviour on my SurfacePro4. I’m sure this only started happening after a recent automatic update… thanks Windows10 & Microsoft!
menusToTheLeft
If you start getting this in your applications, then I suggest you follow these steps to resolve it.

The following works on Windows 10:

  1. Press the Windows logo key+R to bring up the Run dialog box. In the Open line, copy/paste the following text:
    shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E}
  2. Press OK
  3. This will start the Tablet PC Settings configuration dialog (Even if you do not have a Tablet PC).Select the Other Tab.In the Handedness section, place a check mark in the Left Handed option.
  4. Click OK.

handedness

Create “Press back again to exit” toast on Xamarin Androd

I found this relatively simple to implement.

AndroidToast

In the Activity that represents the final view of your application, i.e. the one that you want the user to see the Toast popup message, add this override code:

private double _backPressTime = 0;

public override void OnBackPressed()
{
	double t = new TimeSpan(DateTime.Now.Ticks).TotalMilliseconds;

	if (t - _backPressTime > 2000) // i.e. 2000 milliseconds
	{
		_backPressTime = t;
		Toast.MakeText(this, "Press back again to exit", ToastLength.Short)
				.Show();
	}
	else
	{
		base.OnBackPressed(); // now we can quit
	}
}

Visual Studio Dark Theme with light designer background color

I found this extremely useful at times because I like to use a Dark theme in Visual Studio. Making the following change in App.xaml means I can see all of my controls properly in the designer while I’m developing my app.

<Style TargetType="{x:Type UserControl}">
    <Style.Triggers>
        <Trigger Property="ComponentModel:DesignerProperties.IsInDesignMode" Value="true">
            <Setter Property="Background" Value="White" />
        </Trigger>
    </Style.Triggers>
</Style>