(Unity3d) NoesisException: Unknown member BitmapImage.UriSource
NoesisGUI is choking on the XAML below. It works if I host the control in a WPF window, but Unity doesn't seem to like it. What am I doing that Noesis and Unity don't like?
Code: Select all
<Button VerticalAlignment="Center" HorizontalAlignment="Center" Background="#00DDDDDD" BorderBrush="#00707070">
<Image Source="../Images/NewGame.png" Width="200">
<Image.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<BeginStoryboard>
<Storyboard x:Name="NewGameAnimation" Duration="0:0:2">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="../Images/NewGame.png" />
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:2">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="../Images/NewGameGlow.png" />
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Button.MouseLeave">
<BeginStoryboard>
<Storyboard Duration="0:0:2">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="../Images/NewGameGlow.png" />
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame KeyTime="0:0:2">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="../Images/NewGame.png" />
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Button>
-
sfernandez
Site Admin
- Posts: 3154
- Joined:
Re: (Unity3d) NoesisException: Unknown member BitmapImage.UriSource
Hi,
It seems UriSource property is not exposed to be used from Xaml, please create a ticket in our bugtracker and we will add it in a future release.
Meanwhile you can use a StaticResource as a workaround, besides it will be more efficient:
It seems UriSource property is not exposed to be used from Xaml, please create a ticket in our bugtracker and we will add it in a future release.
Meanwhile you can use a StaticResource as a workaround, besides it will be more efficient:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<ImageSource x:Key="NewGameImg">../Images/NewGame.png</ImageSource>
<ImageSource x:Key="NewGameGlowImg">../Images/NewGameGlow.png</ImageSource>
</Grid.Resources>
<Button VerticalAlignment="Center" HorizontalAlignment="Center" Background="#00DDDDDD" BorderBrush="#00707070">
<Image Source="{StaticResource NewGameImg}" Width="200">
<Image.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<BeginStoryboard>
<Storyboard x:Name="NewGameAnimation" Duration="0:0:2">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NewGameImg}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:2" Value="{StaticResource NewGameGlowImg}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Button.MouseLeave">
<BeginStoryboard>
<Storyboard Duration="0:0:2">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource NewGameGlowImg}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:2" Value="{StaticResource NewGameImg}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Button>
</Grid>
Re: (Unity3d) NoesisException: Unknown member BitmapImage.UriSource
Gotcha. Will post the bug when I get out of this meeting and back to my desk. Thanks for the help!
Re: (Unity3d) NoesisException: Unknown member BitmapImage.UriSource
Thanks to you for the feedback! This will be solved in the next version.
Who is online
Users browsing this forum: No registered users and 1 guest