本文整理匯總了C#中Windows.UI.Xaml.Controls.SelectionChangedEventArgs類的典型用法代碼示例。如果您正苦於以下問題:C# SelectionChangedEventArgs類的具體用法?C# SelectionChangedEventArgs怎麽用?C# SelectionChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SelectionChangedEventArgs類屬於Windows.UI.Xaml.Controls命名空間,在下文中一共展示了SelectionChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: cmbLanguage_SelectionChanged
private void cmbLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//set current Language
string selectedValue = (string)cmbLanguage.SelectedValue;
if (selectedValue == "中文(中華人民共和國)")
{
if (Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride != "zh-Hans-CN")
{
this.currentLanguage = "zh-Hans-CN";
this.txtLanguageTip.Visibility = Visibility.Visible;
this.btnClose.Visibility = Visibility.Visible;
}
else
{
this.txtLanguageTip.Visibility = Visibility.Collapsed;
this.btnClose.Visibility = Visibility.Collapsed;
}
}
else
{
if (Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride != "en-US")
{
this.currentLanguage = "en-US";
this.txtLanguageTip.Visibility = Visibility.Visible;
this.btnClose.Visibility = Visibility.Visible;
}
else
{
this.txtLanguageTip.Visibility = Visibility.Collapsed;
this.btnClose.Visibility = Visibility.Collapsed;
}
}
}
示例2: listBox_SelectionChanged
private async void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string item = listBox.SelectedItem.ToString();
if (item.Equals("Do I have to register to avail the services?"))
{
await new MessageDialog("Yes, you must register to avail our services. This would help you to store your information with us and you do not have to enter your details everytime you use this app.").ShowAsync();
}
else if (item.Equals("Are there any registration charges for creating an account?"))
{
await new MessageDialog("No, there are no registration charges applicable for creating an account with us. It is absolutely free of cost.").ShowAsync();
}
else if (item.Equals("What should I do if I have trouble with logging in?"))
{
await new MessageDialog("Follow these instructions if you face an issue logging in: Check your login details. Make sure your username and password should match with the signup credentials. If you have forgotten your password, reset your password using the ‘Forgot your Password’ link on the sign-in page. If you are still unable to access your account, please contact us. We will resolve the issue at the earliest.").ShowAsync();
}
else if (item.Equals("Should I be concerned with the privacy of my personal details I have shared with the app?"))
{
await new MessageDialog("Do not worry! We are absolutely committed to safeguarding your personal information. The personal information collected is to validate your identity, as well as to provide us with a way to get in touch with you if the need should arise. We follow strict security procedures in the storage and disclosure of information which you have given us, to prevent unauthorised access. We do not pass on, trade or sell your personal information to anyone.").ShowAsync();
}
else if (item.Equals("What if I have additional questions?"))
{
await new MessageDialog("If you have any additional questions, comments or other general customer service inquiries, please submit your query using contact us link. We will resolve the issue at the earliest.").ShowAsync();
}
else
{
}
}
示例3: Filter_SelectionChanged
/// <summary>
/// Invoked when a filter is selected using the ComboBox in snapped view state.
/// </summary>
/// <param name="sender">The ComboBox instance.</param>
/// <param name="e">Event data describing how the selected filter was changed.</param>
void Filter_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// Determine what filter was selected
var selectedFilter = e.AddedItems.FirstOrDefault() as Filter;
if (selectedFilter != null)
{
// Mirror the results into the corresponding Filter object to allow the
// RadioButton representation used when not snapped to reflect the change
selectedFilter.Active = true;
// TODO: Respond to the change in active filter by setting this.DefaultViewModel["Results"]
// to a collection of items with bindable Image, Title, Subtitle, and Description properties
// Ensure results are found
object results;
ICollection resultsCollection;
if (this.DefaultViewModel.TryGetValue("Results", out results) &&
(resultsCollection = results as ICollection) != null &&
resultsCollection.Count != 0)
{
VisualStateManager.GoToState(this, "ResultsFound", true);
return;
}
}
// Display informational text when there are no search results.
VisualStateManager.GoToState(this, "NoResultsFound", true);
}
示例4: Filter_SelectionChanged
/// <summary>
/// Invoked when a filter is selected using the ComboBox in snapped view state.
/// </summary>
/// <param name="sender">The ComboBox instance.</param>
/// <param name="e">Event data describing how the selected filter was changed.</param>
async void Filter_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// Determine what filter was selected
var selectedFilter = e.AddedItems.FirstOrDefault() as Filter;
if (selectedFilter != null)
{
// Mirror the results into the corresponding Filter object to allow the
// RadioButton representation used when not snapped to reflect the change
selectedFilter.Active = true;
ElementsDataSource model = new ElementsDataSource();
await model.LoadElements();
var elements = model.Elements.Where(t => t.Name.ToLower().Contains(((string)this.DefaultViewModel["QueryText"]).ToLower())).AsEnumerable();
this.DefaultViewModel["Results"] = elements;
selectedFilter.Count = elements.Count();
// Ensure results are found
object results;
if (this.DefaultViewModel.TryGetValue("Results", out results) && elements.Count() > 0)
{
VisualStateManager.GoToState(this, "ResultsFound", true);
return;
}
}
// Display informational text when there are no search results.
VisualStateManager.GoToState(this, "NoResultsFound", true);
}
示例5: itemListView_SelectionChanged
void itemListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (this.UsingLogicalPageNavigation())
{
this.navigationHelper.GoBackCommand.RaiseCanExecuteChanged();
}
}
示例6: menuItems_SelectionChanged
private void menuItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if(Home.IsSelected)
Frame.Navigate(typeof(MainPage));
else
Frame.Navigate(typeof(MainPage));
}
示例7: NavMenu_SelectionChanged
private void NavMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var listBox = (ListBox)sender;
if (listBox.SelectedIndex == -1) return;
NavStrip.IsPaneOpen = false;
ContentFrame.Navigate(((NavItem)listBox.SelectedItem).Page);
}
示例8: listBox_SelectionChanged
private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var selectedId = (sender as ListBox).SelectedIndex;
Problems clickedProblem = (Problems)listofitems[selectedId];
var navCont = new CodeEditorContext(clickedProblem, "Problems");
Frame.Navigate(typeof(CodeEditor), navCont);
}
示例9: gvMain_SelectionChanged
private async void gvMain_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e != null && e.AddedItems != null && e.AddedItems.Count > 0)
{
var item = (Photo)e.AddedItems[0];
//DOWNLOAD ACTUAL IMAGE INTO PICTURES LIBRARY
await DownloadService.Current.Downloader("1", item.MediumUrl, string.Empty, item.PhotoId + "_" + item.Secret, 2, storageFolder: "ModernCSApp");
//UPDATE D2D BACKGROUND WITH DOWNLOADED IMAGE
var br = RenderingService.BackgroundRenderer;
string[] partsUrl = item.MediumUrl.Split(".".ToCharArray());
br.ChangeBackground("ModernCSApp\\" + item.PhotoId + "_" + item.Secret + "." + partsUrl[partsUrl.Length - 1], "PicturesLibrary");
////REQUEST TO MINIMIZE THIS LIST IN ITS PARENT
//if (ChangeViewState != null)
//{
// this._currentViewState = "Minimized";
// grdTitle.Opacity = 0.5;
// ChangeViewState("Minimized", EventArgs.Empty);
//}
//TELL PARENT PICTURE HAS CHANGED
if (PictureChanged != null)
{
PictureChanged(Serialize(item), EventArgs.Empty);
}
////DISABLE THE LIST TILL ITS NORMAL/MAXIMIZED
//gvMain.IsEnabled = false;
}
}
示例10: cboxDebug_SelectionChanged
void cboxDebug_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//graph.VertexList.Values.ForEach(a => a.VertexConnectionPointsList.ForEach(b => b.Hide()));
graph.ClearLayout();
graph.LogicCore.Graph.Clear();
graph.LogicCore.EnableParallelEdges = false;
graph.LogicCore.ParallelEdgeDistance = 25;
graph.LogicCore.EdgeCurvingEnabled = false;
graph.SetVerticesDrag(true, true);
graph.SetVerticesMathShape(VertexShape.Circle);
graph.ShowAllVerticesLabels(false);
graph.ShowAllEdgesLabels(false);
graph.AlignAllEdgesLabels(false);
switch ((DebugItems)cboxDebug.SelectedItem)
{
case DebugItems.General:
DebugGeneral();
break;
case DebugItems.EdgeLabels:
DebugEdgeLabels();
break;
case DebugItems.VCP:
DebugVCP();
break;
}
}
示例11: ListMenuItems_SelectionChanged
private void ListMenuItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ListView a = sender as ListView;
string b = a.SelectedItem as string;
if (b[0] == 'C')
{
Frame.Navigate(typeof(Compare));
}
if (b[0] == 'L')
{
Frame.Navigate(typeof(ResultPage));
}
if (b[0] == 'e')
{
Frame.Navigate(typeof(ex_Result));
}
if (b[0] == 'M')
{
Frame.Navigate(typeof(Aukat));
}
if (b[0] == 'A')
{
Frame.Navigate(typeof(About));
}
if (b[0] == 'F')
{
Frame.Navigate(typeof(Feedback));
}
}
示例12: IntervalBox_SelectionChanged
private void IntervalBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var selectedItem = (ComboBoxItem)e.AddedItems.First();
uint timeInterval = 0;
switch (selectedItem.Name)
{
case "IntervalNever":
timeInterval = 0;
break;
case "Interval30":
timeInterval = 30;
break;
case "Interval60":
timeInterval = 60;
break;
case "Interval90":
timeInterval = 90;
break;
case "Interval2h":
timeInterval = 120;
break;
case "Interval6h":
timeInterval = 360;
break;
case "IntervalOnce":
timeInterval = 720;
break;
}
BackgroundHelper.RegisterBackgroundTask(timeInterval);
ApplicationData.Current.LocalSettings.Values["currentInterval"] = timeInterval;
}
示例13: Selector_OnSelectionChanged
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 1)
{
HomeViewModel.SwitchRoomCommand.Execute(e.AddedItems[0]);
}
}
示例14: flipView_SelectionChanged
private void flipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
int prevMinIndex = minIndex;
int prevMaxIndex = maxIndex;
minIndex = Math.Max(0, flipView.SelectedIndex - 30);
maxIndex = Math.Min(flipView.Items.Count - 1, flipView.SelectedIndex + 30);
if (maxIndex > prevMaxIndex)
{
AddImageToMemory(maxIndex);
}
else if (maxIndex < prevMinIndex)
{
RemoveImageFromMemory(maxIndex);
}
if (minIndex < prevMinIndex)
{
AddImageToMemory(minIndex);
}
else if (minIndex > prevMinIndex)
{
RemoveImageFromMemory(minIndex);
}
dateText.Text = ((Photo)(flipView.SelectedItem)).Date.ToString();
}
示例15: ComboSize_SelectionChanged
private void ComboSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch (ComboSize.SelectedIndex)
{
case 0:
settings.m_uXnum = 10;
settings.m_uYnum = 10;
settings.m_uMineNum = 8;
break;
case 1:
settings.m_uXnum = 16;
settings.m_uYnum = 16;
settings.m_uMineNum = 40;
break;
case 2:
settings.m_uXnum = 20;
settings.m_uYnum = 20;
settings.m_uMineNum = 80;
break;
case 3:
settings.m_uXnum = 0;
settings.m_uYnum = 0;
settings.m_uMineNum = 0;
break;
}
}