I'm implementing some drag/drop functionality from a button onto a canvas on my html5 site. When the drag operation is over the canvas, I start drawing custom shapes under the cursor. However, by default the button's image is included in the drag process thereby overlaying my canvas drawings. Is there any way to hide the default drag image? It seems that one can call setDragImage but that's not supported in IE9 and calling setDragImage(null, 0, 0) doesn't work in Chrome either. What are my options?
edit: to be clear, I'd like to hide the ghost image that is created with native drag/drop
Related
Cheers folk,
By default, the drag and drop of text works as expected in the web viewer of the HTML editor. However, if I want to move the position of an image that is embedded with HTML code, it converts the image to the URL...
Do I really need to implement or modify the 6 drag listeners (for example OnDragDetected, OnDragDone ...) of the webview or is there a more comfortable way?
Thanks for any help
On a desktop, if I make an image a link, I can make the mouse change to a pointer to indicate that the image is clickable. How do people normally indicate a clickable image on mobile since there is no mouse?
The images here show the animated autosizing images available in the Size Inspector Utility. Why am I not able to see those images in my xib files or my storyboards? That part of the Size Inspector is invisible on my computer. When I am in the Size Inspector and then click on one of the other Inspector's buttons, I can see the desired image flash on the screen for an instant before the other Inspector comes into view.
If I limit WebBrowser's height, and content is longer, scrollbar is created inside the WebBrowser (effectively, HTML page is long), similar to IE in WP7. This scrollbar behaves the way I want to - after swift swipe it continues to scroll, slowing down.
But if I place a div with a scrollbar in the WebBrowser content, this scrollbar behaves like regular HTML scrollbar, it does not keep scrolling after user stops touching the display.
Is there a way to make this work too ?
Thanks
No, not easily. The WP7 IE9 browser control supports the overflow:scroll CSS property that allows the user to scroll content within the current page. It is worth noting that most Android and iPhone browsers do not support this, although it has been added in iOS5. None of these browser support inertia scrolling for overflow:scroll, WP7 included.
The only way to get inertia scrolling for overflow content is to do it yourself using JavaScript. For WebKit browsers there is a popular library, iScroll, that provides this functionality. However, it does not work for WP7 (due to lack of CSS3 3D transforms that are used to push the scrolling content onto a different layer for hardware acceleration) - so you will need to write your own implementation. Good luck!
I have written a windows phone application. When the application starts up it shows the splash screen which is cool and i can change the image. But is there a way to add a loading animation like those dots moving across the screen.
It would be nice if i can add one of those animation in the splash screen. Can it be done. if yes please add in your answers.
As of right now there is no way to replace the loading image that shows up with an animation. Although there are workarounds:
Remove the image all together. Might want to be careful though because Microsoft requires that the application show some kind of feedback to the user within a few seconds of launching the app. Use this only if your app loads really fast.
Display a snap shot of the loading screen as an image so when the app does load you can show an animation with the same background image and it appears that its the same loading screen.
In your case I would recommend using a popup control with a loading animation inside (Option 2). To learn how to create a popup go here. Or if you want a well documented popup I know telerik has there own version as well.
Next place the loading message in a textblock or put your own image and animation inside of the popup. Obviously the easiest animation would be to use the Performance Progress Bar in the silverlight toolkit.
Now what you'll want to do is set the popup opened by default. Whenever your processing is done all you have to do is set the popup visibility to hidden in your C# code.
Some examples of how this is implemented can be found here:
Creating a Splash Screen
Creating an Animated Splash Screen
All About Splash Screens
And here's an example for an XNA game:
Creating a Splash Screen for your XNA game