0
와 텍스트 상자를 이동 내가 제어가 캔버스에 배치됩니다마우스
<UserControl HorizontalAlignment="Left" x:Class="WPFDiagramDesignerControl.Components.UcWBSBlock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="100" Width="100" IsEnabled="True">
<Grid >
<TextBox x:Name="txtBox" IsEnabled="True" Background="AntiqueWhite" Margin="10,10,10,10" TextWrapping="Wrap"> </TextBox>
</Grid>
</UserControl>
이 MyDesigner라는 하나의 텍스트 상자로 구성되어 사용자 지정 WPF 제어 할 수 있습니다.
텍스트 상자를 클릭하고 마우스를 움직여야 캔버스에서 컨트롤을 이동하고 싶습니다. 컨트롤 테두리와 텍스트 상자 사이의 여백을 클릭 할 때 컨트롤을 이동하고 싶지 않습니다. 나는 코드를을 writting 시작은 그러나 내 컨트롤이 이동하지 않습니다 :(그것은이 :
음, 내가 확인해 보겠습니다. 그러나 parentItem은 "this"와 같아야합니다. 귀하의 솔루션이 PreviewMouseDown 이벤트에서 – george
으로 작동한다면, 당신에게 말할 것입니다. parentItem을 this.Parent ... parentItem = this.Parent로 설정하고 있습니다. DesignerItem; –