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


C# Expander类代码示例

本文整理汇总了C#中Expander的典型用法代码示例。如果您正苦于以下问题:C# Expander类的具体用法?C# Expander怎么用?C# Expander使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: DialogError

		public DialogError(string message, Exception e, Window parent) : base("Error", parent, DialogFlags.Modal, Stock.Ok, ResponseType.Ok)
		{
			HBox hbox = new HBox();
			Image icon = new Image(Stock.DialogError,IconSize.Dialog);
			Label label = new Label(message);
			Expander exp = new Expander("Details");
			ScrolledWindow sw = new ScrolledWindow();
			TextView tview = new TextView();
			
			hbox.BorderWidth = 6;
			hbox.Spacing = 6;
			label.SetAlignment(0f, 0.5f);
			exp.BorderWidth = 6;
			tview.Buffer.Text = e.Message;
			tview.Buffer.Text += "\n";
			tview.Buffer.Text += e.StackTrace;
			
			sw.Add(tview);
			exp.Add(sw);
			hbox.PackStart(icon, false, false, 0);
			hbox.PackStart(label, true, true, 0);
			this.VBox.PackStart(hbox, false, false, 0);
			this.VBox.PackStart(exp, true, true, 0);
			this.ShowAll();
			
		}
开发者ID:hpbaotho,项目名称:supos,代码行数:26,代码来源:DialogError.cs

示例2: AppendGroup

 public void AppendGroup(string name, bool expanded)
 {
     Gtk.Expander exp = new Expander ("<b>" + name + "</b>");
     exp.UseMarkup = true;
     exp.Expanded = expanded;
     exp.AddNotification ("expanded", ExpansionChanged);
     Append (exp);
 }
开发者ID:mono,项目名称:stetic,代码行数:8,代码来源:Grid.cs

示例3: Action

		public Action (SecurityAction action)
		{
			this.action = action;
			this.TextView = new TextView ();
			this.TextView.Editable = false;
			this.Expander = new Expander (action.ToString ());
			this.Expander.Add (this.TextView);
		}
开发者ID:transformersprimeabcxyz,项目名称:cecil-old,代码行数:8,代码来源:DeclarativeSecurityVisualizer.cs

示例4: FaceSidebarWidget

        public FaceSidebarWidget()
        {
            instance = this;

            mainVBox = new VBox();
            //mainVBox.Spacing = 6;
            //faceVBox = new VBox();
            faceVPane = new VPaned();

            pleaseSelectPictureLabel = new Label ();
            pleaseSelectPictureLabel.Markup = SelectImageMarkup;
            //headerLabel =  new Label (Catalog.GetString ("Not Implemented Yet"));
            mainVBox.PackStart(pleaseSelectPictureLabel,false,false,0);

            knownFaceExpander = new Expander("In this photo:");

            //faceVBox.PackStart(knownFaceExpander,true,true,0);
            //faceVPane.Add(knownFaceExpander);
            knownFaceScrolledWindow = new ScrolledWindow();
            knownFaceExpander.Add(knownFaceScrolledWindow);
            faceVPane.Pack1(knownFaceExpander,true,true);
            //knownFaceExpander.HeightRequest = 30;
            //			faceHandleBox = new HandleBox();
            //			faceHandleBox.HandlePosition = PositionType.Top;
            //			faceVBox.PackStart(faceHandleBox,false,false,0);

            unknownFaceExpander = new Expander("Who's also in this photo");
            //faceVBox.PackStart(unknownFaceExpander,true,true,0);
            //faceVPane.Add(unknownFaceExpander);

            unknownFaceScrolledWindow = new ScrolledWindow();
            unknownFaceExpander.Add(unknownFaceScrolledWindow);
            faceVPane.Pack2(unknownFaceExpander,true,true);
            //unknownFaceExpander.HeightRequest = 30;
            mainVBox.PackStart(faceVPane,true,true,0);

            detectFaceButton = new Button(Catalog.GetString("Re-Detect Face From This Picture"));
            mainVBox.PackEnd(detectFaceButton,false,false,0);
            detectFaceButton.Clicked += DetectFaceButtonClicked;

            addFaceButton = new Button(manualAddFaceString);
            mainVBox.PackEnd(addFaceButton,false,false,0);
            addFaceButton.Clicked += AddFaceButtonClicked;

            knownFaceScrolledWindow.Visible = false;
            unknownFaceScrolledWindow.Visible = false;

            knownFaceExpander.ResizeMode = ResizeMode.Parent;
            unknownFaceExpander.ResizeMode = ResizeMode.Parent;
            Log.Debug("HeightR");

            ShadowType = ShadowType.None;
            BorderWidth = 0;
            //AddWithViewport(pleaseSelectPictureLabel);
            AddWithViewport (mainVBox);
            //mainVBox.Visible = false;
            ShowAll();
        }
开发者ID:kanitw,项目名称:facespot,代码行数:58,代码来源:FaceSidebarWidget.cs

示例5: ExpandAllIntoTaskItems1

        public void ExpandAllIntoTaskItems1()
        {
            PropertyDictionary<ProjectPropertyInstance> pg = new PropertyDictionary<ProjectPropertyInstance>();
            Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg);

            IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);

            ObjectModelHelpers.AssertItemsMatch(@"foo", GetTaskArrayFromItemList(itemsOut));
        }
开发者ID:akrisiun,项目名称:msbuild,代码行数:9,代码来源:Expander_Tests.cs

示例6: ExpanderCreatesAutomationPeer

 public virtual void ExpanderCreatesAutomationPeer()
 {
     Expander item = new Expander();
     ExpanderAutomationPeer peer = null;
     TestAsync(
         item,
         () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as ExpanderAutomationPeer,
         () => Assert.IsNotNull(peer, "Expander peer should not be null!"),
         () => Assert.AreEqual(item, peer.Owner, "Expander should be owner of the peer!"));
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:10,代码来源:ExpanderAutomationPeerTest.cs

示例7: ExpanderAutomationPeerTypeAndClass

 public virtual void ExpanderAutomationPeerTypeAndClass()
 {
     Expander item = new Expander();
     ExpanderAutomationPeer peer = null;
     TestAsync(
         item,
         () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as ExpanderAutomationPeer,
         () => Assert.AreEqual(AutomationControlType.Group, peer.GetAutomationControlType(), "Unexpected AutomationControlType!"),
         () => Assert.AreEqual("Expander", peer.GetClassName(), "Unexpected ClassType!"));
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:10,代码来源:ExpanderAutomationPeerTest.cs

示例8: Dialog

        public Dialog(VariableSet variables)
            : base(_("UpdateCheck"), variables)
        {
            var vbox = new VBox(false, 12) {BorderWidth = 12};
              VBox.PackStart(vbox, true, true, 0);

              var table = new GimpTable(4, 3)
            {ColumnSpacing = 6, RowSpacing = 6};
              vbox.PackStart(table, true, true, 0);

              table.Attach(new GimpCheckButton(_("Check _GIMP"),
                       GetVariable<bool>("check_gimp")),
               0, 1, 0, 1);

              table.Attach(new GimpCheckButton(_("Check G_IMP#"),
                       GetVariable<bool>("check_gimp_sharp")),
               0, 1, 1, 2);

              table.Attach(new GimpCheckButton(_("Check _Unstable Releases"),
                       GetVariable<bool>("check_unstable")),
               0, 1, 2, 3);

              var enableProxy = GetVariable<bool>("enable_proxy");
              var httpProxy = GetVariable<string>("http_proxy");
              var port = GetVariable<string>("port");

              string tmp = Gimp.RcQuery("update-enable-proxy");
              enableProxy.Value = (tmp != null || tmp == "true");
              httpProxy.Value =  Gimp.RcQuery("update-http-proxy") ?? "";
              port.Value = Gimp.RcQuery("update-port") ?? "";

              var expander = new Expander(_("Proxy settings"));
              var proxyBox = new VBox(false, 12);

              proxyBox.Add(new GimpCheckButton(_("Manual proxy configuration"),
                       enableProxy));

              var hbox = new HBox(false, 12) {Sensitive = enableProxy.Value};
              proxyBox.Add(hbox);

              hbox.Add(new Label(_("HTTP Proxy:")));
              hbox.Add(new GimpEntry(httpProxy));

              hbox.Add(new Label(_("Port:")));
              hbox.Add(new GimpEntry(port) {WidthChars = 4});

              enableProxy.ValueChanged += delegate
            {
              hbox.Sensitive = enableProxy.Value;
            };

              expander.Add(proxyBox);
              table.Attach(expander, 0, 1, 3, 4);
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:54,代码来源:Dialog.cs

示例9: DirPropertyWidget

        public DirPropertyWidget(FilePropertisData fpd)
        {
            project = fpd.Project;
            fiOld = project.FilesProperty.Find(x => x.SystemFilePath == fpd.Filename);
            if (fiOld == null){
                fiOld =new FileItem(fpd.Filename,false);
                fiOld.IsDirectory = true;
                project.FilesProperty.Add(fiOld);
            }
            if (fiOld.ConditionValues == null)
                fiOld.ConditionValues = new System.Collections.Generic.List<ConditionRule>();

            Table mainTable = new Table(2,1,false);
            Table propertyTable = new Table(5,2,false);

            Label lblFN =GetLabel(System.IO.Path.GetFileName(fiOld.SystemFilePath)); // new Label(System.IO.Path.GetFileName(fiOld.SystemFilePath));

            Entry entr = new Entry(fiOld.SystemFilePath);
            entr.IsEditable = false;

            Entry entrFullPath = new Entry(MainClass.Workspace.GetFullPath(fiOld.SystemFilePath));
            entrFullPath.IsEditable = false;

            Label lblPrj = GetLabel(project.ProjectName); //new Label(project.ProjectName);

            AddControl(ref propertyTable,0,lblFN,"Name ");
            AddControl(ref propertyTable,1,entr,"Relative Path ");
            AddControl(ref propertyTable,2,entrFullPath,"Full Path ");
            AddControl(ref propertyTable,3,lblPrj,"Project ");

            int rowCount = project.ConditoinsDefine.Count;
            Table conditionsTable = new Table((uint)(rowCount + 3),(uint)2,false);

            GenerateContent(ref conditionsTable, MainClass.Settings.Platform.Name, 1, MainClass.Settings.Platform,false);//tableSystem
            GenerateContent(ref conditionsTable, MainClass.Settings.Resolution.Name, 2,MainClass.Settings.Resolution,true); //project.Resolution);//tableSystem
            int i = 3;
            foreach (Condition cd in project.ConditoinsDefine) {
                GenerateContent(ref conditionsTable, cd.Name, i, cd,false);
                i++;
            }
            Expander exp1 = new Expander("General");
            exp1.Expanded = true;
            exp1.Add(propertyTable);

            Expander exp2 = new Expander("Conditions");
            exp2.Expanded = true;
            exp2.Add(conditionsTable);

            mainTable.Attach(exp1,0,1,0,1,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Fill,0,0);
            mainTable.Attach(exp2,0,1,1,2,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Fill,0,0);

            this.PackStart(mainTable,true,true,0);
            this.ShowAll();
        }
开发者ID:moscrif,项目名称:ide,代码行数:54,代码来源:DirPropertyWidget.cs

示例10: SimpleEvaluationTests

        public void SimpleEvaluationTests()
        {
            Parser p = new Parser();
            Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>());

            AssertParseEvaluate(p, "true", expander, true);
            AssertParseEvaluate(p, "on", expander, true);
            AssertParseEvaluate(p, "yes", expander, true);
            AssertParseEvaluate(p, "false", expander, false);
            AssertParseEvaluate(p, "off", expander, false);
            AssertParseEvaluate(p, "no", expander, false);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:12,代码来源:ExpressionTree_Tests.cs

示例11: Form1

        public Form1()
        {
            _parser = new Parser();
            _expander = new Expander();
            _builder = new Builder();
            InitializeComponent();

            _settingsFilePath = @"c:\temp\parsing.xml";
            _itemsFilePath = @"c:\temp\items.xml";

            LoadSetting();
            Parse();
        }
开发者ID:danthomas,项目名称:Parsing,代码行数:13,代码来源:Form1.cs

示例12: RelationalTests

        public void RelationalTests()
        {
            Parser p = new Parser();
            Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>());

            AssertParseEvaluate(p, "1234 < 1235", expander, true);
            AssertParseEvaluate(p, "1234 <= 1235", expander, true);
            AssertParseEvaluate(p, "1235 < 1235", expander, false);
            AssertParseEvaluate(p, "1234 <= 1234", expander, true);
            AssertParseEvaluate(p, "1235 <= 1234", expander, false);
            AssertParseEvaluate(p, "1235 > 1234", expander, true);
            AssertParseEvaluate(p, "1235 >= 1235", expander, true);
            AssertParseEvaluate(p, "1235 >= 1234", expander, true);
            AssertParseEvaluate(p, "0.0==0", expander, true);
        }
开发者ID:nikson,项目名称:msbuild,代码行数:15,代码来源:ExpressionTree_Tests.cs

示例13: CreateMoreOptionsExpander

 private Widget CreateMoreOptionsExpander(string defaultDomainID)
 {
     optionsExpander = new Expander(Util.GS("More options"));
        optionsExpander.Activated += new EventHandler(OnOptionsExpanded);
        Table optionsTable = new Table(2, 3, false);
        optionsExpander.Add(optionsTable);
        optionsTable.ColumnSpacing = 10;
        optionsTable.RowSpacing = 10;
        optionsTable.SetColSpacing(0, 30);
        Label l = new Label(Util.GS("iFolder Account:"));
        l.Xalign = 0;
        optionsTable.Attach(l, 1,2,0,1,
     AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        domainComboBox = ComboBox.NewText();
        optionsTable.Attach(domainComboBox, 2,3,0,1,
     AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
        int defaultDomain = 0;
        for (int x = 0; x < domains.Length; x++)
        {
     domainComboBox.AppendText(domains[x].Name);
     if (defaultDomainID != null)
     {
      if (defaultDomainID == domains[x].ID)
       defaultDomain = x;
     }
     else
      defaultDomain = x;
        }
        domainComboBox.Active = defaultDomain;
        l = new Label(Util.GS("Description:"));
        l.Xalign = 0;
        optionsTable.Attach(l, 1,2,1,2,
     AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
        descriptionTextView = new TextView();
        descriptionTextView.LeftMargin = 4;
        descriptionTextView.RightMargin = 4;
        descriptionTextView.Editable = true;
        descriptionTextView.CursorVisible = true;
        descriptionTextView.AcceptsTab = false;
        descriptionTextView.WrapMode = WrapMode.WordChar;
        ScrolledWindow sw = new ScrolledWindow();
        sw.ShadowType = ShadowType.EtchedIn;
        sw.Add(descriptionTextView);
        optionsTable.Attach(sw, 2,3,1,2,
     AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
        optionsTable.ShowAll();
        return optionsExpander;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:48,代码来源:DragCreateDialog.cs

示例14: ErrorListDialog

        public ErrorListDialog () : base (Catalog.GetString ("Error"))
        {
            var table = new Table (3, 2, false) {
                RowSpacing = 12,
                ColumnSpacing = 16
            };

            table.Attach (icon_image = new Image () {
                    IconName = "dialog-error",
                    IconSize = (int)IconSize.Dialog,
                    Yalign = 0.0f
                }, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0);

            table.Attach (header_label = new Label () { Xalign = 0.0f }, 1, 2, 0, 1,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Shrink, 0, 0);

            table.Attach (message_label = new Hyena.Widgets.WrapLabel (), 1, 2, 1, 2,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Shrink, 0, 0);

            var scrolled_window = new ScrolledWindow () {
                HscrollbarPolicy = PolicyType.Automatic,
                VscrollbarPolicy = PolicyType.Automatic,
                ShadowType = ShadowType.In
            };

            list_view = new TreeView () {
                HeightRequest = 120,
                WidthRequest = 200
            };
            scrolled_window.Add (list_view);

            table.Attach (details_expander = new Expander (Catalog.GetString ("Details")),
                1, 2, 2, 3,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Fill | AttachOptions.Expand,
                0, 0);
            details_expander.Add (scrolled_window);

            VBox.PackStart (table, true, true, 0);
            VBox.Spacing = 12;
            VBox.ShowAll ();

            details_expander.Activated += OnConfigureGeometry;
            Realized += OnConfigureGeometry;
        }
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:47,代码来源:ErrorListDialog.cs

示例15: DeviceDescriptionInfo

 public DeviceDescriptionInfo (Device device)
 {
     this.Build ();
     
     deviceType.Text = device.Type.ToString ();
     udn.Text = device.Udn;
     friendlyName.Text = device.FriendlyName;
     manufacturer.Text = device.Manufacturer;
     manufacturerUrl.Text = device.ManufacturerUrl != null ? device.ManufacturerUrl.ToString () : null;
     modelName.Text = device.ModelName;
     modelNumber.Text = device.ModelNumber;
     modelUrl.Text = device.ModelUrl != null ? device.ModelUrl.ToString () : null;
     serialNumber.Text = device.SerialNumber;
     upc.Text = device.Upc;
     foreach (var icon in device.Icons) {
         var expander = new Expander (string.Format ("{0}, {1}x{2}x{3}", icon.MimeType, icon.Width, icon.Height, icon.Depth));
         expander.Add (new LazyIcon (icon));
         iconBox.PackStart (expander, true, true, 0);
     }
 }
开发者ID:pacificIT,项目名称:mono-upnp,代码行数:20,代码来源:DeviceDescriptionInfo.cs


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