WPF,请问StackPanel容器
<StackPanel>
<Button Margin="5" Content="Sample Button" Background="{StaticResource myBrush}" Height="83" Width="151" />
<Rectangle Margin="5" Width="100" Height="100" Fill="{StaticResource myBrush}" />
</StackPanel>
上面的代码,为什么我在StackPanel中拖动Button或者Rectangle,不能随心所欲的移动位置呢,要弹回去呢?不像winform中的Panel,可以随意放置位置。
刚刚学WPF,还请前辈指点,谢谢!!!