本文整理汇总了C#中Gtk.TreeView.ModifyBase方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.ModifyBase方法的具体用法?C# TreeView.ModifyBase怎么用?C# TreeView.ModifyBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.TreeView
的用法示例。
在下文中一共展示了TreeView.ModifyBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
void Build ()
{
BorderWidth = 0;
WidthRequest = 901;
HeightRequest = 632;
Name = "wizard_dialog";
Title = GettextCatalog.GetString ("New Project");
WindowPosition = WindowPosition.CenterOnParent;
TransientFor = IdeApp.Workbench.RootWindow;
projectConfigurationWidget = new GtkProjectConfigurationWidget ();
projectConfigurationWidget.Name = "projectConfigurationWidget";
// Top banner of dialog.
var topLabelEventBox = new EventBox ();
topLabelEventBox.Name = "topLabelEventBox";
topLabelEventBox.HeightRequest = 52;
topLabelEventBox.ModifyBg (StateType.Normal, bannerBackgroundColor);
topLabelEventBox.ModifyFg (StateType.Normal, whiteColor);
topLabelEventBox.BorderWidth = 0;
var topBannerTopEdgeLineEventBox = new EventBox ();
topBannerTopEdgeLineEventBox.Name = "topBannerTopEdgeLineEventBox";
topBannerTopEdgeLineEventBox.HeightRequest = 1;
topBannerTopEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
topBannerTopEdgeLineEventBox.BorderWidth = 0;
var topBannerBottomEdgeLineEventBox = new EventBox ();
topBannerBottomEdgeLineEventBox.Name = "topBannerBottomEdgeLineEventBox";
topBannerBottomEdgeLineEventBox.HeightRequest = 1;
topBannerBottomEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
topBannerBottomEdgeLineEventBox.BorderWidth = 0;
topBannerLabel = new Label ();
topBannerLabel.Name = "topBannerLabel";
Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy ();
font.Size = (int)(font.Size * 1.8);
topBannerLabel.ModifyFont (font);
topBannerLabel.ModifyFg (StateType.Normal, whiteColor);
var topLabelHBox = new HBox ();
topLabelHBox.Name = "topLabelHBox";
topLabelHBox.PackStart (topBannerLabel, false, false, 20);
topLabelEventBox.Add (topLabelHBox);
VBox.PackStart (topBannerTopEdgeLineEventBox, false, false, 0);
VBox.PackStart (topLabelEventBox, false, false, 0);
VBox.PackStart (topBannerBottomEdgeLineEventBox, false, false, 0);
// Main templates section.
centreVBox = new VBox ();
centreVBox.Name = "centreVBox";
VBox.PackStart (centreVBox, true, true, 0);
templatesHBox = new HBox ();
templatesHBox.Name = "templatesHBox";
centreVBox.PackEnd (templatesHBox, true, true, 0);
// Template categories.
var templateCategoriesVBox = new VBox ();
templateCategoriesVBox.Name = "templateCategoriesVBox";
templateCategoriesVBox.BorderWidth = 0;
templateCategoriesVBox.WidthRequest = 220;
var templateCategoriesScrolledWindow = new ScrolledWindow ();
templateCategoriesScrolledWindow.Name = "templateCategoriesScrolledWindow";
templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;
// Template categories tree view.
templateCategoriesTreeView = new TreeView ();
templateCategoriesTreeView.Name = "templateCategoriesTreeView";
templateCategoriesTreeView.BorderWidth = 0;
templateCategoriesTreeView.HeadersVisible = false;
templateCategoriesTreeView.Model = templateCategoriesListStore;
templateCategoriesTreeView.ModifyBase (StateType.Normal, categoriesBackgroundColor);
templateCategoriesTreeView.AppendColumn (CreateTemplateCategoriesTreeViewColumn ());
templateCategoriesScrolledWindow.Add (templateCategoriesTreeView);
templateCategoriesVBox.PackStart (templateCategoriesScrolledWindow, true, true, 0);
templatesHBox.PackStart (templateCategoriesVBox, false, false, 0);
// Templates.
var templatesVBox = new VBox ();
templatesVBox.Name = "templatesVBox";
templatesVBox.WidthRequest = 400;
templatesHBox.PackStart (templatesVBox, false, false, 0);
var templatesScrolledWindow = new ScrolledWindow ();
templatesScrolledWindow.Name = "templatesScrolledWindow";
templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;
// Templates tree view.
templatesTreeView = new TreeView ();
templatesTreeView.Name = "templatesTreeView";
templatesTreeView.HeadersVisible = false;
templatesTreeView.Model = templatesListStore;
templatesTreeView.ModifyBase (StateType.Normal, templateListBackgroundColor);
templatesTreeView.AppendColumn (CreateTemplateListTreeViewColumn ());
templatesScrolledWindow.Add (templatesTreeView);
templatesVBox.PackStart (templatesScrolledWindow, true, true, 0);
// Template
var templateEventBox = new EventBox ();
templateEventBox.Name = "templateEventBox";
//.........这里部分代码省略.........