Exemplo n.º 1
0
        public static ISupportsLayout <T> MoveTo <T>(this ISupportsLayout <T> e, int x, int y)
            where T : UIElement
        {
            Canvas.SetLeft(e.Value, x * e.Zoom);
            Canvas.SetTop(e.Value, y * e.Zoom);

            return(e);
        }
Exemplo n.º 2
0
        public static ISupportsLayout <T> SizeTo <T>(this ISupportsLayout <T> e, int w, int h)
            where T : FrameworkElement
        {
            e.Value.Width  = e.Zoom * w;
            e.Value.Height = e.Zoom * h;


            return(e);
        }