Using EventTriggers gives error
Posted: 19 Oct 2016, 14:54
Hi,
we are in need to get MouseEnter and MouseExit from buttons or their images with id parameter. These buttons live in an ItemsControl.
I have tried using System.Windows.Interactivity namespace to use Triggers, but with little luck. If I use Trigger it gives me this error:
NoesisException: Resource Assets/GloryAssets/Cok_Xaml/Editors/UserControls/ArenaEditorWindow.xaml not found
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:26)
Noesis.UIRenderer.Noesis_CreateRenderer (IntPtr root) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:90)
Noesis.UIRenderer..ctor (Noesis.FrameworkElement content, Vector2 offscreenSize, UnityEngine.GameObject target) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:117)
NoesisGUIPanel.LoadXaml () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:529)
NoesisGUIPanel.OnEnable () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:400)
Namespace:
Sample button:
we are in need to get MouseEnter and MouseExit from buttons or their images with id parameter. These buttons live in an ItemsControl.
I have tried using System.Windows.Interactivity namespace to use Triggers, but with little luck. If I use Trigger it gives me this error:
NoesisException: Resource Assets/GloryAssets/Cok_Xaml/Editors/UserControls/ArenaEditorWindow.xaml not found
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:26)
Noesis.UIRenderer.Noesis_CreateRenderer (IntPtr root) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:90)
Noesis.UIRenderer..ctor (Noesis.FrameworkElement content, Vector2 offscreenSize, UnityEngine.GameObject target) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:117)
NoesisGUIPanel.LoadXaml () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:529)
NoesisGUIPanel.OnEnable () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:400)
Namespace:
Code: Select all
<UserControl x:Class="Assets.GloryAssets.Scripts.GUI.UserControls.ArenaEditorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Assets.GloryAssets.Scripts.GUI.UserControls"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920"
x:Name="root">Code: Select all
<Button Content="Button" Width="300" Height="50">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<i:InvokeCommandAction Command="{Binding PropItemMouseEnterCommand}"
CommandParameter="1" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>