GetWidth() 공개 정적인 메소드

public static GetWidth ( UIElement element ) : double
element UIElement
리턴 double
예제 #1
0
        public void SetPosition(PlacementInformation info)
        {
            UIElement element     = info.Item.View;
            Rect      newPosition = info.Bounds;

            if (newPosition.Right != ModelTools.GetWidth(element))
            {
                info.Item.Properties[FrameworkElement.WidthProperty].SetValue(newPosition.Right);
            }
            if (newPosition.Bottom != ModelTools.GetHeight(element))
            {
                info.Item.Properties[FrameworkElement.HeightProperty].SetValue(newPosition.Bottom);
            }
        }
예제 #2
0
        public System.Windows.Rect GetPosition(PlacementOperation operation, DesignItem childItem)
        {
            UIElement child = childItem.View;

            return(new Rect(0, 0, ModelTools.GetWidth(child), ModelTools.GetHeight(child)));
        }