LinsUIWPFUtil
class
It
is a static utility class.
§
Methods
1) public static void
BringToFront(
FrameworkElement
elementTop)
Parameters
elementTop
Type:
FrameworkElement
The
item requires being on the top layer.
Remark
Brings
elementTop
on top layer.
2) public static Point
ConvertPointFromScreenCoord(
Visual
visual,
Point
ptScreen)
Parameters
visual
Type:
Visual
A
visual object.
ptScreen
Type:
Point
A
location which is at screen coordinate.
Return
It
converts ptScreen into visual
object’s coordinate.
3) public static Point
ConvertPointToScreenCoord(
Visual
visual,
Point
ptDevice)
Parameters
visual
Type:
Visual
A
visual object.
ptDevice
Type:
Point
A
location which is at visual
object’s coordinate.
Return
It
converts ptDevice into screen
coordinate.
4) public static void
DisConnectFromParent(
FrameworkElement
element)
Parameters
element
Type:
FrameworkElement
The
item requires being removed from its parent.
Remark
Removes
element
from its parent.
5) public static Rect GetBounds(
FrameworkElement
element)
Parameters
element
Type:
FrameworkElement
The
item requires for both its size and location.
Return
Retrieve
both the size and the location of the element,
in pixels, relative to its parent.
6) public static Rect GetBoundsAtMDIFrame(
FrameworkElement
element,
bool
bDesignMode)
Parameters
element
Type:
FrameworkElement
The
item requires for both its size and location.
bDesigneMode
Type:
bool
This
parameter should always be false to the user. It should be true,
when it is under design mode.
Return
Retrieve
both the size and the location of the element,
in pixels, relative to its MDI Frame.
7) public static Point
GetMousePosAtMDIFrame()
Return
It
returns the current cursor position at MDI Frame coordinate.
8) public static Point
GetMousePosAtScreen()
Return
It
returns the current cursor position at screen coordinate.
9) public static bool
InitializeAssembly(
string
csAssemblyFullName,
string
csClassFullName,
string
csInitializationFunctionName,
object[]
args)
Parameters
csAssemblyFullName
Type:
string
The
full name of the assembly includes the path, for example, “C:\\Users\\dongman\\Documents\\Visual
Studio 2012\\Projects\\Demo -
Customization\\Demo\\Release\\Customization.dll”.
csClassFullName
Type:
string
The
full name of the initialization class name, for example, “Customization.InitializeCustomization”.
It can be null,
if nothing to be initialized.
csInitializationFunctionName
Type:
string
The
name of the initialization method, for example, “Initialize”.
It can be null,
if nothing to be initialized.
args
Type:
object[]
The
array of the parameters of the initialization method takes. It can be
null,
if there is no any parameter required for the initialization method.
Return
True,
if the assembly was loaded successfully; otherwise, false.
References:
No comments:
Post a Comment