GoToMapButton.cs CampusAppWP8::Utility::Lui::Button::GoToMapButton CampusAppWP8::Utility::Lui::Button //----------------------------------------------------------------------- //<copyrightfile="GoToMapButton.cs"company="BTU/IIT"> //TheMITLicense(MIT).Copyright(c)2013BTU/IIT. //</copyright> //<author>Stubbfel</author> //<date>15.10.2013</date> //<summary>Implementsthegotomapbuttonclass</summary> //----------------------------------------------------------------------- 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() { stringurlString=Constants.PathCampusmap_Campusmap; if(this.SearchTerm!=null) { urlString+="?"+Constants.ParamModelMap_SearchTermAlias+"="+this.SearchTerm; } Uriurl=newUri(urlStringasstring,UriKind.Relative); Pagepage=App.RootFrame.ContentasPage; page.NavigationService.Navigate(url); } #endregion } }