Tags: cat shanghai device src Convert media system put Ros
From today's development, we start a new journey, the next lesson we should be familiar with the initiator and selector, in fact, the two are the same, there is no fundamental difference, the initiator has returned results, such as open search application to search, and the selector is the return content, such as select a picture.
So, what are starters and selectors? In fact, we can easily understand, plainly speaking, is to use the system comes with components or applications. Right, that's it, I said, sometimes a lot of concepts are just scary names, actually used is very simple, such as this launcher and selector.
In the end is not very simple, practice a little to know, this series of tutorials called "easy to get started", since it is easy to call, painful things will not call everyone to do, and MS has always focused on user experience, will not make everyone miserable.
To summarize, the use of initiators and selectors is the same way, are the following steps, but the selector because there is a return content, so there will be one more step.
One, the instantiation of the component, is the new one;
Second, set the relevant parameters or attributes, such as you want to call, you have to set a number, or you hit a bird ah;
Third, display application components, since the call to the System program, let the user operation, of course, show out;
Four, (optional) processing the return data, this is the selector.
Today, the first component, Bingmapsdirectionstask, is to launch Bing Maps to locate the driving route, yes, like the navigation system?
There are two ways to use the launcher, one is to start and end the tag, that is, from where to where, such as from Wuhan to Shanghai, then the start tag is Wuhan, the end tag is Shanghai, the other way is to start and end position, such as longitude, latitude and so on.
First, let's demonstrate the simple, tabbed navigation.
The interface is very simple, I believe that through the previous study, we all know how to get, as long as you can enter the start and end tag.
Here is the background C # code:
Remember to introduce Microsoft.Phone.Tasks space, all the initiators and selectors are inside.
OK next, we'll use a method that can be positioned over longitude and latitude.
First, add a reference, right-click the reference in the project, add a reference, and select System.device, OK.
Then do a good job of the interface, the longitude and latitude to start with, and latitude and longitude of the ending position.
Then there's the code.
Windows phone Development (22): Initiator and selector bingmapsdirectionstask