我发现VS2015的Visual Studio 2015,IIS Express和Update 1存在问题.我可以毫无问题地执行我的调试会话,但是当我停止调试会话时,IIS Express仍然在运行.我希望IIS Express在停止调试会话时停止运行.
我怎么能这样做?
我在带有caliburn的Windows Phone 8上开发了应用程序.在我的一个页面上,我在datatemplate中有一个按钮,我在鼠标点击时设置了触发器:
<DataTemplate>
<Button>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro1:ActionMessage MethodName="GoToPage">
<micro1:Parameter Value="{Binding Path=PageId}" />
</micro1:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
<TextBlock Text="{Binding Path=PageDescription}" TextWrapping="Wrap"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
</DataTemplate>
Run Code Online (Sandbox Code Playgroud)
它工作正常.现在我已经在Windows Phone 8.1(winrt)上创建了新的应用程序,但是使用相同的代码我在触发器上出错了.我怎么能在wp 8.1上做到这一点?我找到了winrttriggers.codeplex.com,但它与wp 8.1平台不兼容.
非常感谢!
编辑1:
使用您的代码,我的视图不会触发命令.我现在有:
<i:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Click">
<core:InvokeCommandAction Command="{Binding OpenPageCommand}" CommandParameter="{Binding Path=PageId}" />
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
Run Code Online (Sandbox Code Playgroud)
我的命令是委托命令:
public class DelegateCommand<T> : ICommand
{
private readonly Func<T, bool> _canExecuteMethod;
private readonly Action<T> _executeMethod;
#region Constructors
public DelegateCommand(Action<T> executeMethod)
: this(executeMethod, null)
{
}
public DelegateCommand(Action<T> executeMethod, Func<T, bool> canExecuteMethod)
{
_executeMethod = …Run Code Online (Sandbox Code Playgroud)