Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3k
WPF - StartDragging populate DataObject with Image#2687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…h WPF Drag events DataObject.
AppVeyorBot commentedMar 13, 2019
amaitland left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please include a list of steps used when testing this feature.
| bitmap.Freeze(); | ||
| dataObject.SetImage(bitmap); | ||
| } | ||
| else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This should be removed if you've added support for image.
| IImagedragImage=dragData.Image; | ||
| intwidth,height; | ||
| byte[]pixels=dragImage.GetAsBitmap(1f,ColorType.Rgba8888,AlphaType.PreMultiplied,outwidth,outheight); | ||
| intstride=((width*32+31)&~31)/8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks like your usingPixelFormats.Pbgra32 below, so it should be the correct format. Use
(PixelFormats.Pbgra32.BitsPerPixel / 8) * width to calculatestride
| { | ||
| IImagedragImage=dragData.Image; | ||
| intwidth,height; | ||
| byte[]pixels=dragImage.GetAsBitmap(1f,ColorType.Rgba8888,AlphaType.PreMultiplied,outwidth,outheight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should the scale factor be dynamic based on the display? I would have though so.
amaitland commentedApr 2, 2019
@remye06 Any update on this? |
remye06 commentedApr 2, 2019
I've been unable to work on this lastly, due to my schedule, but should be in the upcoming days. |
amaitland commentedApr 3, 2019
Great 👍 If you can include details on how you've tested this, on what |
AppVeyorBot commentedApr 5, 2019
amaitland commentedMay 25, 2019
If you'd like to see this merged then if you could provided an update in the next 2-3 weeks that would be great, thanks. |
remye06 commentedMay 25, 2019
Sure, I don't really need it anymore but still want to contribute, so that the effort I put into it so far is not lost and can help someone someday. |
amaitland commentedJun 8, 2019
If you are able to provide a I can fix the code at some point once I know exactly what it does. |
remye06 commentedJul 1, 2019
I'm going to address your inquiries starting from tomorrow, as I got myself a little break. I feel very sorry for this delay. |
For instance, this image is necessary to give feedback (content displayed alongside cursor while dragging).