private void MainPage_Tap(object sender, GestureEventArgs e) { // perform an action to generate an obscured event. var task = new Microsoft.Phone.Tasks.PhoneCallTask(); task.DisplayName = "Manning Publications Co."; task.PhoneNumber = "888 555 1212"; task.Show(); }
private void CallLegislator_Click(object sender, RoutedEventArgs e) { var phoneCall = new Microsoft.Phone.Tasks.PhoneCallTask { DisplayName = String.Format("{0} {1}", App.ViewModel.SelectedPolitician.FirstName, App.ViewModel.SelectedPolitician.LastName), PhoneNumber = App.ViewModel.SelectedPolitician.Phone }; phoneCall.Show(); }
public void MakePhoneCall(string number, string name = null) { if (string.IsNullOrWhiteSpace(number)) throw new ArgumentNullException("number"); // NOTE: Requires ID_CAP_PHONEDIALER capabilities if (CanMakePhoneCall) { Microsoft.Phone.Tasks.PhoneCallTask dialer = new Microsoft.Phone.Tasks.PhoneCallTask { PhoneNumber = number, DisplayName = name ?? "" }; dialer.Show(); } }
private void btnCall_Click(object sender, System.Windows.RoutedEventArgs e) { if (m_tags == null) { return; } switch (m_tags.GetType().ToString()) { case "Ressive.Utils.RscTextTags_VCF": Microsoft.Phone.Tasks.PhoneCallTask pct = new Microsoft.Phone.Tasks.PhoneCallTask(); pct.DisplayName = ((RscTextTags_VCF)m_tags).Name; pct.PhoneNumber = ((RscTextTags_VCF)m_tags).PhoneNumber(0); pct.Show(); break; default: MessageBox.Show("No action defined!"); break; } }
private void PhoneApplicationPage_Tap(object sender, GestureEventArgs e) { // perform an action to generate an obscured event. var task = new Microsoft.Phone.Tasks.PhoneCallTask(); task.DisplayName = "Manning Publications Co."; task.PhoneNumber = "888 555 1212"; task.Show(); }
/// <summary> /// Handler invoked when user taps the phone number of the application /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Phonenumber_Click(object sender, RoutedEventArgs e) { Microsoft.Phone.Tasks.PhoneCallTask phonecall = new Microsoft.Phone.Tasks.PhoneCallTask(); phonecall.PhoneNumber = App.ViewModel.Restaurant.Telephone; phonecall.Show(); }