【发布时间】:2011-05-17 14:18:06
【问题描述】:
我正在尝试通过表情混合来探索行为。我已经在各种教程中看到了在线使用的鼠标拖动,但是我无法让它工作。这是示例代码 - 这就是全部内容......
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" mc:Ignorable="d"
x:Class="VsmTest.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<Button Content="Button" Height="25" Width="100">
<i:Interaction.Behaviors>
<ei:MouseDragElementBehavior/>
</i:Interaction.Behaviors>
</Button>
</Grid>
据我所知,我现在应该可以拖动那个按钮,但它不起作用 - 嗯......我有什么遗漏吗?我见过的大多数教程都使用 blend 3,所以它看起来有点不同,所以也许我在那里遗漏了一些东西。
谢谢!
【问题讨论】:
标签: wpf expression-blend