引用类库:

1、Microsoft.Expression.Interactions

2、System.Windows.Interactivity

 

<Window x:Class="WpfApplication4.MainWindow"
        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:b="http://schemas.microsoft.com/expression/2010/interactions"
        Title="MainWindow" Height="350" Width="525">
    <Grid Background="Gray">
        <i:Interaction.Behaviors>
            <b:MouseDragElementBehavior/>
        </i:Interaction.Behaviors>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <Button Width="100" Height="23" Content="Stop" Click="Button_Click"/>
        </StackPanel>
    </Grid>
</Window>

 

相关文章:

  • 2021-09-01
  • 2022-03-05
  • 2022-01-01
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案