public DepartureAreaControl(Thickness margin) { InitializeComponent(); //ustawienie marginesu this.Margin = margin; if (margin.Left < 0) { direction = HorizontalRoadSign.Lewo; } else if (margin.Left == 0) { direction = HorizontalRoadSign.Prosto; } else if (margin.Left > 0) { direction = HorizontalRoadSign.Prawo; } //dodanie DragDrop handlerow dla kontrolki DragDrop.AddDragEnterHandler(this, DepartureAreaControl_OnDragEnter); DragDrop.AddDragLeaveHandler(this, DepartureAreaControl_OnDragLeave); DragDrop.AddDropHandler(this, DepartureAreaControl_OnDrop); }