/// <summary> /// Called on rich text ribbon loaded. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An <see cref="T:System.Windows.RoutedEventArgs">RoutedEventArgs</see> that contains the event data.</param> /// <remarks></remarks> private void RichTextRibbon_Loaded(object sender, RoutedEventArgs e) { // Hooks the event handler for RibbonWindow title bar help button. Syncfusion.Windows.Tools.Controls.TitleBar titleBar = VisualUtils.FindDescendant(this, typeof(Syncfusion.Windows.Tools.Controls.TitleBar)) as Syncfusion.Windows.Tools.Controls.TitleBar; WindowTitleBarButton HelpButton = null; if (titleBar != null) { HelpButton = titleBar.Template.FindName("HelpButton", titleBar) as WindowTitleBarButton; } if (HelpButton != null) { HelpButton.Click += HelpButton_Click; HelpButton.ToolTip = "Help"; } // Initializes the skin tab. InitializeSkinTab(); }
/// <summary> /// Called when [loaded]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void OnLoaded(object sender, RoutedEventArgs e) { if (richTextBoxAdv != null) { richTextBoxAdv.Focus(); } WindowTitleBarButton HelpButton = null; Syncfusion.Windows.Tools.Controls.TitleBar titleBar = VisualUtils.FindDescendant(sender as RibbonWindow, typeof(Syncfusion.Windows.Tools.Controls.TitleBar)) as Syncfusion.Windows.Tools.Controls.TitleBar; if (titleBar != null) { HelpButton = titleBar.Template.FindName("HelpButton", titleBar) as WindowTitleBarButton; } if (HelpButton != null) { HelpButton.Click += HelpButton_Click; HelpButton.ToolTip = "Help"; } }
void DocumentContainer1_Loaded(object sender, RoutedEventArgs e) { TabPanelAdv tabpanel = VisualUtils.FindDescendant(sender as Visual, typeof(TabPanelAdv)) as TabPanelAdv; if (tabpanel != null) { Button prevbutton = tabpanel.Template.FindName("PART_PrevTab", tabpanel) as Button; Button nextbutton = tabpanel.Template.FindName("PART_NextTab", tabpanel) as Button; if (prevbutton != null) { ToolTipService.SetShowOnDisabled(prevbutton, true); prevbutton.ToolTip = "Previous"; } if (nextbutton != null) { ToolTipService.SetShowOnDisabled(nextbutton, true); nextbutton.ToolTip = "Next"; } } }
void DocumentContainer1_Loaded(object sender, RoutedEventArgs e) { TabPanelAdv tabpanel = VisualUtils.FindDescendant(sender as Visual, typeof(TabPanelAdv)) as TabPanelAdv; if (tabpanel != null) { ToggleButton menubutton = tabpanel.Template.FindName("PART_MenuButton", tabpanel) as ToggleButton; ToggleButton closebutton = tabpanel.Template.FindName("PART_CloseButton", tabpanel) as ToggleButton; if (menubutton != null) { ToolTipService.SetShowOnDisabled(menubutton, true); menubutton.ToolTip = "Context Menu"; } if (closebutton != null) { ToolTipService.SetShowOnDisabled(closebutton, true); closebutton.ToolTip = "Close"; } } }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { this.ReportDesignerControl.EnableMDIDesigner = false; string path = @"../../../ReportTemplate/Sales Dashboard.rdl"; this.ReportDesignerControl.OpenReport(path); WindowTitleBarButton HelpButton = null; Syncfusion.Windows.Tools.Controls.TitleBar _titlebar = VisualUtils.FindDescendant(this as RibbonWindow, typeof(Syncfusion.Windows.Tools.Controls.TitleBar)) as Syncfusion.Windows.Tools.Controls.TitleBar; if (_titlebar != null) { HelpButton = _titlebar.Template.FindName("HelpButton", _titlebar) as WindowTitleBarButton; } if (HelpButton != null) { HelpButton.Click += new RoutedEventHandler(HelpButton_Click); } }
/// <summary> /// Raises the Closing event. /// </summary> /// <param name="e">CancelEventArgs that contains the event dat</param> protected override void OnClosing(CancelEventArgs e) { this.Loaded -= OnLoaded; if (richTextRibbon != null) { richTextRibbon.Dispose(); richTextRibbon = null; } if (richTextBoxAdv != null) { richTextBoxAdv.SelectionChanged -= RichTextBoxAdv_SelectionChanged; richTextBoxAdv.RequestNavigate -= RichTextBoxAdv_RequestNavigate; richTextBoxAdv.Dispose(); richTextBoxAdv = null; } WindowTitleBarButton HelpButton = null; Syncfusion.Windows.Tools.Controls.TitleBar titleBar = VisualUtils.FindDescendant(this as RibbonWindow, typeof(Syncfusion.Windows.Tools.Controls.TitleBar)) as Syncfusion.Windows.Tools.Controls.TitleBar; if (titleBar != null) HelpButton = titleBar.Template.FindName("HelpButton", titleBar) as WindowTitleBarButton; if (HelpButton != null) HelpButton.Click -= HelpButton_Click; base.OnClosing(e); }
private void OnListViewItemGeneratorStatusChanged(object sender, EventArgs e) { foreach (var reminder in this.ReminderList.Items) { var listViewItem = this.ReminderList.ItemContainerGenerator.ContainerFromItem(reminder) as ListViewItem; if (listViewItem == null) { continue; } //// Sets the reminder interval types. var reminderTimeIntervalMenu = VisualUtils.FindDescendant(listViewItem, typeof(ComboBoxAdv)) as ComboBoxAdv; if (reminderTimeIntervalMenu != null) { reminderTimeIntervalMenu.ItemsSource = new List <string>() { SchedulerLocalizationResourceAccessor.Instance.GetString("MinutesIntervalTypeReminder", CultureInfo.CurrentUICulture), SchedulerLocalizationResourceAccessor.Instance.GetString("HoursIntervalTypeReminder", CultureInfo.CurrentUICulture), SchedulerLocalizationResourceAccessor.Instance.GetString("DaysIntervalTypeReminder", CultureInfo.CurrentUICulture), SchedulerLocalizationResourceAccessor.Instance.GetString("WeeksIntervalTypeReminder", CultureInfo.CurrentUICulture), }; } } }