![](/img/trans.png)
[英]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# Change Order of Designer Generated Code for Custom Control extending User Control
我目前有一個 C# 用戶控件。 看來我需要更改設計器生成的代碼的順序。 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;
有沒有辦法做到這一點?
有什么問題? 只需剪切線並將其粘貼到正確的位置即可。 它是設計師生成的代碼,它仍然是代碼而不是魔法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.