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


C# RoutedEventArgs类代码示例

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


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


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