• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# RoutedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中RoutedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RoutedEventArgs类的具体用法?C# RoutedEventArgs怎么用?C# RoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RoutedEventArgs类属于命名空间,在下文中一共展示了RoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnGotFocus

		protected override void OnGotFocus(RoutedEventArgs e)
		{
			_hasFocus = true;
			SetHintVisibility(Visibility.Collapsed);
			
			base.OnGotFocus(e);
		}
开发者ID:selaromdotnet,项目名称:Coding4FunToolkit,代码行数:7,代码来源:ChatBubbleTextBox.cs


示例2: PasswordChanged

 private static void PasswordChanged(object sender, RoutedEventArgs e)
 {
     PasswordBox password = sender as PasswordBox;
     _updating = true;
     SetBoundPassword(password, password.Password);
     _updating = false;
 }
开发者ID:karczewskip,项目名称:Waiter-Management-2,代码行数:7,代码来源:PasswordBoxHelper.cs


示例3: WindowLoaded

    private void WindowLoaded(object sender, RoutedEventArgs e){
        // ...

        /* 
         * ------------------ Command Binding ----------------------------
         */
        this.CommandBindings.Add(
            /* 
             * CommandBinding Constructor (ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler) 
             */
            new CommandBinding(
                CommandBank.CloseWindowCommand,               // System.Windows.Input.ICommand. The command to base the new RoutedCommand on.
                CommandBank.CloseWindowCommandExecute,        // Input.ExecutedRoutedEventHandler. Handler for Executed event on new RoutedCommand.
                CommandBank.CanExecuteIfParameterIsNotNull)); // Input.CanExecuteRoutedEventHandler. The handler for CanExecute event on new RoutedCommand.

        /* 
         * ------------------ Input Binding ------------------------------
         */
        foreach (CommandBinding binding in this.CommandBindings){
            RoutedCommand command = (RoutedCommand)binding.Command;
            if (command.InputGestures.Count > 0){
                foreach (InputGesture gesture in command.InputGestures){
                    var iBind = new InputBinding(command, gesture);
                    iBind.CommandParameter = this;
                    this.InputBindings.Add(iBind);
                }
            }
        }

        // menuItemExit is defined in XAML
        menuItemExit.Command = CommandBank.CloseWindow;
        menuItemExit.CommandParameter = this;
        // ...
    }
开发者ID:ppatoria,项目名称:SoftwareDevelopment,代码行数:34,代码来源:command-wpf.cs


示例4: OnSubmenuOpened

 private static void OnSubmenuOpened(object sender, RoutedEventArgs e)
 {
     var commandRouter = IoC.Get<ICommandRouter>();
     var menuItem = (MenuItem) sender;
     foreach (var item in menuItem.Items.OfType<ICommandUiItem>().ToList())
         item.Update(commandRouter.GetCommandHandler(item.CommandDefinition));
 }
开发者ID:DraTeots,项目名称:gemini,代码行数:7,代码来源:MenuBehavior.cs


示例5: BackButton_Click

 private void BackButton_Click(object sender, RoutedEventArgs e)
 {
     if (ContentFrame != null && ContentFrame.CanGoBack)
     {
         ContentFrame.GoBack();
     }
 }
开发者ID:bendewey,项目名称:IntroToWinRT,代码行数:7,代码来源:MainPage.xaml.cs


示例6: DataBinding_Unloaded

 void DataBinding_Unloaded(object sender, RoutedEventArgs e)
 {
     this.Unloaded -= DataBinding_Unloaded;
     this.LayoutRoot.Loaded -= new RoutedEventHandler(LayoutRoot_Loaded);
     MyMap.Layers["tiledLayer"].Failed -= DataBinding_Failed;
     MyMap.Dispose();
 }
开发者ID:SuperMap,项目名称:iClient-WP8-Example,代码行数:7,代码来源:DataBinding.xaml.cs


示例7: TimePickerStudio_Loaded

        /// <summary>
        /// Handles the Loaded event of the TimePickerStudio control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void TimePickerStudio_Loaded(object sender, RoutedEventArgs e)
        {
            // init
            cmbPopupSelectionMode.ItemsSource = typeof(PopupTimeSelectionMode)
                .GetMembers()
                .ToList()
                .Where(m =>
                    m.DeclaringType.Equals(typeof(PopupTimeSelectionMode)) &&
                    !m.Name.StartsWith("_", StringComparison.Ordinal) &&
                    !m.Name.EndsWith("_", StringComparison.Ordinal))
                .Select(m => m.Name)
                .ToList();

            cmbPopup.ItemsSource = new Dictionary<string, Type>()
                                       {
                                           { "ListTimePicker", typeof(ListTimePickerPopup) },
                                           { "RangeTimePicker", typeof(RangeTimePickerPopup) },
                                       };

            cmbFormat.ItemsSource = new Dictionary<string, ITimeFormat>()
                                        {
                                            { "ShortTimeFormat", new ShortTimeFormat() },
                                            { "LongTimeFormat", new LongTimeFormat() },
                                            { "Custom: hh:mm:ss", new CustomTimeFormat("hh:mm:ss") },
                                            { "Custom: hh.mm", new CustomTimeFormat("hh.mm") },
                                        };

            cmbTimeParser.ItemsSource = new Dictionary<string, TimeParser>()
                                            {
                                                { "+/- hours, try +3h", new PlusMinusHourTimeParser() },
                                                { "+/- minutes, try +3m", new PlusMinusMinuteTimeInputParser() },
                                            };

            // defaults
            cmbFormat.SelectedIndex = 0;
            cmbPopupSecondsInterval.SelectedIndex = 1;
            cmbPopupMinutesInterval.SelectedIndex = 3;
            cmbPopupSelectionMode.SelectedIndex = cmbPopupSelectionMode.Items.ToList().IndexOf(tp.PopupTimeSelectionMode.ToString());
            cmbPopup.SelectedIndex = 0;

            List<CultureInfo> cultures = new List<CultureInfo>();

            // work through long list of cultures and check if it is actually 
            // allowed in this configuration.
            foreach (string cultureName in _cultureNames)
            {
                try
                {
                    CultureInfo c = new CultureInfo(cultureName);
                    cultures.Add(c);
                }
                catch (ArgumentException)
                {
                }
            }

            cmbCultures.ItemsSource = cultures;
            // preselect current culture.
            cmbCultures.SelectedItem = cultures.FirstOrDefault(info => info.Name == tp.ActualCulture.Name);
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:65,代码来源:TimePickerStudio.xaml.cs


示例8: FundingSummary_Loaded

 private async void FundingSummary_Loaded(object sender, RoutedEventArgs e)
 {
     if (null == ViewModel) return;
     ViewModel.StepChanged += this.FundingSummary_StepChanged;
     ViewModel.ReSizeGrid += FundingSummary_ResizeGrid;
     await ViewModel.OnStepAsync(FundingSummaryViewModel.EnumStep.Start);
 }
开发者ID:tuanva90,项目名称:mvccodefirst,代码行数:7,代码来源:FundingSummaryView.xaml.cs


示例9: button_Click

 private void button_Click(object sender, RoutedEventArgs e)
 {
     
     //((App)Application.Current).runMe()
     sendData();
     receiveData();
 }
开发者ID:davin12x,项目名称:TalkApp,代码行数:7,代码来源:MainPage.xaml.cs


示例10: MainPage_Loaded

 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(2) };
     _timer.Tick += _timer_Tick;
     _timer.Start();
     ButtonLoad.Visibility = Visibility.Collapsed;
 }
开发者ID:modulexcite,项目名称:events,代码行数:7,代码来源:MainPage.xaml.cs


示例11: OnLostFocus

		protected override void OnLostFocus(RoutedEventArgs e)
		{
			_hasFocus = false;
			UpdateHintVisibility();
			
			base.OnLostFocus(e);
		}
开发者ID:selaromdotnet,项目名称:Coding4FunToolkit,代码行数:7,代码来源:ChatBubbleTextBox.cs


示例12: ButtonSendLoadCharsClick

 private void ButtonSendLoadCharsClick(object sender, RoutedEventArgs e)
 {
     StatusInformation = "Start load drones characteristics";
     _parrotCharacteristics.LoadDevicesCharacteristics(_parrotDrones);
     MergeLogActions(_parrotCharacteristics.LogActions);
     StatusInformation = "End load drones characteristics";
 }
开发者ID:modulexcite,项目名称:events,代码行数:7,代码来源:MainPage.xaml.cs


示例13: isVisible_Click

        private async void isVisible_Click(object sender, RoutedEventArgs e)
        {
            SetLayerStatusParameters parameters = new SetLayerStatusParameters
            {
                HoldTime = 30,
                LayerStatusList = layersStatus,
                ResourceID = tempLayerID
            };
            //与服务端交互
            try
            {
                SetLayerStatusService setLayersStatus = new SetLayerStatusService(url);
                var result = await setLayersStatus.ProcessAsync(parameters);
                if (result.IsSucceed)
                {
                    tempLayerID = result.NewResourceID;
                    layer.LayersID = result.NewResourceID;
                    layer.Refresh();

                }
            }
            //交互失败
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:SuperMap,项目名称:iClient-WP8-Example,代码行数:27,代码来源:SetLayerStatusTest.xaml.cs


示例14: FlexibleTemplateSample_Loaded

        /// <summary>
        /// Loads the XML sample data and populates the TreeMap.
        /// </summary>
        /// <param name="sender">The object where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private void FlexibleTemplateSample_Loaded(object sender, RoutedEventArgs e)
        {
            // Sample browser-specific layout change
            SampleHelpers.ChangeSampleAlignmentToStretch(this);

            treeMapControl.ItemsSource = NhlDataHelper.LoadDefaultFile();
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:12,代码来源:FlexibleTemplateSample.xaml.cs


示例15: OnIsCheckedPropertyChanged

        /// <summary>
        /// IsCheckedProperty property changed handler.
        /// </summary> 
        /// <param name="d">ToggleButton that changed its IsChecked.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs.</param>
        private static void OnIsCheckedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 
        { 
            ToggleButton source = d as ToggleButton;
            System.Diagnostics.Debug.Assert(source != null, 
                "The source is not an instance of ToggleButton!");

            System.Diagnostics.Debug.Assert(typeof(bool?).IsInstanceOfType(e.NewValue) || (e.NewValue == null), 
                "The value is not an instance of bool?!");
            bool? value = (bool?) e.NewValue;
 
            // Raise the appropriate changed event 
            RoutedEventArgs args = new RoutedEventArgs () { OriginalSource = source};
            if (value == true)
            {
                source.OnChecked(args); 
            }
            else if (value == false)
            { 
                source.OnUnchecked(args); 
            }
            else 
            {
                source.OnIndeterminate(args);
            } 
        }
开发者ID:dfr0,项目名称:moon,代码行数:30,代码来源:ToggleButton.cs


示例16: OnEventToast

 private void OnEventToast(object sender, RoutedEventArgs e)
 {
     ToastEventBtn.Content = "== toast animating ==";
     ToastEventBtn.IsEnabled = false;
     Toast2.Message = "This toast is listening for closed event";
     Toast2.Closed += ToastOnClosed;
 }
开发者ID:CarteKiwi,项目名称:Toastinet,代码行数:7,代码来源:ToastinetPortableContent.xaml.cs


示例17: OnLoaded

        /// <summary>
        /// Handle the Loaded event of the page.
        /// </summary>
        /// <param name="sender">The source object.</param>
        /// <param name="rea">The event arguments.</param>
        private void OnLoaded(object sender, RoutedEventArgs rea)
        {
            ControlApi.ItemFilter = (prefix, item) =>
            {
                if (string.IsNullOrEmpty(prefix))
                { 
                    return true; 
                }
                MemberInfoData pme = item as MemberInfoData;
                if (pme == null)
                {
                    return false; 
                }
                return (pme.Name.ToUpper(CultureInfo.InvariantCulture).Contains(prefix.ToUpper(CultureInfo.InvariantCulture)));
            };

            // Reflect and load data
            ControlApi.ItemsSource = MemberInfoData.GetSetForType(typeof(AutoCompleteBox));
            ControlPicker.ItemsSource = InitializeTypeList();

            // Set the changed handlers
            ControlApi.SelectionChanged += OnApiChanged;
            ControlPicker.SelectionChanged += OnPickerChanged;
            
            // Setup the dictionary converter
            ControlPicker.ValueMemberBinding = new Binding
            {
                Converter = new DictionaryKeyValueConverter<string, Type>()
            };
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:35,代码来源:AutoCompleteComboBox.xaml.cs


示例18: DomainUpDownSample_Loaded

        /// <summary>
        /// Handles the Loaded event of the DomainUpDownSample control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void DomainUpDownSample_Loaded(object sender, RoutedEventArgs e)
        {
            IEnumerable airports = Airport.SampleAirports;
            DataContext = airports;

            List<CultureInfo> cultures = new List<CultureInfo>();

            // work through long list of cultures and check if it is actually 
            // allowed in this configuration.
            foreach (string cultureName in _cultureNames)
            {
                try
                {
                    CultureInfo c = new CultureInfo(cultureName);
                    cultures.Add(c);
                }
                catch (ArgumentException)
                {
                }
            }

            cultureList.ItemsSource = cultures;
            // preselect dutch, if allowed.
            cultureList.SelectedItem = cultures.FirstOrDefault(info => info.Name == "nl-NL");
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:30,代码来源:DomainUpDownSample.xaml.cs


示例19: ButtonLoadData_Click

 private async void ButtonLoadData_Click(object sender, RoutedEventArgs e)
 {
     StatusInformation = "Start load drones";
     _parrotDrones = await _parrotLoadDevices.LoadParrotDevices();
     MergeLogActions(_parrotLoadDevices.LogActions);
     StatusInformation = "End load drones";
 }
开发者ID:modulexcite,项目名称:events,代码行数:7,代码来源:MainPage.xaml.cs


示例20: OnClick

 protected override void OnClick(RoutedEventArgs e)
 {
     if (CheckOnClick)
     {
         ToggleState();
     }
 }
开发者ID:diab0l,项目名称:Granular,代码行数:7,代码来源:ToggleButton.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RoutedEventData类代码示例发布时间:2022-05-24
下一篇:
C# RoutedEvent类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap