c# - Blend Interaction Behaviour gives "points to immutable instance" error -


I have a UserControl that is the base class for other user controls, which are displayed in "Model View".
I have been shown that all user controls are fading while closing. I also want the user to be able to move around control. My constructor looks like this:

  var tg = new TransformGroup (); Tg.Children.Add (new scale transforms ()); RenderTransform = TG; Var behavior = interaction. Gatebehaviers (this); Behaviors.Add (New TranslationZembraneBewire ()); Loaded + = modal_log_logged_loaded;  

and the ModalDialogBase_Loaded method looks like this:

  Private Zero ModalDialogBase_Loaded (Object Sender, RoutedEventArgs E) {var fadeInStoryboard = (Storyboard) TryFindResource ("modalDialogFadeIn "); FadeInStoryboard.Begin (this); }  

This method is called when I press the close-button on the control:

  Close the protected virtual zeros () {var fadeOutStoryboard = (Storyboard) TryFindResource ("modalDialogFadeOut"); FadeOutStoryboard = fadeOutStoryboard.Clone (); FadeOutStoryboard.Completed + = Delegate {RaiseEvent (New Routing Avenger); }; FadeOutStoryboard.Begin (this); }  

The storyboard that looks like this:

  & lt; Storyboard x: key = "modalDialogFadeOut" & gt; & Lt; DoubleAnimationUsingKeyFrames Storyboard.TargetProperty = "(UIElement.RenderTransform) [TransformGroup.Children] [0] (ScaleTransform.ScaleX) .." Storyboard.TargetName = "{x: Null}" & gt; & Lt; EasingDoubleKeyFrame Keytime = "0" value = "1" & gt; & Lt; EasingDoubleKeyFrame.EasingFunction & gt; & Lt; Backgie's Azingsmode = "is in in" expounded = "0.3" /> & Lt; /EasingDoubleKeyFrame.EasingFunction> & Lt; / EasingDoubleKeyFrame & gt; & Lt; Time of EasingDoubleKeyFrame = "0: 0: 0.4" value = "0" & ​​gt; & Lt; EasingDoubleKeyFrame.EasingFunction & gt; & Lt; Backgie's Azingsmode = "is in in" expounded = "0.3" /> & Lt; /EasingDoubleKeyFrame.EasingFunction> & Lt; / EasingDoubleKeyFrame & gt; & Lt; / DoubleAnimationUsingKeyFrames & gt; & Lt; DoubleAnimationUsingKeyFrames Storyboard.TargetProperty = "(UIElement.RenderTransform) [TransformGroup.Children] [0] (ScaleTransform.ScaleY) .." Storyboard.TargetName = "{x: Null}" & gt; & Lt; EasingDoubleKeyFrame Keytime = "0" value = "1" & gt; & Lt; EasingDoubleKeyFrame.EasingFunction & gt; & Lt; Backgie's Azingsmode = "is in in" expounded = "0.3" /> & Lt; /EasingDoubleKeyFrame.EasingFunction> & Lt; / EasingDoubleKeyFrame & gt; & Lt; Time of EasingDoubleKeyFrame = "0: 0: 0.4" value = "0" & ​​gt; & Lt; EasingDoubleKeyFrame.EasingFunction & gt; & Lt; Backgie's Azingsmode = "is in in" expounded = "0.3" /> & Lt; /EasingDoubleKeyFrame.EasingFunction> & Lt; / EasingDoubleKeyFrame & gt; & Lt; / DoubleAnimationUsingKeyFrames & gt; & Lt; Double animation tool keyframe storyboard Targetproperty = "(UIElement.Opacity)" storyboard. Target = "{x: tap}" & gt; & Lt; Time of EasingDoubleKeyFrame = "0" value = "1" /> & Lt; EasingDoubleKeyFrame keytime = "0: 0: 0.3" value = "0" /> & Lt; EasingDoubleKeyFrame keytime = "0: 0: 0.4" value = "0" /> & Lt; / DoubleAnimationUsingKeyFrames & gt; & Lt; / Storyboard & gt;  

If user controls are shown, and users do not move it around the screen, then everything works fine. However, the user moves around to control, so I get the following error when the modalDialogFadeOut Storyboard is started:

In the 'child' way of property '(0) (1) [0]. . (2) '' system. Windows Media. Transform Collection 'indicates an irreversible example.

How can I fix this?

itemprop = "text">

The issue that is changing to TranslateZoomRotateBehavior is its ScaleTransform with a MatrixTransform, a property no longer exists Due to the first two animations in your storyboard to target

Since you can not animate the value of a matrix to get the effect of fadeout, I would use an extra container for control behavior, and then one visually exiting one.


Comments

Post a Comment

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -