WPF拖动总结

https://www.cnblogs.com/DebugLZQ/archive/2013/05/07/3062733.html

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"  x:Class="WPFDragMoveBlend.MainWindow"       
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Rectangle Fill="Red" Stroke="Black" Margin="145,82,164,50" Width="200" Height="180" >            
            <i:Interaction.Behaviors>
                <ei:MouseDragElementBehavior/>
            </i:Interaction.Behaviors>
        </Rectangle>
    </Grid>
</Window>

猜你喜欢

转载自www.cnblogs.com/robertyao/p/10251507.html
今日推荐