0
我創建一個WPF/XAML應用程序DragMove()和MouseDragElementBehaviour不能在同一個窗口中工作?
WindowStyle =「無」
因爲這樣我不必使用
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
{
base.OnMouseLeftButtonDown(e);
// Begin dragging the window
this.DragMove();
爲了讓這個窗口可以左右拖動所以屏幕。不過我也想在窗口內使圖像拖能,我準備用
<Image HorizontalAlignment="Right" Height="65" Width="203" Margin="0,278.271,14.434,82.5" Source="Images/Implementation1.png" Stretch="Fill">
<i:Interaction.Behaviors>
<ei:MouseDragElementBehavior ConstrainToParentBounds="True"/>
</i:Interaction.Behaviors>
</Image>
問題做的是,我不能讓他們既可以在同一窗口中工作,因爲他們只會如果函數其他被關閉。任何幫助將不勝感激。