Silverlight Screen Blurred after Flip animation -


i have created flip animation go list of items edit dialogue. example, user sees list of items, double-clicks on item edit , screen flips display edit dialogue details.

i have actual animation working except items on screen blurred. when flip list blurred.

can suggest reason this. have shown below how have achieved flip.

             <contentcontrol x:name="editptrmaincontent" horizontalalignment="stretch" verticalalignment="stretch">                 <contentcontrol.resources>                     <storyboard x:name="fliptoeditstart">                         <doubleanimation from="0" to="90" duration="0:0:0.3" storyboard.targetname="contentprojection" storyboard.targetproperty="rotationy"/>                     </storyboard>                     <storyboard x:name="fliptoeditend">                         <doubleanimation from="270" to="360" duration="0:0:0.3" storyboard.targetname="contentprojection" storyboard.targetproperty="rotationy"/>                     </storyboard>                      <storyboard x:name="fliptoliststart">                         <doubleanimation from="0" to="-90" duration="0:0:0.3" storyboard.targetname="contentprojection" storyboard.targetproperty="rotationy"/>                     </storyboard>                     <storyboard x:name="fliptolistend">                         <doubleanimation from="-270" to="-360" duration="0:0:0.3" storyboard.targetname="contentprojection" storyboard.targetproperty="rotationy"/>                     </storyboard>                 </contentcontrol.resources>                  <contentcontrol.projection>                     <planeprojection x:name="contentprojection"/>                 </contentcontrol.projection>              </contentcontrol> 

and in code-behind (essentially mvvm app happy animation control being in view visual)

        public editptrview()     {         initializecomponent();          loaded += onloaded;         unloaded += onunloaded;         fliptoeditstart.completed += onfliptoeditstartcompleted;         fliptoliststart.completed += onfliptoliststartcompleted;     }      void onfliptoliststartcompleted(object sender, eventargs e)     {         editptrmaincontent.content = new editptrview();         fliptolistend.begin();     }      void onfliptoeditstartcompleted(object sender, eventargs e)     {         editptrmaincontent.content = new namedtransferview();         fliptoeditend.begin();     }      void onloaded(object sender, routedeventargs e)     {         // register mvvm light messages         appmessages.setfocusmessage.register(this, onsetfocus);         appmessages.closescreenmessage.register(this, onclosescreen);          appmessages.viewloadedmessage.send(viewtypes.bookingslistview);     }      void onunloaded(object sender, routedeventargs e)     {         appmessages.setfocusmessage.unregister(this, onsetfocus);         appmessages.closescreenmessage.unregister(this, onclosescreen);     }      #region mvvm light message delegates      private void onclosescreen(string screenname)     {         switch (screenname)         {             case "ptredit":                 fliptoliststart.begin();                 break;         }     }      #endregion      private void transfersdatagriddoubleclick(object sender, mousebuttoneventargs e)     {         showeditscreen();     }      private void editptrbuttonclick(object sender, routedeventargs e)     {         showeditscreen();     }      private void showeditscreen()     {         fliptoeditstart.begin();     } 

as can see start first half of animation on double-click (or button click) , animate 90 degrees. when animation completes change content of contentcontrol new screen , start second animation go 270 360 degrees. mvvm light messenger call edit screen reverse animation go list. of works ok but, said, screens go blurred. not imagining because edit screen view/viewmodel used elsewhere , easy compare. there needs done @ end of animation redraw screen correctly?

add following event handlers. -360 or 360 degree rotation causes problem , must replaced 0 after animation.

fliptoeditend.completed += (a, b) => { contentprojection.rotationy = 0.0; }; fliptolistend.completed += (a, b) => { contentprojection.rotationy = 0.0; }; 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -