Omat komponentit - Luento 5
Luentotaltiointi
Ongelmia videon katselussa?Luentoesimerkki ( luento5.zip)
Luodaan muutama yksinkertainen oma komponentti.
Aluksi muutama edellisluennolta jäänyt asia: anchor, drag and drop.
Komponentit
// propertyn properties-listauksen kustomointia [Category("Autolaskuri"), Description("Tähän autolaskurin kuvaus"), DefaultValue(0), Browsable(true)] public int Laskuri { get { return pLaskuri; } set { if (value >= 0) pLaskuri = value; } } // seuraavalla testataan onko komponentti design-moodissa if (this.DesignMode) return;
- Custom Controls in Visual C# .NET
- Walkthrough: Authoring a Composite Control with Visual C#
- How to: Test the Run-Time Behavior of a UserControl
- How to: Inherit from Existing Windows Forms Controls
- How to: Inherit from the UserControl Class
- How to: Author Controls for Windows Forms
- Control Type Recommendations
- Varieties of Custom Controls
- How to: Create a Windows Forms Control That Takes Advantage of Design-Time Features
- How to: Display a Control in the Choose Toolbox Items Dialog Box
- Walkthrough: Creating a Windows Forms Control That Takes Advantage of Visual Studio Design-Time Features
- Custom Design-time Control Features in Visual Studio .NET
- Building Windows Forms Controls and Components with Rich Design-Time Features
- Creating a Windows Form User Control
- Identifying the Run-Time and the Design Mode
- User Controls Custom Properties
Käyttäjien kommentit