GetWidth() public static method

public static GetWidth ( UIElement element ) : double
element UIElement
return double
        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);
            }
        }
        public System.Windows.Rect GetPosition(PlacementOperation operation, DesignItem childItem)
        {
            UIElement child = childItem.View;

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