public LayoutMetrics ToClr() { return(new LayoutMetrics { ActualHeight = ActualHeight, ActualWidth = ActualWidth, LayoutSlot = LayoutSlot.ToClr(), VisualOffset = VisualOffset.ToClr(), LayoutClip = LayoutClip.ToClr(), HiddenDesire = HiddenDesire.ToClr(), DesiredSize = DesiredSize.ToClr(), RenderSize = RenderSize.ToClr(), AbsoluteXform = AbsoluteXform, LayoutXform = LayoutXform, LocalXform = LocalXform, RenderXform = RenderXform, TotalOpacity = TotalOpacity, TotalIsRenderVisible = TotalIsRenderVisible, TotalIsHitTestVisible = TotalIsHitTestVisible, TotalRenderProjection = TotalRenderProjection, }); }