In my WPF application I've got a listbox with DataTemplate defined as follows:
<DataTemplate x:Key="ListBoxTemplate">
<ui:TaskMonthPreview/>
</DataTemplate>
and TaskMonthPreview is my custom control defined as follows:
<UserControl x:Class="Lista.TaskMonthPreview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="30" Width="100">
<UserControl.Resources>
<ResourceDictionary>
<ControlTemplate x:Key="TaskView" TargetType="Thumb">
<Rectangle
Name="rectangle1"
Stroke="Chocolate"
HorizontalAlignment="Left"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Fill="LightSkyBlue"/>
</ControlTemplate>
</ResourceDictionary>
</UserControl.Resources>
<Thumb Name="myThumb" Background="Blue"
Width="100" Height="20" DragDelta="onDragDelta"
DragStarted="onDragStarted" DragCompleted="onDragCompleted" HorizontalAlignment="Left"
Template="{StaticResource TaskView}"/>
</UserControl>
My Thumb in TaskMonthPreview is dragabble but unfortunatelly it cannot be dragged outside the area of TaskMonthPreview. Is is possible to enable dragging my thumb outside the scope of TaskMonthPreview and even outside the scope of listbox?