|
// Type: System.Windows.Forms.Integration.WindowsFormsHost
// Assembly: WindowsFormsIntegration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\WindowsFormsIntegration.dll
using System;
using System.ComponentModel;
using System.Runtime;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Markup;
using System.Windows.Media;
namespace System.Windows.Forms.Integration
{
[DesignerCategory("code")]
[ContentProperty("Child")]
[DefaultEvent("ChildChanged")]
public class WindowsFormsHost : HwndHost, IKeyboardInputSink
{
#region Constants and Fields
public static readonly DependencyProperty BackgroundProperty;
public static readonly DependencyProperty FontFamilyProperty;
public static readonly DependencyProperty FontSizeProperty;
public static readonly DependencyProperty FontStyleProperty;
public static readonly DependencyProperty FontWeightProperty;
public static readonly DependencyProperty ForegroundProperty;
public static readonly DependencyProperty PaddingProperty;
public static readonly DependencyProperty TabIndexProperty;
#endregion
#region Constructors and Destructors
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public WindowsFormsHost();
#endregion
#region Public Events
public event EventHandler<ChildChangedEventArgs> ChildChanged;
public event EventHandler<LayoutExceptionEventArgs> LayoutError;
#endregion
#region Public Properties
public Brush Background { get; set; }
public Control Child { get; set; }
public FontFamily FontFamily { get; set; }
public double FontSize { get; set; }
public FontStyle FontStyle { get; set; }
public FontWeight FontWeight { get; set; }
public Brush Foreground { get; set; }
[Category("Behavior")]
[Bindable(true)]
public Thickness Padding { get; set; }
public PropertyMap PropertyMap { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
get; }
[Bindable(true)]
[Category("Behavior")]
public int TabIndex { get; set; }
#endregion
#region Public Methods and Operators
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public static void EnableWindowsFormsInterop();
public virtual bool TabInto(TraversalRequest request);
#endregion
#region Methods
protected override Size ArrangeOverride(Size finalSize);
protected override HandleRef BuildWindowCore(HandleRef hwndParent);
protected override void DestroyWindowCore(HandleRef hwnd);
protected override void Dispose(bool disposing);
protected override Size MeasureOverride(Size constraint);
protected override AutomationPeer OnCreateAutomationPeer();
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e);
protected virtual Vector ScaleChild(Vector newScale);
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.