-api-id | -api-type |
---|---|
P:Windows.System.Profile.SharedModeSettings.ShouldAvoidLocalStorage |
winrt property |
Gets a Boolean value indicating that your app should not store files on the local hard drive.
A Boolean value indicating that apps should not store files on the local hard drive. Instead, files should be saved to cloud storage.
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.
<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;
}
}