这应该很简单。如何将ControlTemplate应用于XAML中的Thumb?
<UserControl.Resources>
<ControlTemplate x:Key="temp">
<Ellipse Width="60" Height="30" Fill="Black"/>
</ControlTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock>Not Dragged</TextBlock>
<Canvas x:Name="foo">
<Thumb Width="150" Height="50" DragDelta="Thumb_DragDelta" x:Name="simpleDrag">
</Thumb>
<TextBlock>Dragged (hopefull)</TextBlock>
</Canvas>
</Grid>
我无法弄清楚如何将“temp”模板应用于Thumb。谢谢!