Bop*_*Bop 7 c# xaml microsoft-metro windows-8 .net-4.5
我的应用程序认证失败的原因是:"4.1.1如果您的应用程序具有网络能力,则必须拥有隐私声明......您必须在应用程序的"描述"页面以及应用程序的设置中提供对隐私策略的访问权限显示在Windows设置超级按钮中."
他们在说什么?什么描述?如何设置Windows设置中显示的信息?
该应用程序是C#
要添加指向您的隐私权政策的链接:
//using Windows.UI.ApplicationSettings;
//using System;
// You can put this event handler somewhere in a main class that runs your app.
// I put it in may main view model.
SettingsPane.GetForCurrentView().CommandsRequested += ShowPrivacyPolicy;
// Method to add the privacy policy to the settings charm
private void ShowPrivacyPolicy(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy","Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl(); });
args.Request.ApplicationCommands.Add(privacyPolicyCommand);
}
// Method to launch the url of the privacy policy
async void LaunchPrivacyPolicyUrl()
{
Uri privacyPolicyUrl = new Uri("http://www.yoursite.com/privacypolicy");
var result = await Windows.System.Launcher.LaunchUriAsync(privacyPolicyUrl);
}
Run Code Online (Sandbox Code Playgroud)
您应该说明您的应用是否正在收集任何信息以及您正在使用它做什么.如果你不这样做,仍然这样说.
根据他们的规则,您应该在两个不同的位置显示此类通知:
我假设后者可以是任何自定义标签或文本,显示控件显示此类通知.请阅读4.1.1节.在这里.请记住,这可以是发送到互联网的任何数据,例如高分,配对信息或者可能只是对数据进行一些更新检查.
如果你正在使用某种高分榜,你可以只包含一些这样的通知:
如果您选择这样做,此应用程序会将您的昵称传送给我们的服务器.我们不会与任何第三方共享此数据,只会用它来编制官方高分列表.
我不是律师,因此根据您的应用程序不能给您任何真正适当和准确的政策,但它应该让您了解他们正在寻找什么.如果您仍然不确定,请尝试检查应用程序与您的类似的东西.
有关设置魅力的更多信息可以在MSDN和本博文中找到.
小智 5
您可以直接在代码本身中编写隐私政策代码,而不是打开网页链接.在App.xaml.cs中,粘贴以下代码
private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
var privacy = new SettingsCommand("PrivacyPolicy", "PrivacyPolicy", (handler) =>
{
var settings = new SettingsFlyout();
settings.Content = new PrivacyUserControl();
//settings.HeaderBrush = new SolidColorBrush(_background);
//settings.Background = new SolidColorBrush(_background);
settings.HeaderBrush = _Hbackground;
settings.Background = _background;
settings.HeaderText = "Privacy Policy";
settings.IsOpen = true;
});
args.Request.ApplicationCommands.Add(privacy);
UICommandInvokedHandler handler1 = new UICommandInvokedHandler(onSettingsCommand);
// throw new NotImplementedException();
}
void onSettingsCommand(IUICommand command)
{
SettingsCommand settingsCommand = (SettingsCommand)command;
((Frame)Window.Current.Content).Navigate(typeof(HelpPage), "");
}
Run Code Online (Sandbox Code Playgroud)
创建一个新的用户控件
<UserControl
xmlns:common="using:App.Common"
x:Class="App.UserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<StackPanel >
<TextBlock Foreground="White" Text="Privacy Policy" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="26.667" />
<TextBlock Margin="0,50,0,0" Foreground="White" Text="put your notes here" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="18" TextWrapping="Wrap" />
</StackPanel>
</Grid>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3388 次 |
| 最近记录: |