Class XamlHelper
Assembly: StockSharp.Xaml.dll
Syntax
public static class XamlHelper : Object
Fields
DialogResultProperty
Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
Properties
CurrentThreadDispatcher
Declaration
public static Dispatcher CurrentThreadDispatcher { get; }
Property Value
Methods
CopyToClipboard<T>(T)
Declaration
public static void CopyToClipboard<T>(this T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Type Parameters
DeleteHideable(Window)
Declaration
public static void DeleteHideable(this Window window)
Parameters
Type |
Name |
Description |
Window |
window |
|
EnsureUIThread(Object)
Checks if supplied dispatcher/dispatcher object OR current thread is associated with Dispatcher.
Declaration
public static void EnsureUIThread(this object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
Any DispatcherObject or Dispatcher or anything else (to check using Dispatcher.FromThread())
|
FindLogicalChild<T>(DependencyObject)
Declaration
public static T FindLogicalChild<T>(this DependencyObject obj)
where T : DependencyObject
Parameters
Returns
Type Parameters
FindVisualChild<T>(DependencyObject)
Declaration
public static T FindVisualChild<T>(this DependencyObject obj)
where T : DependencyObject
Parameters
Returns
Type Parameters
FindVisualChilds<T>(DependencyObject)
Declaration
public static IEnumerable<T> FindVisualChilds<T>(this DependencyObject obj)
where T : DependencyObject
Parameters
Returns
Type Parameters
GetActiveOrMainWindow(Application)
Declaration
public static Window GetActiveOrMainWindow(this Application app)
Parameters
Returns
GetActiveWindow(Application)
Declaration
public static Window GetActiveWindow(this Application app)
Parameters
Returns
GetActiveWindows(Application)
Declaration
public static IEnumerable<Window> GetActiveWindows(this Application app)
Parameters
Returns
GetActualSize(FrameworkElement)
Declaration
public static (int, int) GetActualSize(this FrameworkElement elem)
Parameters
Returns
Declaration
public static Brush GetBrush(this DrawingImage source)
Parameters
Returns
GetDialogResult(DependencyObject)
Boilerplate code to register attached property "bool? DialogResult"
Declaration
public static Nullable<bool> GetDialogResult(DependencyObject obj)
Parameters
Returns
GetImage(FrameworkElement)
Declaration
public static BitmapSource GetImage(this FrameworkElement elem)
Parameters
Returns
Declaration
public static BitmapSource GetImage(this Visual visual, int width, int height)
Parameters
Returns
Declaration
public static BitmapSource GetImage(this Visual visual, (int, int) size)
Parameters
Returns
GetWindow(DependencyObject)
Declaration
public static Window GetWindow(this DependencyObject obj)
Parameters
Returns
GuiAsync(Dispatcher, Action)
Declaration
public static void GuiAsync(this Dispatcher dispatcher, Action action)
Parameters
GuiAsync(Dispatcher, Action, DispatcherPriority)
Declaration
public static void GuiAsync(this Dispatcher dispatcher, Action action, DispatcherPriority priority)
Parameters
GuiAsync(DispatcherObject, Action)
Declaration
public static void GuiAsync(this DispatcherObject obj, Action action)
Parameters
GuiSync(Dispatcher, Action)
Declaration
public static void GuiSync(this Dispatcher dispatcher, Action action)
Parameters
GuiSync(Dispatcher, Action, DispatcherPriority)
Declaration
public static void GuiSync(this Dispatcher dispatcher, Action action, DispatcherPriority priority)
Parameters
GuiSync(DispatcherObject, Action)
Declaration
public static void GuiSync(this DispatcherObject obj, Action action)
Parameters
GuiSync<T>(Dispatcher, Func<T>)
Declaration
public static T GuiSync<T>(this Dispatcher dispatcher, Func<T> func)
Parameters
Returns
Type Parameters
GuiSync<T>(Dispatcher, Func<T>, DispatcherPriority)
Declaration
public static T GuiSync<T>(this Dispatcher dispatcher, Func<T> func, DispatcherPriority priority)
Parameters
Returns
Type Parameters
GuiSync<T>(DispatcherObject, Func<T>)
Declaration
public static T GuiSync<T>(this DispatcherObject obj, Func<T> func)
Parameters
Returns
Type Parameters
IsDesignMode(DependencyObject)
Declaration
public static bool IsDesignMode(this DependencyObject obj)
Parameters
Returns
MakeHideable(Window)
Declaration
public static void MakeHideable(this Window window)
Parameters
Type |
Name |
Description |
Window |
window |
|
Declaration
public static void SaveImage(this BitmapSource image, Stream file)
Parameters
SetBindings(DependencyObject, DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
Declaration
public static void SetBindings(this DependencyObject obj, DependencyProperty property, object dataObject, string path, BindingMode mode, IValueConverter converter = null, object parameter = null)
Parameters
SetBindings(DependencyObject, DependencyProperty, Object, PropertyPath, BindingMode, IValueConverter, Object)
Declaration
public static void SetBindings(this DependencyObject obj, DependencyProperty property, object dataObject, PropertyPath path, BindingMode mode, IValueConverter converter = null, object parameter = null)
Parameters
SetDialogResult(DependencyObject, Nullable<Boolean>)
Declaration
public static void SetDialogResult(DependencyObject obj, Nullable<bool> value)
Parameters
SetMultiBinding(DependencyObject, DependencyProperty, IMultiValueConverter, Binding[])
Declaration
public static void SetMultiBinding(this DependencyObject obj, DependencyProperty prop, IMultiValueConverter conv, params Binding[] bindings)
Parameters
ShowModal(CommonDialog, DependencyObject)
Declaration
public static bool ShowModal(this CommonDialog dlg, DependencyObject obj)
Parameters
Returns
ShowModal(CommonDialog, Window)
Declaration
public static bool ShowModal(this CommonDialog dlg, Window owner)
Parameters
Returns
ShowModal(Window)
Declaration
public static bool ShowModal(this Window wnd)
Parameters
Type |
Name |
Description |
Window |
wnd |
|
Returns
ShowModal(Window, DependencyObject)
Declaration
public static bool ShowModal(this Window wnd, DependencyObject obj)
Parameters
Returns
ShowModal(Window, Window)
Declaration
public static bool ShowModal(this Window wnd, Window owner)
Parameters
Returns
ToBitmapImage(Byte[])
Declaration
public static BitmapImage ToBitmapImage(this byte[] imageData)
Parameters
Type |
Name |
Description |
Byte[] |
imageData |
|
Returns
ToColor(Int32)
Declaration
public static Color ToColor(this int color)
Parameters
Type |
Name |
Description |
Int32 |
color |
|
Returns
Declaration
public static int ToInt(this Color color)
Parameters
Type |
Name |
Description |
Color |
color |
|
Returns
Declaration
public static Color ToTransparent(this Color color, byte alpha)
Parameters
Returns
Declaration
public static void UpdateBrush(this DrawingImage source, Brush brush)
Parameters
Declaration
public static void UpdatePen(this DrawingImage source, Pen pen)
Parameters
WpfCast<T>(Object)
Преобразовать значение в переданный тип данных.
Declaration
public static T WpfCast<T>(this object value)
Parameters
Type |
Name |
Description |
Object |
value |
Исходное значение.
|
Returns
Type |
Description |
T |
Преобразованное значение.
|
Type Parameters
Name |
Description |
T |
Возвращаемое значение.
|