slide-in search box on windows phone (like in the bing maps app) - windows-phone-7

In the bing maps app on windows phone, when I click the search button I get a search box sliding in from the top of the screen, and the keyboard sliding in from the bottom. I want to achieve the same behaviour in my own windows phone app (based around a bing map control).
I will want a few drop-in boxes, such as for setting up a filter (which will need a few check boxes and text entry), and adding an item (which will require a text entry for the name, and ideally still allow the map in the main panel to be panned to fine-tune the location of the item).
I'm pretty sure the keyboard comes up automatically when a textbox gets focus, but I'm not sure what might be the best approach for dropping in the search box. It looks like it would need something with storyboards/animations/projections, but I haven't found a clear standard approach so far, and I want to make sure I do it the right way from the start (as I don't really have time to do it twice).
Is there a standard/best practice way to achieve the effect?

Yes, and you don't need a single line of code. You can express the whole animation using XAML. Get a text on Silverlight and read the chapters on animation with particular reference to storyboards and Easing.

Related

How to implement a threaded view?

I need to implement a threaded view of sorts in an old VB6 app. It should look similar to this:
So, it's like a TreeView of sorts but there are buttons on the right (for each row) that could be pressed. The view does not need to collapse - it always stays in the expanded mode. The users should be able to respond to each node (via the comment button on the far right). And, of course, users should be able to scroll through the entries.
What are some of the ways I could implement this? I am open to 3rd party controls, paid or not.
VSFlexGrid has an outline mode. You can set the indent per row via the RowOutlineLevel property. It supports word wrap, images, etc within its cells/columns so you should be able to get pretty close to what you want. It also supports owner-drawn which lets you fully customize the cell painting (for example, to get those rounded corners).
I'm sure there are other controls out there as well...

Windows Phone 7 Map List Best Practices

On the IPhone, the map control allows you to switch between a list mode and map mode easily. I've been trying to find examples of this for WP7 but am at a loss.
Is there a best practice for implementing a list of objects on a map?
If not, do we just do it manually, I.E. Save the dataset and display it as a listbox or something?
If you do it manually, where is the best place to put a button to switch you between the 2 screen styles? I feel like that app bar isn't right.
I don't want to copy the IPhone UI standard and have a button in the title bar, although I'm running out of options.
For one "best practice" I'd take a look at how the default Bing Maps app works - it provides a "results list" text menu item accessible from the ApplicationBar - and this is displayed via a full screen dialog (at least I think that's what it is).
However, that is only one "best practice" - I don't think their UI is perfect for all apps.
Application bar is fine, just make sure the buttons are in the same positions for each bar and that toggling views 10 times does not require pressing Back 10 times to go to the previous page, maybe use a different page transition so it doesn't feel like every other transition on the app.

Visual C# Express 2008 Form Designer AutoScroll

This may not be the kind of question one should ask on StackOverflow, but here's a frustration that I've been trying to find a work-around for.
When using the form designer, suppose the entire form does not fit in the space allotted to the form designer, and I have a control say, down near the bottom of the form.
If I try to re-size that control, or move it using the mouse, the work area will auto-scroll to the top of the work area. This essentially pulls my control to the top of the screen. It isn't possible to scroll with the scroll wheel while "holding" a control, and even ScrollLock does nothing for me.
Is there any way to just turn the auto-scrolling off? That way I can at least work on my form without guessing numbers to type into the properties window.
Can't you just turn off autoscroll for the form?
I think it's off by default.
Form.AutoScroll = False

how to access current word in any program

Answers.com has a taskbar application that when you ALT + mouse-click on a word in any program it will pop up a window with information pulled from their website.
My question is-- what are the actual programming mechanics and APIs used to do something like this? I don't have Windows application programming experience and am trying to figure out where to start. How do you access the current word pointed to by the mouse?
Anyone aware of any examples or open source software that does anything like this?
It's been a while and the last time I did something like this it was within my own wysiwyg editor so I had full access to all font characteristics needed to calculate which word was clicked by the mouse.
Maybe there's a n easy way to do this if all your apps are .NET or com or share some other framework which provides a way to retrieve this directly.
Via the API, I would look into hooking the keyboard and mouse messages so that your app can pre-process every mouse click on other applications - start with SetWindowsHookEx and read everything you can about hooking messages.
After getting your app to pre-process the messages, you then need to grab the text being clicked. Since text can be painted onto a device context in many different ways, you may be best off doing a screen scrape of the clicked area because the text may only exist as a bitmap. If this is the case, you have to perform some OCR to translate the scraped bitmap back into text. In other cases, the text may reside in the window as text - the WM_GETTEXT message may return this text from some types of windows (e.g. textboxes, buttons, etc.) but for normal windows, this message only return the title in the caption bar.
Sorry I don't have any definite answer, but this may get you started in the right direction.

Implementing "scrubby sliders" in Cocoa?

How would I go about implementing something along the lines of "scrubby sliders", like in Photoshop and quite a few other image-processing applications?
They are slightly hard to describe.. basically you have a regular numeric input-box, but you can click-and-hold the mouse button, and it functions like a slider (until you release). If you click in the box, you can select text, edit/paste/etc as usual.
The Photoshop docs describe it, and I put together a quick example video (an example of the sliders in Shake)
Another similar implementation would be the jog-wheel in Final Cut Pro, which functions similarly, without the numeric readout being underneath.
I can't seem to find any mention of implementing these, although there is probably alternative names for this. It is for a OS X 10.5 Cocoa application.
It is for a colour-grading application, where a user might need to make tiny adjustments (0.001, for example), to huge adjustments (say, -100 +100) on the same control. A regular slider isn't accurate enough over that range of value.
Copy-and-pasting values into the box would be a secondary concern to scrubbing the values, and the Photoshop/Shake setup really well. The unobviousness of the control is also of a low concern, as it's not a "regular desktop application"
I've encountered those. They suck, because they prevent the user from dragging to select the text of the number.
A better idea would be a miniature slider beneath the field that expands to a full-size slider when the user holds down the mouse button on it and collapses back to its miniature size when the user releases the mouse button. This way, the selection behavior is still available, but you also provide the slider—and in a more obvious way.
There's no built-in class in Cocoa for either one. You'll have to implement your own.
I doubt that this exists in Cocoa framework. As far as I remember it is not mentioned in the Apple Human Interface Guidelines.
You can develop one yourself by using a custom view and tracking mouse events (-mouseDown:, mouseUp:, -mouseDragged:).

Resources