Faerdan
Topic Author
Posts: 73
Joined: 02 Oct 2015, 09:11
Location: Galway, Ireland
Contact:

[C#] Crash when using a Setter in DataTrigger

25 May 2017, 13:25

Hey all,

When I use a Setter in a DataTrigger where a Setter for the same property exists in the Style, I get an AccessViolationException.

If I continue execution after the exception (while debugging) everything, including the DataTrigger, works correctly.

Here is the style markup:
<Style x:Key="PresetSelectButtonPathStyle" TargetType="{x:Type Path}">
  <Setter Property="Stroke" Value="Red"/>
  <Style.Triggers>
    <DataTrigger Binding="{Binding IsCurrentPowerPreset}" Value="True">
        <Setter Property="Stroke" Value="Green"/>
    </DataTrigger>
    <DataTrigger Binding="{Binding IsCurrentPowerPreset}" Value="False">
        <Setter Property="Stroke" Value="Blue"/>
    </DataTrigger>
  </Style.Triggers>
</Style>
If I removed the Setter from the base Style the exception does not occur.

Using Noesis 2.0.2f2 C# SDK.

Reported in bug tracker: https://bugs.noesisengine.com/view.php?id=1096

Kind Regards,

Mark
 
User avatar
sfernandez
Site Admin
Posts: 2991
Joined: 22 Dec 2011, 19:20

Re: [C#] Crash when using a Setter in DataTrigger

29 May 2017, 18:43

Hi, I've asked you for some feedback in the bugtracker, we can continue there.

Who is online

Users browsing this forum: Google [Bot] and 11 guests