private ScaleTransform GetScaleTransform(UIElement element) { TransformGroup transformGroup = (TransformGroup)element.RenderTransform; TransformCollection transformCollection = transformGroup.Children; ScaleTransform scaleTransform = (ScaleTransform)transformCollection.First(tr => tr is ScaleTransform); return(scaleTransform); }
private RotateTransform GetRotateTransform(UIElement element) { TransformGroup transformGroup = (TransformGroup)element.RenderTransform; TransformCollection transformCollection = transformGroup.Children; RotateTransform rotateTransform = (RotateTransform)transformCollection.First(tr => tr is RotateTransform); return(rotateTransform); }
private const int exifOrientationID = 0x112; //274 private TranslateTransform GetTranslateTransform(UIElement element) { TransformGroup transformGroup = (TransformGroup)element.RenderTransform; TransformCollection transformCollection = transformGroup.Children; TranslateTransform translateTransform = (TranslateTransform)transformCollection.First(tr => tr is TranslateTransform); return(translateTransform); }