- FrancoisRecisio
- Posts: 6
- Joined:
DataEventTrigger never trigger in first "frame"
Hello!
I'm having trouble with DataEventTrigger, and I can't figure out if it's a bug or if I'm using them incorrectly.
I use a source object as data context in my code-behind class. Inside the source object, I have a list of elements of the same type. And within this type, I have an event defined.
To trigger the event, I do this:
This works well... unless I create the element in the same call, or also if the element was created long before, but has never been displayed (as if the binding was not set up yet).
Do you have an idea? If needed I can make a simple code to reproduce this situation
I'm having trouble with DataEventTrigger, and I can't figure out if it's a bug or if I'm using them incorrectly.
I use a source object as data context in my code-behind class. Inside the source object, I have a list of elements of the same type. And within this type, I have an event defined.
Code: Select all
struct Element final : public NotifierBase
{
Noesis::EventHandler myEvent;
NS_DECLARE_REFLECTION(Element, NotifierBase)
};
Code: Select all
class ViewModel final: public Noesis::BaseComponent
{
public:
Noesis::Ptr<Noesis::ObservableCollection<Element>> m_elements;
NS_DECLARE_REFLECTION(ViewModel, BaseComponent)
};
Code: Select all
Element* item = m_viewModel->m_elements->Get(0);
item->myEvent(item, Noesis::EventArgs::Empty);
Code: Select all
<b:Interaction.Triggers>
<noesis:DataEventTrigger Source="{Binding}" EventName="MyEvent">
<b:ControlStoryboardAction Storyboard="{StaticResource MyAnim}" />
</noesis:DataEventTrigger>
</b:Interaction.Triggers>
Do you have an idea? If needed I can make a simple code to reproduce this situation
Re: DataEventTrigger never trigger in first "frame"
Hello! This seems like a bug. Could you please file a ticket and, if possible, include a minimal reproducible code example?
- FrancoisRecisio
- Posts: 6
- Joined:
Re: DataEventTrigger never trigger in first "frame"
I created a ticket here : https://www.noesisengine.com/bugs/view.php?id=3648
I hope you find it helpful!
I hope you find it helpful!
Who is online
Users browsing this forum: No registered users and 14 guests