title: How to disable resizing of a UserControl in WPF
body: <p>How to:</p>
  
  <ol>
  <li>Disable resizing for this usercontrol.  In other words, when the user grabs the corners or the sides of this usercontrol with a mouse, I dont want the user to be able to  change the size of the usercontrol?</li>
  <li>Or if there is no way to stop resizing then how do I only allow the right side of the usercontrol dragged?</li>
  </ol>
  
  
  
  <pre><code>  &lt;UserControl x:Class="MyEditor.MyDialog"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           d:DesignHeight="152" d:DesignWidth="590" HorizontalContentAlignment="Right" MinWidth="{Binding ElementName=VariableType}" MinHeight="{Binding RelativeSource={RelativeSource Self}}"&gt;
  &lt;Grid Width="591" Height="147" MinWidth="{Binding ElementName=VariableTypeTextBox}"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="137*" /&gt;
          &lt;ColumnDefinition Width="454*" MinWidth="250" /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Button Content="Cancel" Height="23" Margin="0,94,7,0" Name="CancelButton" VerticalAlignment="Top" Click="CancelButton_Click" Grid.Column="1" HorizontalAlignment="Right" Width="75" HorizontalContentAlignment="Center" VerticalContentAlignment="Top" /&gt;
      &lt;Button Content="Create" Height="23" Margin="0,94,108,0" Name="CreateButton" VerticalAlignment="Top" Click="CreateButton_Click" Grid.Column="1" HorizontalAlignment="Right" Width="75" HorizontalContentAlignment="Center" VerticalContentAlignment="Top" /&gt;
      &lt;Label Content="Variable Name " Height="28" Margin="0,12,29,0" Name="VariableName" VerticalAlignment="Top" HorizontalAlignment="Right" Width="96" Target="{Binding}" HorizontalContentAlignment="Right" /&gt;
      &lt;TextBox Height="29" Margin="0,11,7,0" Name="VarNameTextBox" VerticalAlignment="Top" KeyDown="OnKeyDownHandler" MouseLeave="MouseLeaveHandler" LostFocus="LostFocusHandler" Grid.Column="1" HorizontalAlignment="Stretch" /&gt;
      &lt;Label Content="Variable Type" Height="28" Margin="0,0,29,73" Name="VariableType" VerticalAlignment="Bottom" HorizontalContentAlignment="Right" HorizontalAlignment="Right" Width="96" /&gt;
      &lt;TextBox Height="23" Margin="0,51,7,0"  Name="VariableTypeTextBox" VerticalAlignment="Top" IsReadOnly="True" Background="Silver" Foreground="Black" Grid.Column="1" HorizontalAlignment="Stretch"  Width="AUTO" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>