C# Class ModernWPF.DpiEvents

Afficher le fichier Open project: soukoku/ModernWPF Class Usage Examples

Méthodes publiques

Свойство Type Description
DpiChangeEvent System.Windows.RoutedEvent

Méthodes publiques

Méthode Description
AddDpiChangeHandler ( DependencyObject element, EventHandler handler ) : void

Adds a handler to the DpiChange event.

GetWindowDpi ( DependencyObject obj ) : int

Gets the dpi value for the object contained in a window using Chrome.

GetWindowDpiScale ( DependencyObject obj ) : double

Gets the dpi scale value for the object contained in a window using Chrome.

RemoveDpiChangeHandler ( DependencyObject element, EventHandler handler ) : void

Removes a handler to the DpiChange event.

ScaleElement ( FrameworkElement child, double scaleFactor, bool compensateRender = false ) : void

Scales the element based on some factor.

Private Methods

Méthode Description
GetIsDpiTransform ( DependencyObject obj ) : bool
SetIsDpiTransform ( DependencyObject obj, bool value ) : void
SetWindowDpi ( DependencyObject obj, int dpi ) : void
SetWindowDpiScale ( DependencyObject obj, double dpiScale ) : void
UnwrapDpiTransform ( Transform currentTransform ) : Transform
WrapDpiTransform ( Transform origTransform, double dpiScaleFactor ) : Transform

Method Details

AddDpiChangeHandler() public static méthode

Adds a handler to the DpiChange event.
public static AddDpiChangeHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject The element.
handler EventHandler The handler.
Résultat void

GetWindowDpi() public static méthode

Gets the dpi value for the object contained in a window using Chrome.
public static GetWindowDpi ( DependencyObject obj ) : int
obj System.Windows.DependencyObject The object.
Résultat int

GetWindowDpiScale() public static méthode

Gets the dpi scale value for the object contained in a window using Chrome.
public static GetWindowDpiScale ( DependencyObject obj ) : double
obj System.Windows.DependencyObject The object.
Résultat double

RemoveDpiChangeHandler() public static méthode

Removes a handler to the DpiChange event.
public static RemoveDpiChangeHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject The element.
handler EventHandler The handler.
Résultat void

ScaleElement() public static méthode

Scales the element based on some factor.
public static ScaleElement ( FrameworkElement child, double scaleFactor, bool compensateRender = false ) : void
child System.Windows.FrameworkElement The child.
scaleFactor double The scale factor.
compensateRender bool if set to true to compensate RTL bug with render transform.
Résultat void

Property Details

DpiChangeEvent public_oe static_oe property

Identifies the DpiChange event. This can only be listened to by a Window.
public static RoutedEvent,System.Windows DpiChangeEvent
Résultat System.Windows.RoutedEvent