简体   繁体   English

c# 为自定义控件扩展用户控件而更改设计器生成代码的顺序

[英]c# Change Order of Designer Generated Code for Custom Control extending User Control

I currently have a C# User Control.我目前有一个 C# 用户控件。 It seems that I need to change the order of the designer generated code.看来我需要更改设计器生成的代码的顺序。 GraphControlMode should be set before the graph controls properties as it is responsible for creating the correct controller type. GraphControlMode 应该在图形控件属性之前设置,因为它负责创建正确的控制器类型。

        // 
        // graphControl2
        // 
        this.graphControl2.Controller.CenterX = ((uint)(623u));
        this.graphControl2.Controller.CenterY = ((uint)(492u));
        this.graphControl2.Controller.ChartDiameter = ((uint)(834u));
        this.graphControl2.Controller.Interval = 100D;
        this.graphControl2.Controller.IsNormalized = false;
        this.graphControl2.Controller.Pause = false;
        this.graphControl2.Controller.Speed = 50D;
        this.graphControl2.Controller.TimeElapsed = 0D;
        this.graphControl2.Controller.View = livePieGraph1;
        this.graphControl2.GraphControlMode = GraphingControl.GraphControl.GraphMode.LIVEPIEGRAPH;

Is there a way to do this?有没有办法做到这一点?

What's the problem?有什么问题? Just cut the line and paste it to the correct position.只需剪切线并将其粘贴到正确的位置即可。 It's designer generated code and it's still code and not magic.它是设计师生成的代码,它仍然是代码而不是魔法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以在设计器生成的代码中设置自定义组件/控件的自定义属性的序列化顺序? - Is it posible to set the order of the serialization of a custom property of a custom component/control in the designer-generated code? 有没有一种方法可以使用C#(Windows Forms)从Designer中访问自定义用户控件中的控件属性。 - Is there a way to access control properties within custom user control from Designer using c# (Windows Forms) C#如何分隔控件和控件的自定义设计器 - C# How to separate the control and the custom designer for the control 有没有办法在c#的In Designer.cs中按顺序插入控件? - Is there any way to insert control by order In Designer.cs in c#? 设计器中的C#扩展控件 - c# extended control in designer 控件未在C#的Designer中加载 - Control are not loaded in designer in C# 如何通过C#代码在自定义WPF控件中更改BitmapEffect - How to change BitmapEffect in custom WPF control via C# code Windows表单C#按代码更改用户控件 - Windows form C# change user control by code Winform Designer 使用自定义控件生成名称错误 - Winform Designer generated name bug with custom control c#winform:从自定义控件覆盖设计器中的默认属性 - c# winform : override default properties in designer from custom control
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM