System.Windows.Forms.ToolStripItem.GetImageSize C# (CSharp) Method

GetImageSize() private method

private GetImageSize ( ) : Size
return System.Drawing.Size
		internal Size GetImageSize ()
		{
			// Get the actual size of our internal image -or-
			// Get the ImageList.ImageSize if we are using ImageLists
			//if (this.image_scaling == ToolStripItemImageScaling.None) {
			if (this.image != null)	{
					return image.Size;
					
				if (this.image_index >= 0 || !string.IsNullOrEmpty (this.image_key))
					if (this.owner != null && this.owner.ImageList != null)
						return this.owner.ImageList.ImageSize;
			}
			 else {
				// If we have an image and a parent, return ImageScalingSize
				if (this.Parent == null)
					return Size.Empty;
					
				if (this.image != null)
					return this.Parent.ImageScalingSize;

				if (this.image_index >= 0 || !string.IsNullOrEmpty (this.image_key))
					if (this.owner != null && this.owner.ImageList != null)
						return this.Parent.ImageScalingSize;
			}
			
			return Size.Empty;
		}
		///