当前位置: 首页>>代码示例>>C#>>正文


C# Controls.SelectionChangedEventArgs类代码示例

本文整理汇总了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;
         }
     }
 }
开发者ID:XPOWERLM,项目名称:More-Personal-Computing,代码行数:33,代码来源:Setting.xaml.cs

示例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
            {

            }
        }
开发者ID:rohit101293,项目名称:RoadPlex,代码行数:32,代码来源:Faq.xaml.cs

示例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);
        }
开发者ID:soreygarcia,项目名称:Sugges.me,代码行数:33,代码来源:SearchResultsPage.xaml.cs

示例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);
        }
开发者ID:reyx,项目名称:Reyx.Win8.PeriodicTable,代码行数:34,代码来源:SearchResultsPage.xaml.cs

示例5: itemListView_SelectionChanged

 void itemListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.UsingLogicalPageNavigation())
     {
         this.navigationHelper.GoBackCommand.RaiseCanExecuteChanged();
     }
 }
开发者ID:xxy1991,项目名称:cozy,代码行数:7,代码来源:SplitPage1.xaml.cs

示例6: menuItems_SelectionChanged

 private void menuItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if(Home.IsSelected)
             Frame.Navigate(typeof(MainPage));
      else
         Frame.Navigate(typeof(MainPage));
 }
开发者ID:nhansky,项目名称:TripPlanner,代码行数:7,代码来源:MainPage.xaml.cs

示例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);
 }
开发者ID:hyprsoftcorp,项目名称:WindowsIoTCoreDashboard,代码行数:7,代码来源:MainPage.xaml.cs

示例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);
 }
开发者ID:sakshamsharma,项目名称:CodeInn,代码行数:7,代码来源:ProblemViewer.xaml.cs

示例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;

            }
        }
开发者ID:rolandsmeenk,项目名称:ModernApps,代码行数:35,代码来源:PictureViews.xaml.cs

示例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;
            }

        }
开发者ID:aliaspilote,项目名称:TX52,代码行数:29,代码来源:MainPageDebug.xaml.cs

示例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));
     }
 }  
开发者ID:AkshayGupta94,项目名称:ProjectAukatFinal,代码行数:29,代码来源:About.xaml.cs

示例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;
        }
开发者ID:n01d,项目名称:StackOverflowNotifier,代码行数:33,代码来源:SettingsPage.xaml.cs

示例13: Selector_OnSelectionChanged

 private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count == 1)
     {
         HomeViewModel.SwitchRoomCommand.Execute(e.AddedItems[0]);
     }
 }
开发者ID:Redth,项目名称:JabbRIsMobile,代码行数:7,代码来源:HomeView.xaml.cs

示例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();
        }
开发者ID:jonfortescue,项目名称:PhotoOrganizer,代码行数:26,代码来源:CollectionViewer.xaml.cs

示例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;
     }
 }
开发者ID:lantian2012,项目名称:MineSweeper,代码行数:26,代码来源:SimpleSettingsNarrow.xaml.cs


注:本文中的Windows.UI.Xaml.Controls.SelectionChangedEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。