how to make wp7 map control zoom buttons easier to see - windows-phone-7

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

Related

Custom Button in Swift and MacOS

In MacOS there is a simple App called Calculator, that I would like to recreate using Swift for learning purposes. A button like the plus button on the calculator has two images associated with it, one when the button is up and one when the button is down, as seen on the images below.
As you can see, when the + button is pressed down, its image changes to a darker orange color and the text gets a dark grey color. My question is: How to implement this button behavior?
Is it possible to do it with NSButton (and if so how)? or is it easier to implement it using CALayer? Or maybe there is some other way that I have not thought of?
You should be able to use a single image and configure it in code or in your asset catalogue to be a "template image". That means the shape is taken into consideration, much like a stamp, and the stamped-out area is filled with color dynamically. That means you don't have to provide a white and dark gray/black variant. One variant will suffice, usually black to see the lines well, and the rest can be configured through.
See the SO question "How to NOT highlight the NSButton's template image when clicked?" for details about the setup: How to NOT highlight the NSButton's template image when clicked?

using delphi touch gestures for image viewer

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.

Notification area flyout link area

I made a flyout window in the notification area using WinAPI and my goal was to make it similar to the flyout windows that show up when you click some of the icons in the notification area, like the Volume icon.
I already succeeded in making it look and behave similar to the other ones, but there is one thing I can't seem to figure out. The link area of the flyout windows has a darker blueish background and there is a subtle difference in the look between Windows 7 and Windows 8. A picture of it in Windows 7 can be seen here
http://msdn.microsoft.com/en-us/library/windows/desktop/aa511448.aspx#flyouts
I achieved this by painting this link area of my flyout window manually in the right colors (including the gradient at the topmost part of the section) using the WM_PAINT message, but I just feel like it's too much of a hack, especially because it's not affected by changing themes in Windows. For example, if I set the "Windows Classic" theme this area should be grey and not blue.
So, my question is, am I missing something in how this can be achieved without painting the window manually. I noticed that the details pane in Explorer windows in Win 7 has the same look. I've searched quite a bit for answers but I haven't found anything yet. This is my first time doing a GUI using the WinAPI so I have very little experience, and therefore I'm assuming there is something that I just don't know about.
UPDATE:
I did manage to figure out how to draw this area without painting it manually. It can be drawn by using the OpenThemeData and DrawThemeBackground functions
HTHEME aeroTheme = OpenThemeData(hWnd, L"FLYOUT");
DrawThemeBackground(aeroTheme, hdc, FLYOUT_LINKAREA, 0, &rect, &rect);
This obviously only works when themes are enabled, so for non-themed cases I draw a normal rectangle with the appropriate color.
I'm not an expert in WinAPI so I can't offer any advice on achieving the look you want without manual painting.
However, if you're successfully achieving the appearance for a particular color theme, I'd suggest you look at the GetSysColor function and use this when creating your brushes for painting. This should allow you to get the correct colors based on the theme that has been set. More info (including a swatch table) can be found here.
Hope this helps.

UI Like Youtube in Android (Tablet)

I've spent 2 hours looking for a solution. I need to make a design
like the Youtube UI (Tablet UI) where it shows a vertical scroll, but
in each row there are 4 videos (landscape view). I've tried to do
something similar, but i couldn't =(
Is there any place where i can get the source code of the youtube
application for Tablet? Or maybe some resource to solve this? :(
BTW, my try was designing UI with scrollView, LinearLayout and my_item.xml, i tried to inflate my_item.xml adding programmatically into the linearlayout (horizontal orientation), but it doesn't work in the way that i want. I need something like a linearlayout but with horizontal and vertical orientation at the same time (something like a div).
I was thinking to use a ListView and a custom adapter (with my_item.xml), but i'm not sure if this can be the best solution.
Thxs
You should create seperate resources for each layout.
For example if the user is in Portrait mode you would have the correct layout in.
layout-port: layout for portrait orientation
layout-land: layout for landscape orientation
Read more on providing alternative resources here
Also i would recommend to read more on Handling runtime changes
This will help you with recognizing when the user changes orientation. You could actually use this guide and when the user flips the devices orientation you could then change the layout. Keep in mind hard coding this can be dangerous though. I would recommend using the layout folders.
Good luck!
Finally i solve my problem.
It works with a linearLayout(vertical) and adding linearlayout(horizontal) for each row. And obviously managing my scrollview.
BTW, i still think android should have a layout like a "div".
Thxs all

How to support Pan/Zoom with Gmap in WebBrowser?

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.

Resources