public void Reset() { Children.Clear(); InvalidateArrange(); content = null; contentsCenter = new Rect(0, 0, 1, 1); contentGravity = ContentGravity.Resize; Clip = null; InvOriginTransform = new TranslateTransform(); ClipGeometry = new RectangleGeometry(); ClipGeometry.Transform = InvOriginTransform; RenderTransform = new TranslateTransform(); _position = new Point(0, 0); _origin = new Point(0, 0); _size = new Size(0, 0); _hidden = false; originSet = false; _createdTransforms = false; LayerOpacity = 1.0; backgroundBrush = TransparentBrush; backgroundColor.R = 0; backgroundColor.G = 0; backgroundColor.B = 0; backgroundColor.A = 0; Set("anchorPoint", new Point(0.5, 0.5)); _masksToBounds = false; this.Background = TransparentBrush; }
public void SetGravity(ContentGravity imgGravity) { gravity = imgGravity; InvalidateArrange(); }
public void Reset() { Children.Clear(); image = null; content = null; imageSize = new Size(0, 0); contentSize = new Size(0, 0); contentsCenter = new Rect(0, 0, 1.0, 1.0); gravity = ContentGravity.Resize; scaleFactor = 1.0f; origin = new Point(); }
public LayerContent() { gravity = ContentGravity.Resize; scaleFactor = 1.0f; CAXamlDebugCounters.IncCounter("LayerContent"); }
public void SetContentGravity(ContentGravity gravity) { contentGravity = gravity; if (GetImageContent() != null) { GetImageContent().SetGravity(gravity); } }