SharedModeSettings
SharedModeSettings
SharedModeSettings
SharedModeSettings
Class
Definition
Provides access to the settings for shared mode. For example, devices with large screens could support communal shared apps.
public : static class SharedModeSettingspublic static class SharedModeSettingsPublic Static Class SharedModeSettings// You can use this class in JavaScript.
- Attributes
| Device family |
Windows Team Extension SDK (introduced v10.0.10240.0)
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.System.Profile.ProfileSharedModeContract (introduced v1)
|
Remarks
For more info on when SharedModeSettings is used on Desktop, see Set up a shared or guest PC with Windows 10.
Properties
IsEnabled IsEnabled IsEnabled IsEnabled
Gets a Boolean value that indicates if shared mode is currently enabled.
public : static PlatForm::Boolean IsEnabled { get; }public static bool IsEnabled { get; }Public Static ReadOnly Property IsEnabled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
A Boolean value that indicates if shared mode is currently enabled.
Examples
if (!Windows.System.Profile.SharedModeSettings.IsEnabled)
{
LaunchWelcomeExperience();
}
Remarks
Returns true when the EnableSharedPCMode policy is set.
Returns true when running on a Surface Hub.
Examples of changes you might make in an education environment:
- Not launch the first-run experience
A true value means the PC is running in scenarios where multiple consecutive users use the PC. These user accounts may be deleted, which means that users may have a new account created each time they use the same device.
ShouldAvoidLocalStorage ShouldAvoidLocalStorage ShouldAvoidLocalStorage ShouldAvoidLocalStorage
Gets a Boolean value indicating that your app should not store files on the local hard drive.
public : static PlatForm::Boolean ShouldAvoidLocalStorage { get; }public static bool ShouldAvoidLocalStorage { get; }Public Static ReadOnly Property ShouldAvoidLocalStorage As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
A Boolean value indicating that apps should not store files on the local hard drive. Instead, files should be saved to cloud storage.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.System.Profile.ProfileSharedModeContract (introduced v2)
|
Examples
<StackPanel>
<ListView x:Name="ThisPC" Header="This PC" .../>
<ListView x:Name="OneDrive" Header="OneDrive" .../>
</StackPanel>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (Windows.System.Profile.SharedModeSettings.ShouldAvoidLocalStorage)
{
ThisPC.Visibility = Visibility.Collapsed;
}
}
Remarks
If true, then your app should not show local storage locations in its UI.
Returns true when the RestrictLocalStorage policy is set.
A true value means the PC is running in a scenario where apps should hide all entry and save points to the local disk. Windows File Explorer is disabled so customers won’t be able to navigate to any local storage (except downloads, removable drives, and mapped network drives) to access those files.