簡體   English   中英

c# 為自定義控件擴展用戶控件而更改設計器生成代碼的順序

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM