I was trying to implement behaviors, without using noesisapp.dll. While my code works in blend, when I try to carry it across to Noesis, I get an error saying that it can't recognize my behaviors. Also, I register my behavior before loading the xaml:
[NOESIS/E] DragTest.xaml(14): Unknown type 'NoesisApp.Interaction'. <ContentControl> <i:Interaction.Behaviors> <local:DropItemBehavior/> </i:Interaction.Behaviors> <Grid Height="320" HorizontalAlignment="Center" Margin="129,12" Width="245" VerticalAlignment="Center"> <Rectangle Stroke="Black" AllowDrop="True" Fill="Black" /> <TextBlock Text="Black" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/> </Grid> </ContentControl>
What does Noesis need to know to be able to identify behaviors?
Hi, interactivity classe are part of NoesisApp.dll, so if you don't link against that library you need to copy interactivity code files to your application and register the components in the factory before you can use them from xaml. I explained this in the following post: viewtopic.php?f=3&t=1893#p10663
Yes, sorry about that. We did minor changes in 3.0 to have this more clear:
So, in 3.0 just include all the needed files from a single .cpp and define NS_APP_INTERACTIVITY_API to empty.
#ifndef __APP_INTERACTIVITYAPI_H__ #define __APP_INTERACTIVITYAPI_H__ #include <NsCore/CompilerSettings.h> #ifndef NS_APP_INTERACTIVITY_API #define NS_APP_INTERACTIVITY_API NS_DLL_IMPORT #endif #endif
Who is online
Users browsing this forum: Google [Bot] and 2 guests