इसके बजाय एक वेबपेज लिंक खोलने की है, तो आप सीधे कोड अपने आप में गोपनीयता नीति कोड कर सकते हैं। App.xaml में।सीएस, निम्नलिखित कोड
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), "");
}
एक नया उपयोगकर्ता नियंत्रण
<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>
स्रोत
2012-11-12 22:03:35
हाल ही में एमएस win8 devcamp हमें बताया गया था कि आपके ऐप के लिए सेटिंग आकर्षण में आपकी ऑनलाइन गोपनीयता नीति का लिंक डालना सबसे आसान विकल्प है। – peacemaker
धन्यवाद .. अगर आप एक लिंक दे सकते हैं तो मैं सराहना करता हूं - सी # में 'सेटिंग्स आकर्षण' के लिए आप कैसे कोड करते हैं? यह मेरे प्रश्न का उत्तर होगा ... –
यहां जाएं: http://msdn.microsoft.com/en-us/windows/apps/jj674832 सी # के लिए प्रयोगशालाएं डाउनलोड करें और सेटिंग डेमो – peacemaker