View Issue Details

IDProjectCategoryView StatusLast Update
0002345NoesisGUIC# SDKpublic2022-05-30 12:41
Reportersumel007 Assigned Tosfernandez  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.4 
Target Version3.1.5Fixed in Version3.1.5 
Summary0002345: EventTrigger.Actions throws an exception when created from code behind.
DescriptionI am creating an EventTrigger in codebehind in OnInitialized method. I get an InvalidCastExceptionwhenever I try to add something to the Actions collection. Same thing happens in Visual Studio debugger when I try to watch the Actions collection (same for Enter/ExitActions)

The exception:
System.InvalidCastException: 'Unable to cast object of type 'Noesis.BaseUICollection' to type 'Noesis.TriggerActionCollection'.'

Code sample where the exception happens:

private void SetupIntroStoryboard()
        {
            var newBoard = CreateNewStoryboard();
            if (newBoard == null)
            {
                return;
            }
            Triggers.Clear();
            var newTrigger = new EventTrigger();
            newTrigger.RoutedEvent = FrameworkElement.LoadedEvent;
            newTrigger.Actions.Add(new BeginStoryboard() { Storyboard = newBoard });
            Triggers.Add(newTrigger);
        }
TagsNo tags attached.
PlatformWindows

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-05-11 12:16 sumel007 New Issue
2022-05-11 15:08 sfernandez Assigned To => sfernandez
2022-05-11 15:08 sfernandez Status new => assigned
2022-05-11 15:08 sfernandez Target Version => 3.1.5
2022-05-30 12:41 sfernandez Status assigned => resolved
2022-05-30 12:41 sfernandez Resolution open => fixed
2022-05-30 12:41 sfernandez Fixed in Version => 3.1.5