private Dictionary<View, InternalDragAndDropEventHandler> targetEventDictionary = new Dictionary<View, InternalDragAndDropEventHandler>();
private View mShadowView;
private Window mDragWindow;
- private const int shadowWidth = 150;
- private const int shadowHeight = 150;
+ private int shadowWidth = 100;
+ private int shadowHeight = 100;
[EditorBrowsable(EditorBrowsableState.Never)]
private DragAndDrop() : this(Interop.DragAndDrop.New(), true)
throw new ArgumentNullException(nameof(shadowView));
}
+ shadowWidth = (int)shadowView.Size.Width;
+ shadowHeight = (int)shadowView.Size.Height;
+
+ // Prevents shadowView size from being smaller than 100 pixel
+ if (shadowView.Size.Width < 100)
+ {
+ shadowWidth = 100;
+ }
+
+ if (shadowView.Size.Height < 100)
+ {
+ shadowHeight = 100;
+ }
+
if (null == mDragWindow)
{
mDragWindow = new Window("DragWindow", new Rectangle(-shadowWidth, -shadowHeight, shadowWidth, shadowHeight), true)
};
}
- shadowView.SetSize(shadowWidth, shadowHeight);
+ mDragWindow.SetWindowSize(new Size(shadowWidth, shadowHeight));
shadowView.SetOpacity(0.9f);
if (mShadowView)
{
Tizen.Log.Debug("NUIDnDSource", "StartDragAndDrop");
shadowView = new ImageView(Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png");
+ shadowView.Size = new Size(150, 150);
DragData dragData;
dragData.MimeType = "text/uri-list";
dragData.Data = Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png";