是否有一个交互式XAML编辑器,可以与WPF一起使用,或者在XamlPadX 4.0中使用VisualStateManager?WPF的任何交互式XAML编辑器?
我试过XamlPadX 4.0,这很棒,直到我尝试使用VisualStateManager进行一些操作时,它会窒息。 Cursory研究表明,VisualStateManager支持在Dotnet 4中得到WPF,而XamlPadX 4则由Dotnet 2.5构建。尝试重定向XamlPadX以使用Dotnet 4尚未成功。
就我而言,混合似乎没有交互模式,只是一个标准的VS样式代码/运行迭代循环。
我已经快速浏览过Kaxaml。它似乎有效,但是相当有限,例如没有视觉树探险家。
通过colinsmith
建议UPDATE混合功能我有VS2012更新2安装,我已经使用混合,但没有成功尝试。例如,输入下面的代码,并从“对象和时间线”面板中选择按钮,结果“对象和时间线”面板显示“(没有故事板打开)”,并且在状态面板中什么也没有。单击Blend中的帮助将我带到MSDN页面,指出“我们很抱歉,无法找到您请求的页面。”并在网上搜索使用Blend for WP20的指导,WPF抛出什么都不会引起什么惊讶,因为WPF的支持仅仅在Blend for VS2012的VS2012 Update 2中增加了,而VS2012 Update 2是几天前才发布的。
<Window x:Class="BlendScratchProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="91" Width="192">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="Button">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="_rootElement">
<Border.Background>
<SolidColorBrush x:Name="_borderBrush" Color="Black"/>
</Border.Background>
<Grid Margin="4">
<Grid.Background>
<SolidColorBrush x:Name="_backgroundBrush" Color="Green"/>
</Grid.Background>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="5"/>
</Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimation Storyboard.TargetName="_borderBrush"
Storyboard.TargetProperty="Color" To="Red" Duration="0:0:0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Window>
你可能已经知道这一点......但总是有表情混合....你可以看看预览http://www.microsoft。com/en-us/download/details.aspx?id = 30702 ...可以与WPF/.NET 4一起工作....不知道它是否需要VS2012存在于您的系统中...查看。或者你正在寻找一个“免费”选项? – 2013-04-05 13:41:12
我在Blend中找不到任何交互模式,是否有一个? – Neutrino 2013-04-05 14:17:21
您需要States面板才能为您的VSM设计状态。 http://www.oshyn.com/_blog/General/post/Using_Visual_State_Manager_and_Toggle_Button/ ...确保您使用的Blend预览版本提及....或者您应该可以使用EXpression Blend 4. Visual Studio 2012 Update 2 ,现在将WPF支持构建到Visual Studio Blend中。 – 2013-04-05 14:24:40