I'm asking this question after reading this answer on StackOverflow.
The supplied answer works great for allow you to move a whole control. But supposed I have a Usercontrol I've created like so:
<UserControl x:Class="WpfTest.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Border Background="Blue">
<Grid>
<Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="26"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Canvas Grid.Row="0" Background="orange"></Canvas>
<Canvas Grid.Row="1" Background="Purple"></Canvas>
</Grid>
</Border>
</UserControl>
I only want the control to move when I'm mouse clicking on the header part of the control, Grid.Row[0] (orange part). I don't want the control to respond to drag operations when clicking on the rest of the control.
How can I accomplish this?