For I have a javascript version GMap.html, I can successfully display it in the WP7 WebBrowser, but I cannot make it pan or zoom in; is there a way to disable the default gesture behavior(such as fix the position the map's div; if I slide up, the map pans to north, when I double touch, it zooms) to allow the GMaps panning or zooming?
Here attached a very simple sample, when opening the emulator, you can see the map is displayed, but when we want slide up/down to pan north or south, it works like panning the web browser up or down.
http://hotfile.com/dl/135072503/ec55e86/PhoneApp1.7z.html
Thanks,
You should be able to hook the manipulation events from the Border that surrounds the ContentPresenter in the visual tree for the WebBrowser control to intercept them before they get to the PanZoomContainer, which would allow you to do whatever you need to with the content.
Colin Eberhardt has a great post about it on his blog where he basically disabled the standard manipulation events for doing HTML5 apps on Windows Phone, but the concept is still the same.
Related
I would like to define a non-rectangular clickable "hit area" for a button. I am happy to define this custom shape using a UWP XAML path, or by using a PNG with transparent areas.
The following question explains how to use an XAML path for a button's appearance, but the result still seems to use a rectangular bounding box hit area. XAML UWP Button with a polygonal shape
There are also posts explaining how to override the Image class, intercepting the 'click' event, and determining the opacity of the pixels under the mouse cursor. This would solve my problem, but this solution only applies to WPF.
Does anyone know of a solution for UWP?
It looks like I can just use the raw < path > element, and use its pointer events directly.
I just started to work with delphi touch gestures. Because I have never done anything with multitouch, I want to first create a small image viewer with move/zoom/rotate functionality.
I have placed a TImage on a TScrollBox. Actually, when the onGesture method of the image is called, EventInfo is read to decided which gesture was recognized to show it in a message box. Like that, all of the gestures can be recognized but the pan gesture. I think this one is needed to move a picture when it's zoomed in by tapping and moving it. What am I doing wrong?
And is there a useful framework with built-in zoom/rotate functionality maybe?
The scrollbars already take care of panning.
I have just upgraded Unity to version 4.6 and tried to create a button by Create -> UI -> Button.
However, this button doesn't show up in #Screen tab but it does in Game tab.
Please look at the screen shoot below:
Another question is: The default width and height when creating a new button is 160 x 30. When I change the source image with my own image button, I have to change the width and height parameters in rect transform. Is there any faster way to automatically obtain new width and height based on the image which I insert?
Thank you very much!
First, double click the button in your hierarchy and see that it indeed does not show in the Scene view, excluding any kind of zoom problem. (By the way, I'm assuming you mean "Scene" and not "Screen", right?) Things in different cameras or canvases might have very different scales but appear correctly in the Game view. I don't know how used you are to Unity, so I'm sorry if this sounds obvious. :)
Next, check the dropdown labeled "Layers" on top of Unity's editor, to the right of the Play, Pause and Step buttons. See if the layer of your button (which in this case is "UI") is visible. It should have an open eye icon next to it.
Regarding your other question, after dragging your sprite to the Image component, you can press the "Set Native Size" button, which will set the size of your object to the dimensions of your Sprite. Regarding the new UI, I think this is as automatic as it gets. Note that "Set Native Size" will only appear if your Image type is set to Simple (probably what you want) or Filled in the component.
I had the same problem before and here's a possible solution.
By default, the editor camera (Scene Tab) renders the World Space,
so your Canvas component's render mode should be set to "World Space".
The problem may only occur when you're trying to (or supposedly) render your UI in Screen Space - Overlay or Screen Space - Camera in the Canvas component.
So if you want to properly edit UI objects in the scene tab/window; set the Canvas component's render mode to World Space.
We don't have this problem in Unity 4.x before because I think Unity automatically renders any render mode from the Canvas component, however, that doesn't happen in Unity 5.x. I'm guessing it's either intentional that they do that or it's a bug on Unity UI feature.
How is it possible to determine the horizontal offset of the Windows 8.1 HubControl?
I would like to adjust the margin of my title by the amount of horizontal offset.
Interestingly I notice in the Bing News app that the title 'Bing News' starts off white when it is over the lead image. However, when you scroll right, and the title is now over the application's (light) background (having scrolled past the image), the title background colour now changes to black.
See image below. Shows the top most part of the screen. Images 1-3 show when the page has scrolled right and the BING NEWS title has changed colour once it is no longer over the image.
I assume this is done via the offset again so I hope that my idea is possible.
The Hub control has a child element which is a ScrollViewer. You can parse the visual tree to retrieve the ScrollViewer, or you can use some neat extensions such as the ones in WinRTXamlToolkit which allow you to do a call such as myHubControl.GetFirstDescendentOfType<ScrollViewer>(). Then, you can retrieve the HorizontalOffset from this object.
with windows phone 7 i am using teh bing map control. i have it working just fine. however, the zoom buttons (+,-) are at the bottom of the page and difficult to see.
The buttons have black border with black text. They are easy to see on a light map background, but with black background they are in essence hidden.
Does anyone have an idea on how to make them easier to see?
As invalidusername said you can use the pinching to zoom in and out and it is probably a better way to do it. But in my case I haven't a device or touch screen so needed to use buttons in this way to test my map.
Rather than using the built-in zoom buttons I looked at the sample code from this tutorial which has icons for zoom in/out and data bound them to the zooming of the map. Adapting it to my needs. It works pretty well:
http://msdn.microsoft.com/en-us/wp7trainingcourse_usingbingmapslab_topic2
You can change the positioning/images etc.
As per DanielBallinger's comment the link above seems to no longer work. The following does:
Bing Maps Tutorial