【发布时间】:2020-05-31 22:35:25
【问题描述】:
我正在我的编程课程中创建一个用户界面,我正在使用 Devexpress,但它无法运行,因为 Visual Studio 2019 说:
the type or namespace Xtralayout does not exist in the namespace Devexpress
我正在使用 C# 和 .NET 平台
namespace Inventario_UI.Catalogos
{
partial class FrmListarProveedorcs
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
this.formAssistant1 = new DevExpress.XtraBars.FormAssistant();
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
this.SuspendLayout();
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.labelControl1);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.Root;
this.layoutControl1.Size = new System.Drawing.Size(800, 450);
this.layoutControl1.TabIndex = 0;
this.layoutControl1.Text = "layoutControl1";
//
// Root
//
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.Root.GroupBordersVisible = false;
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.emptySpaceItem1});
this.Root.Name = "Root";
this.Root.Size = new System.Drawing.Size(800, 450);
this.Root.TextVisible = false;
//
// labelControl1
//
this.labelControl1.Location = new System.Drawing.Point(12, 12);
this.labelControl1.Name = "labelControl1";
this.labelControl1.Size = new System.Drawing.Size(63, 13);
this.labelControl1.StyleController = this.layoutControl1;
this.labelControl1.TabIndex = 4;
this.labelControl1.Text = "labelControl1";
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.labelControl1;
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(780, 17);
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem1.TextVisible = false;
//
// emptySpaceItem1
//
this.emptySpaceItem1.AllowHotTrack = false;
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 17);
this.emptySpaceItem1.Name = "emptySpaceItem1";
this.emptySpaceItem1.Size = new System.Drawing.Size(780, 413);
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
//
// FrmListarProveedorcs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.layoutControl1);
this.Name = "FrmListarProveedorcs";
this.Text = "FrmListarProveedorcs";
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup Root;
private DevExpress.XtraBars.FormAssistant formAssistant1;
private DevExpress.XtraEditors.LabelControl labelControl1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
}
}
```
【问题讨论】:
-
检查你的项目是否引用了
DevExpress.XtraLayout.v19.2.dll? -
--谢谢朋友,Devexpress 没有更新。这就是为什么VS没有得到参考。您的回答帮助我找到了错误。
标签: c# visual-studio user-interface devexpress