views:

24

answers:

2

Adding a new Form in the project creates a default form with default properties. I have to change them manually, but in all my project I have the same properties (font, background color, etc.).

Is there a way I can change the default Ide template for Forms?

+1  A: 

Create your own form control that is derived from the base one and has all the properties set just like you want them, then you can use this one all over your project. Also changing something will be very easy since you'll have to do it only in one place.

Adrian Faciu
I don't like this because I have to change the Control type. I already use a derived, 3rd party, form control. I want a way to instruct the designer to use a standard Form, but changing the default properties as I like.
vulkanino
+3  A: 

Not using inheritance as Adrian recommended is a mistake. It is the right way to do it because you can in one fell swoop change every form in your app by editing the base form properties.

But you want to change the template. That's easy to do as well. Start a new scratch project with one Form and change the properties you want to have customized. Click File + Export Template. Select Item template, Next. Tick the form, Next. Next. Give it a good name and description and click Finish. You can now select that template whenever you create a new form.

Hans Passant
that's exactly what I wanted.
vulkanino