GoToMapButton.cs CampusAppWP8::Utility::Lui::Button::GoToMapButton CampusAppWP8::Utility::Lui::Button System::Device::Location //----------------------------------------------------------------------- //<copyrightfile="GoToMapButton.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>stubbfel</author> //<sience>08.07.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Utility.Lui.Button { usingSystem; usingSystem.Device.Location; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Media.Imaging; usingCampusAppWP8.Resources; usingMicrosoft.Phone.Tasks; publicclassGoToMapButton:System.Windows.Controls.Button { #regionMembers publicstaticreadonlyDependencyPropertySearchTermProperty=DependencyProperty.Register("SearchTerm",typeof(object),typeof(GoToMapButton),newPropertyMetadata(false)); privatestaticBitmapImageicon=newBitmapImage(newUri(Icons.Campus,UriKind.Relative)); #endregion #regionConstructors publicGoToMapButton() :base() { this.Content=newImage { Source=icon }; } #endregion #regionProberties publicobjectSearchTerm { get{return(object)this.GetValue(SearchTermProperty);} set{this.SetValue(SearchTermProperty,value);} } #endregion #regionMethods protectedoverridevoidOnClick() { MapsTaskmapsTask=newMapsTask(); mapsTask.Center=newGeoCoordinate(51.766788,14.326681); mapsTask.SearchTerm=this.SearchTermasstring; mapsTask.ZoomLevel=15; mapsTask.Show(); } #endregion } }