# Change Windows Handedness Settings in Code Behind

## Environment

<table>
    <tbody>
	    <tr>
	    	<th scope="row">Product Version</th>
	    	<td>2019.2.618</td>
	    </tr>
	    <tr>
	    	<th scope="row">Product</th>
	    	<td>Progress® Telerik® UI for WPF</td>
	    </tr>
    </tbody>
</table>

## Description

How to change windows handedness settings in code behind.

## Solution

To change the Windows Handedness settings in code, you can set the **SystemParameters.MenuDropAlignment** property. The method need to be called after the InitializeComponent() method.

```C#
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			InitializeComponent();
			SetAlignment();
		}
	}

	public static void SetAlignment()
	{
		var ifLeft = SystemParameters.MenuDropAlignment;	  
		if (ifLeft)
		{
			var t = typeof(SystemParameters);
			var field = t.GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static);
			field.SetValue(null, false);
		}
	}
```
