[Unity] Setting GridLength in Storyboard
Posted: 18 Sep 2014, 10:57
Hi,
I'm trying to set the Width/Height of Row/ColumnDefinition of a Grid in a VisualState:
This works with wpf but in unity I get the following error:
Is this a bug I should report or is this by design?
Is there another way to achive this behavior?
I'm trying to set the Width/Height of Row/ColumnDefinition of a Grid in a VisualState:
Code: Select all
<VisualState x:Name="Landscape">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="col1"
Storyboard.TargetProperty="Width">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<GridLength>3*</GridLength>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="row1"
Storyboard.TargetProperty="Height">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<GridLength>*</GridLength>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
Code: Select all
[DX9] Assets/_Project/Xaml/GuiTest_2.xaml
Type 'GridLength' is not registered for boxed serialization
UnityEngine.Debug:LogError(Object)
Noesis.BuildToolKernel:OnLog(Int32, String) (at Assets/Editor/NoesisGUI/NoesisBuildToolKernel.cs:194)
System.Object:wrapper_native_27DCA7D0()
Noesis.BuildToolKernel:Build() (at Assets/Editor/NoesisGUI/NoesisBuildToolKernel.cs:140)
NoesisPostProcessor:Build(String, Boolean, Boolean) (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:363)
NoesisPostProcessor:Build(Boolean, Boolean) (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:329)
NoesisPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:256)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
Is there another way to achive this behavior?