本文整理汇总了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));
}
示例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));
}
示例3: SetIsEnabled
public static void SetIsEnabled(ToolBar popup, bool value) {
popup.SetValue(IsEnabledProperty, value);
}
示例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();
}
示例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);
}