Windows 10 Settings
In Windows 10 the user must explicitly give permission to access the user information data. The first time it runs the application, Windows 10 privacy settings automatically prompt the message box, to confirm whether the application can read the user information or not.

Later at some point of time, ifthe user doesn't like the application accessing information, then he or she can disable it (go to settings -> Privacy -> Account -> select the application and disable,

Application Setting

Later at some point of time, ifthe user doesn't like the application accessing information, then he or she can disable it (go to settings -> Privacy -> Account -> select the application and disable,

Application Setting
Application must enable the User Account information in the Package.appxmanifest file, otherwise the application can’t access the user information.
Let us see a simple example of how to read user name and display account information.
Define the User Modal class,
- public class UniversalUserInfo: INotifyPropertyChanged
- {
- private string _userName;
- public string UserName
- {
- get
- {
- return _userName;
- }
- set
- {
- _userName = value;
- OnPropertyChanged(nameof(UserName));
- }
- }
- private BitmapImage _imgStream;
- publi BitmapImageImgStream
- {
- get
- {
- return _imgStream;
- }
- set
- {
- _imgStream = value;
- OnPropertyChanged(nameof(ImgStream));
- }
- }
- private string _userType;
- public string UserType
- {
- get
- {
- return _userType;
- }
- set
- {
- _userType = value;
- OnPropertyChanged(nameof(UserType));
- }
- }
- private string _authenticationStatus;
- public string AuthenticationStatus
- {
- get
- {
- return _authenticationStatus;
- }
- set
- {
- _authenticationStatus = value;
- OnPropertyChanged(nameof(AuthenticationStatus));
- }
- }
- public eventPropertyChangedEventHandlerPropertyChanged;
- protected virtual voidOnPropertyChanged(string propertyName = null)
- {
- PropertyChanged ? .Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- }






Vinoth RajendranPosted Apr 26, 2016, 12:42 AM
please post the sample source code in Forum section , will check and answers
shagufta syedPosted Apr 22, 2016, 3:56 AM
This returns null for me. Do u know why? I have added the user account info capability to app manifest too.
Luiey AckermanPosted Apr 10, 2016, 11:03 PM
Deadly wanted finding something like this. Thanks for sharing
Asfend YarPosted Feb 29, 2016, 3:02 AM
nice
Santhakumar MunuswamyPosted Jan 17, 2016, 2:16 PM
Thanks for nice share
Shubham KumarPosted Jan 16, 2016, 12:54 PM
nice explain
Nanddeep NachanPosted Jan 16, 2016, 5:50 AM
Nice share