public OwnerDrawControl( IDrawDelegate drawDelegate) { if (null == drawDelegate) { throw new ArgumentNullException(nameof(drawDelegate)); } this._drawDelegate = drawDelegate; this.Loaded += Control_Loaded; this.Unloaded += Control_Unloaded; this.SizeChanged += Control_SizeChanged; // Specify a custom control template that respects the Background property and enables hit testing var controlTemplate = (ControlTemplate)global::Windows.UI.Xaml.Application.Current.Resources["OwnerDrawControlTemplate"]; this.Template = controlTemplate; // HACK: Enable hit testing this.Background = new global::Windows.UI.Xaml.Media.SolidColorBrush(global::Windows.UI.Colors.Transparent); this._graphicsManager = GraphicsManager.Shared; this._graphicsManager.Redraw += GraphicsManager_Redraw; }
internal OwnerDrawControl( IDrawDelegate drawDelegate) { if (null == drawDelegate) { throw new ArgumentNullException(nameof(drawDelegate)); } this._drawDelegate = drawDelegate; }
internal OwnerDrawControl( global::Android.Content.Context context, IDrawDelegate drawDelegate) : base(context) { if (null == drawDelegate) { throw new ArgumentNullException(nameof(drawDelegate)); } this._drawDelegate = drawDelegate; }
public PhysicsDrawView(IDrawDelegate drawDelegate, cpSpace space) { this.drawDelegate = drawDelegate; }