[UWP]在发布模式UWP应用程序中的ChangePropertyAction中发生异常 [英] [UWP] Exception occurs in ChangePropertyAction in release mode UWP application

查看:60
本文介绍了[UWP]在发布模式UWP应用程序中的ChangePropertyAction中发生异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个UWP应用程序(Win 10 build 10240 w / updates,VS2015 RTM)。 我在安装VS2015 RTM后开始使用干净的Blank应用程序。


我正在使用Behaviors SDK。 我有一个带有ChangePropertyAction的DataTriggerBehavior。 代码在调试模式下工作正常,但是当我在发布模式下构建时会抛出异常。 我目前的目标架构是x86。例外:


TestChangePropertyAction.exe中0x551819E8(Windows.UI.Xaml.dll)的未处理异常:0xC000027B:发生了应用程序内部异常(参数:0x08C518F0,0x00000003)。


代码:

< Page 
x:Class =" TestChangePropertyAction.MainPage"
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 =" using:Microsoft.Xaml.Interactivity"
xmlns:ic =" using:Microsoft.Xaml.Interactions.Core"
mc:Ignorable =" d">

< Grid Background =" {ThemeResource ApplicationPageBackgroundThemeBrush}">
< Grid.RowDefinitions>
< RowDefinition Height =" Auto" />
< RowDefinition />
< /Grid.RowDefinitions>
< CheckBox x:Name =" RedVsBlue" Margin =" 40,40,20,0"> Red or Blue< / CheckBox>
< Rectangle x:Name =" rect" Grid.Row = QUOT 1 QUOT;宽度= QUOT; 100"高度= QUOT; 100">
< i:Interaction.Behaviors>
< ic:DataTriggerBehavior
Binding =" {Binding ElementName = RedVsBlue,Path = IsChecked}"
Value =" True" ComparisonCondition = QUOT;等">
< ic:ChangePropertyAction PropertyName =" Fill"值= QUOT;红色" />
< / ic:DataTriggerBehavior>
< ic:DataTriggerBehavior
Binding =" {Binding ElementName = RedVsBlue,Path = IsChecked}"
Value =" False" ComparisonCondition = QUOT;等">
< ic:ChangePropertyAction PropertyName =" Fill"值= QUOT;蓝色" />
< / ic:DataTriggerBehavior>
< / i:Interaction.Behaviors>
< / Rectangle>
< / Grid>
< / Page>

解决方案

< blockquote>

报告连接:



https://connect.microsoft.com/VisualStudio/feedback/details/1610477




I am working on a UWP application (Win 10 build 10240 w/ updates, VS2015 RTM).  I started with a clean Blank application after installing VS2015 RTM.

I am using the Behaviors SDK.  I have a DataTriggerBehavior with a ChangePropertyAction.  The code works fine in Debug mode, but an exception is thrown when I build in Release mode.  My current target architecture is x86. Exception:

Unhandled exception at 0x551819E8 (Windows.UI.Xaml.dll) in TestChangePropertyAction.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x08C518F0, 0x00000003).

Code:

<Page
    x:Class="TestChangePropertyAction.MainPage"
    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="using:Microsoft.Xaml.Interactivity" 
    xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <CheckBox x:Name="RedVsBlue" Margin="40,40,20,0">Red or Blue</CheckBox>
        <Rectangle x:Name="rect" Grid.Row="1" Width="100" Height="100">
            <i:Interaction.Behaviors>
                <ic:DataTriggerBehavior 
                    Binding="{Binding ElementName=RedVsBlue, Path=IsChecked}" 
                    Value="True" ComparisonCondition="Equal">
                    <ic:ChangePropertyAction PropertyName="Fill" Value="Red"/>
                </ic:DataTriggerBehavior>
                <ic:DataTriggerBehavior 
                    Binding="{Binding ElementName=RedVsBlue, Path=IsChecked}" 
                    Value="False" ComparisonCondition="Equal">
                    <ic:ChangePropertyAction PropertyName="Fill" Value="Blue"/>
                </ic:DataTriggerBehavior>
            </i:Interaction.Behaviors>
        </Rectangle>
    </Grid>
</Page>

解决方案

Reported to Connect:

https://connect.microsoft.com/VisualStudio/feedback/details/1610477


这篇关于[UWP]在发布模式UWP应用程序中的ChangePropertyAction中发生异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆