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


C# ToolBar.SetValue方法代码示例

本文整理汇总了C#中System.Windows.Controls.ToolBar.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# ToolBar.SetValue方法的具体用法?C# ToolBar.SetValue怎么用?C# ToolBar.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.ToolBar的用法示例。


在下文中一共展示了ToolBar.SetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CompilerMessageView

		public CompilerMessageView()
		{
			instance = this;
			
			AddCategory(TaskService.BuildMessageViewCategory);
			
			textEditor.IsReadOnly = true;
			
			textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");
			
			properties = (Properties)PropertyService.Get(OutputWindowOptionsPanel.OutputWindowsProperty, new Properties());
			
			var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", Core.WinForms.WinFormsResourceService.DefaultMonospacedFont.ToString()).ToString());
			
			textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
			textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
			properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
			
			MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
			textEditor.TextArea.TextView.ElementGenerators.OfType<LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);
			
			toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
			toolStrip.SetValue(DockPanel.DockProperty, Dock.Top);
			
			panel.Children.Add(toolStrip);
			panel.Children.Add(textEditor);
			
			SetWordWrap();
			DisplayActiveCategory();
			ProjectService.SolutionLoaded += SolutionLoaded;
			
			textEditor.TextArea.DefaultInputHandler.NestedInputHandlers.Add(new SearchInputHandler(textEditor.TextArea));
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:33,代码来源:CompilerMessageView.cs

示例2: InitializePadContent

		void InitializePadContent()
		{
			IReadOnlyList<string> tokens = SD.ParserService.TaskListTokens;
			
			foreach (string token in tokens) {
				if (!this.displayedTokens.ContainsKey(token)) {
					this.displayedTokens.Add(token, true);
				}
			}
			
			toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/TaskList/Toolbar");
			var items = (IList)toolBar.ItemsSource;
			
			foreach (string token in tokens) {
				items.Add(new Separator());
				items.Add(new TaskListTokensToolbarCheckBox(token));
			}
			
			contentPanel.Children.Add(toolBar);
			toolBar.SetValue(DockPanel.DockProperty, Dock.Top);
			contentPanel.Children.Add(taskView);
			taskView.ItemsSource = tasks;
			taskView.MouseDoubleClick += TaskViewMouseDoubleClick;
			taskView.Style = (Style)new TaskViewResources()["TaskListView"];
			taskView.ContextMenu = MenuService.CreateContextMenu(taskView, DefaultContextMenuAddInTreeEntry);
			
			taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
			taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:29,代码来源:TaskListPad.cs

示例3: SetIsEnabled

 public static void SetIsEnabled(ToolBar popup, bool value) {
     popup.SetValue(IsEnabledProperty, value);
 }
开发者ID:MaHuJa,项目名称:withSIX.Desktop,代码行数:3,代码来源:ToolBarCloseBehavior.cs

示例4: ErrorListPad

		public ErrorListPad()
		{
			instance = this;
			properties = PropertyService.NestedProperties("ErrorListPad");
			
			TaskService.Cleared += TaskServiceCleared;
			TaskService.Added   += TaskServiceAdded;
			TaskService.Removed += TaskServiceRemoved;
			TaskService.InUpdateChanged += delegate {
				if (!TaskService.InUpdate)
					InternalShowResults();
			};
			
			SD.BuildService.BuildFinished += ProjectServiceEndBuild;
			SD.ProjectService.SolutionOpened += OnSolutionOpen;
			SD.ProjectService.SolutionClosed += OnSolutionClosed;
			errors = new ObservableCollection<SDTask>(TaskService.Tasks.Where(t => t.TaskType != TaskType.Comment));
			
			toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/ErrorList/Toolbar");
			
			contentPanel.Children.Add(toolBar);
			toolBar.SetValue(DockPanel.DockProperty, Dock.Top);
			contentPanel.Children.Add(errorView);
			errorView.ItemsSource = errors;
			errorView.MouseDoubleClick += ErrorViewMouseDoubleClick;
			errorView.Style = (Style)new TaskViewResources()["TaskListView"];
			errorView.ContextMenu = MenuService.CreateContextMenu(this, DefaultContextMenuAddInTreeEntry);
			
			errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
			errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));
			
			InternalShowResults();
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:33,代码来源:ErrorListPad.cs

示例5: CompilerMessageView

		public CompilerMessageView()
		{
			instance = this;
			
			AddCategory(TaskService.BuildMessageViewCategory);
			
			textEditor.IsReadOnly = true;
			
			textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");
			
			properties = PropertyService.NestedProperties(OutputWindowOptionsPanel.OutputWindowsProperty);
			
			SetTextEditorFont();
			
			properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
			
			MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
			textEditor.TextArea.TextView.ElementGenerators.OfType<LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);
			
			toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
			toolStrip.SetValue(DockPanel.DockProperty, Dock.Top);
			
			panel.Children.Add(toolStrip);
			panel.Children.Add(textEditor);
			
			SetWordWrap();
			DisplayActiveCategory();
			SD.ProjectService.CurrentSolutionChanged += OnSolutionLoaded;
			
			SearchPanel.Install(textEditor);
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:31,代码来源:CompilerMessageView.cs


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