0
我使用C#,Silverlight中,Visual Studio中的Windows Phone 7轉化UIElement的剪輯
我想獲得一個UIElement
,其中包括已經在UIElement
做過任何改造的剪輯。
這個例子給我的剪輯,但不包括從UIElement的任何變換:
// uie is a UIElement taken from a PhoneApplicationPage
Geometry myClip = uie.Clip;
我嘗試以下,但它結束了移動UIElement
:
var frame = Application.Current.RootVisual as PhoneApplicationFrame;
var page = frame.Content as PhoneApplicationPage;
GeneralTransform gt = uie.TransformToVisual(page);
uie.RenderTransform = gt as Transform;
Geometry myClip = uie.Clip;
我也嘗試過在結尾添加逆變換以撤銷任何移動,但這似乎使情況變得更糟:
uie.RenderTransform = gt.Inverse as Transform;
請幫我把與原來的剪輯轉換UIElement
,而不再與UIElement
本身搞亂。
在此先感謝。