TreeViewColumn CreateTreeViewColumn ()
		{
			var column = new TreeViewColumn ();
			column.Spacing = 0;

			var dummyRenderer = new CellRendererImage ();
			dummyRenderer.Width = 1;
			dummyRenderer.Xpad = 0;
			column.PackStart (dummyRenderer, false);

			var checkBoxRenderer = new CellRendererToggle ();
			checkBoxRenderer.Toggled += PackageSourceCheckBoxToggled;
			checkBoxRenderer.Xpad = 7;
			checkBoxRenderer.Ypad = 12;
			checkBoxRenderer.Xalign = 0;
			checkBoxRenderer.Yalign = 0;
			column.PackStart (checkBoxRenderer, false);
			column.AddAttribute (checkBoxRenderer, "active", IsEnabledCheckBoxColumn);

			var iconRenderer = new CellRendererImage ();
			iconRenderer.StockSize = IconSize.Dnd;
			iconRenderer.Xalign = 0;
			iconRenderer.Xpad = 0;
			column.PackStart (iconRenderer, false);
			column.AddAttribute (iconRenderer, "icon-id", PackageSourceIconColumn);

			var packageSourceRenderer = new PackageSourceCellRenderer ();
			packageSourceRenderer.Mode = CellRendererMode.Activatable;
			column.PackStart (packageSourceRenderer, true);
			column.AddAttribute (packageSourceRenderer, "package-source", PackageSourceViewModelColumn);

			return column;
		}
Ejemplo n.º 2
0
        TreeViewColumn CreateTreeViewColumn()
        {
            var column = new TreeViewColumn();

            column.Spacing = 0;

            var dummyRenderer = new CellRendererImage();

            dummyRenderer.Width = 1;
            dummyRenderer.Xpad  = 0;
            column.PackStart(dummyRenderer, false);

            var checkBoxRenderer = new CellRendererToggle();

            checkBoxRenderer.Toggled += PackageSourceCheckBoxToggled;
            checkBoxRenderer.Xpad     = 7;
            checkBoxRenderer.Ypad     = 12;
            checkBoxRenderer.Xalign   = 0;
            checkBoxRenderer.Yalign   = 0;
            column.PackStart(checkBoxRenderer, false);
            column.AddAttribute(checkBoxRenderer, "active", IsEnabledCheckBoxColumn);

            var iconRenderer = new CellRendererImage();

            iconRenderer.StockSize = IconSize.Dnd;
            iconRenderer.Xalign    = 0;
            iconRenderer.Xpad      = 0;
            column.PackStart(iconRenderer, false);
            column.AddAttribute(iconRenderer, "icon-id", PackageSourceIconColumn);

            var packageSourceRenderer = new PackageSourceCellRenderer();

            packageSourceRenderer.Mode = CellRendererMode.Activatable;
            column.PackStart(packageSourceRenderer, true);
            column.AddAttribute(packageSourceRenderer, "package-source", PackageSourceViewModelColumn);

            return(column);
        }