I believe that we can run into issue because Popup is not yet visible when we're trying to call TransformToVisual in<br /><br /> public void Open() {<br /> if(isOpen)<br /> return;<br /> isOpen = true;<br /><br /> if(currentPage.ApplicationBar != null) {<br /> DisableAppBar();<br /> }<br /><br /> ArrangePlacement();<br /><br /><br /> currentPage.BackKeyPress += CurrentPageBackKeyPress;<br /> currentPage.OrientationChanged += CurrentPageOrientationChanged;<br /><br /> hostPopup.IsOpen = true;<br /> }<br /><br />maybe we should call ArrangePlacement after setting IsOpen to true.<br /><br />There is also another possibility that currentPage ArrangePlacement is not yet visible<br /><br /> void ArrangePlacement() {<br /> maskingLayer.Dispatcher.BeginInvoke(() => {<br /> var placement = new ElementPlacement {<br /> Transform = (Transform)currentPage.TransformToVisual(null),<br /> Orientation = currentPage.Orientation,<br /> };<br /><br /> elementPlacementAnimator.AnimateTo(placement);<br /> });<br /> }
Comments: Should be fixed. Used solution from SafeTransformToVisual() from http://phone.codeplex.com/
Comments: Should be fixed. Used solution from SafeTransformToVisual() from http://phone.codeplex.com/