BExplorer.Shell.ToolTip.ImgIconImage_OnSizeChanged C# (CSharp) Method

ImgIconImage_OnSizeChanged() private method

private ImgIconImage_OnSizeChanged ( Object sender, System.Windows.SizeChangedEventArgs e ) : void
sender Object
e System.Windows.SizeChangedEventArgs
return void
		private void ImgIconImage_OnSizeChanged(Object sender, SizeChangedEventArgs e) {
			var textBlock = sender as Image;
			var xPos = System.Windows.Forms.Cursor.Position.X + textBlock.ActualWidth + 16 > Screen.GetWorkingArea(System.Windows.Forms.Cursor.Position).Width ? System.Windows.Forms.Cursor.Position.X - textBlock.ActualWidth + 16 : System.Windows.Forms.Cursor.Position.X + 16;
			var yPos = System.Windows.Forms.Cursor.Position.Y + textBlock.ActualHeight > Screen.GetWorkingArea(System.Windows.Forms.Cursor.Position).Height ? System.Windows.Forms.Cursor.Position.Y - textBlock.ActualHeight : System.Windows.Forms.Cursor.Position.Y;
			this.Left = xPos;
			this.Top = yPos;
		}
	}