PhoneButton.cs CampusAppWP8::Utility::Lui::Button::PhoneButton CampusAppWP8::Utility::Lui::Button //----------------------------------------------------------------------- //<copyrightfile="PhoneButton.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>stubbfel</author> //<sience>08.07.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Utility.Lui.Button { usingSystem; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Media.Imaging; usingCampusAppWP8.Resources; usingMicrosoft.Phone.Tasks; publicclassPhoneButton:System.Windows.Controls.Button { #regionMembers publicstaticreadonlyDependencyPropertyPhoneProperty=DependencyProperty.Register("Number",typeof(object),typeof(PhoneButton),newPropertyMetadata(false)); publicstaticreadonlyDependencyPropertyDisplayNameProperty=DependencyProperty.Register("DisplayName",typeof(object),typeof(PhoneButton),newPropertyMetadata(false)); privatestaticBitmapImageicon=newBitmapImage(newUri(Icons.Phone,UriKind.Relative)); #endregion #regionConstructors publicPhoneButton() :base() { this.Content=newImage { Source=icon }; } #endregion #regionProberties publicobjectNumber { get{return(object)this.GetValue(PhoneProperty);} set{this.SetValue(PhoneProperty,value);} } publicobjectDisplayName { get{return(object)this.GetValue(DisplayNameProperty);} set{this.SetValue(DisplayNameProperty,value);} } #endregion #regionMethods protectedoverridevoidOnClick() { PhoneCallTaskphoneCallTask=newPhoneCallTask(); phoneCallTask.PhoneNumber=this.Numberasstring; phoneCallTask.DisplayName=this.DisplayNameasstring; phoneCallTask.Show(); } #endregion } }