Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8516155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:20:44+00:00 2026-06-11T05:20:44+00:00

Can I use the ContactPicker contract when the app is snapped? var picker =

  • 0

Can I use the ContactPicker contract when the app is snapped?

var picker = new Windows.ApplicationModel.Contacts.ContactPicker();
picker.CommitButtonText = "Select";
picker.SelectionMode = Windows.ApplicationModel.Contacts.ContactSelectionMode.Fields;
picker.DesiredFields.Add(Windows.ApplicationModel.Contacts.KnownContactField.Email);
var contactInformation = await picker.PickSingleContactAsync();

The above code works when in fullscreen but throws the following exception on the call to PickSingleContactAsync() when snapped to the side of the screen:

System.Runtime.InteropServices.COMException was unhandled by user code

HResult=-2147467259

Message=Error HRESULT E_FAIL has been returned from a call to a COM component.

Source=mscorlib

ErrorCode=-2147467259

StackTrace:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at TouchToneDtmf.MainPage.d__e.MoveNext()
in
d:\Users\Foo\MainPage.xaml.cs:line
556 InnerException:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:20:45+00:00Added an answer on June 11, 2026 at 5:20 am

    It’s not working when the app is snapped – you should check the visual state of the app before calling the ContactPicker.

    In the official C# sample there is also method EnsureUnsnapped() you might find helpful when implementing this contract.

    Every time you call a file[/contact] picker you must first make sure that your
    app can show the file[/contact] picker by verifying that your app in not snapped
    or, if your app is snapped, that it can be unsnapped in order to show
    the file picker. Source – How to save files through file pickers

    using Windows.UI.ViewManagement;
    //...
    internal bool EnsureUnsnapped()
    {
        bool unsnapped = ((ApplicationView.Value != ApplicationViewState.Snapped) || ApplicationView.TryUnsnap());
        return unsnapped;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can use the web worker in HTML5 like this: var worker = new
I use the contact picker in this way: Intent intent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
We can use either the new condition variable primitive or windows event in order
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]
I can use the below to get the query string. var query_string = request.query;
I can use SELECT * FROM table WHERE id IN (478,278,190,890,123) to return a
You can use App.config; but it only supports key/value pairs. You can use .Net
I can use: select * from sys.tables in mssql to show a list of
I can use the following to create a function dynamically in javascript: var MyClass
Here is the code i use to open contacts picker: public void doLaunchContactPicker(View view)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.