Witam,mam taki oto kod Kontrolki:
using System.Windows.Forms;
using System.Drawing;
namespace MyGame1
{
public sealed class RenderingControl : UserControl
{
/// <summary>
/// Init
/// </summary>
public RenderingControl()
{
// Set Style
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.UserPaint, true);
UpdateStyles();
}
/// <summary>
/// Init
/// </summary>
/// <param name="size">Rendering control size</param>
public RenderingControl(Size size)
{
// Set Style
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.UserPaint, true);
UpdateStyles();
// Set size
Size = size;
}
/// <summary>
/// Paints the background of the control
/// </summary>
/// <param name="e">W</param>
protected override void OnPaintBackground(PaintEventArgs e)
{
// Do not paint background
}
}
}
Podobno jest potrzebny do zrobienia kontrolki okna SharpDX w oknie WFA,czytałem,że aby działało poprawnie trzeba zrobić jakiś "uchwyt" do klasy Device.Szukałem w googlach informacji na temat tych całych uchwytów ale dalej nie wiem jak to zrobić żeby naprawić mój problem.Wie ktoś jak to zrobić ?