A mechanism of Windows Forms that lets forms inherit controls and appearance.
Questions tagged [visual-inheritance]
43 questions
10
votes
6 answers
.NET inherited (WinForms) Form - VS designer issue
I have several forms in a C# application. I use Visual Studio 2010 Beta, but .NET 3.5 and C# 3.
I have a base form, called FilteredQueryViewForm in the Shd namespace and I want some other forms to inherit it (because they will basically do the same…

ShdNx
- 3,172
- 5
- 40
- 47
8
votes
6 answers
What's the state of play with "Visual Inheritance"
We have an application that has to be flexible in how it displays it's main form to the user - depending on the user, the form should be slightly different, maybe an extra button here or there, or some other nuance. In order to stop writing code to…

Vidar
- 6,548
- 22
- 66
- 96
5
votes
4 answers
Visual Inheritance or a User Control?
I have several forms in a .net windows app that have a common set of textboxes and other user input controls,each form has the same look and feel, but each form needs to load and save to different database tables.
Would it be better to place the…
rg01
4
votes
3 answers
Can I change properties of inherited controls at design time?
I am using visual inheritance and was wondering if there is a way to change the properties of inherited controls at design time, preferably in the form designer. If not, then in the designer code.
I have my control declared as Public in the base…

Jeff Stock
- 3,796
- 12
- 46
- 61
4
votes
3 answers
WinForms ToolStrip not available in visual inheritence
Lets say I have FormChild inheriting FormParent. In parent, there is a toolstip at the top. What I want is in my child form to add extra elements, but the control is always locked, although I've set the modifiers to protected.
I've checked the…

Denis Biondic
- 7,943
- 5
- 48
- 79
4
votes
1 answer
How can I change the order of ToolButtons in a inheritable form?
I have two forms. The first one has a TToolBar and two TToolButton. The second one inherits the first one and has three more TToolButton.
I change the order of the buttons in design time, putting the three buttons of the second form before the…

Lucas Felipe Silva
- 115
- 4
4
votes
3 answers
Winform inheritance and default form size
An application I'm working will have a number of forms with a lot of shared functionality. For instance, each form will have a DataGridView, many of the same buttons, much of the same UI code and so on.
I'd like to implement this by creating a base…

dandan78
- 13,328
- 13
- 64
- 78
4
votes
1 answer
Controls on inherited form are locked, can it be undone?
Setup:
I have created a Form that I wish to have serve as the base from which I will inherit other forms. This base form serves as a "template" of sorts, but it also provides a good deal of functionality related to the structure, as well as the…

DonBoitnott
- 10,787
- 6
- 49
- 68
3
votes
1 answer
WinForms visual inheritence issue in VS2010
Quick bit of background to the project in question: it's C# .Net 4, WinForms with smart client factory and unfortunately a lot of visual inheritance.
Here's a brief outline of the problem the team I'm working on are experiencing which seems to be…

james lewis
- 2,486
- 3
- 24
- 30
3
votes
1 answer
How to "turn off" transparency inheritance from UIView to controls inside the view in IB?
I have a UIView in Interface builder (Xcode 4.1)that has its alpha set to 0.1 .
On top of that view, there are some UIbutton objects. These buttons are children of that view, not simple positioned on top of it - this I clearly see in the object…

Earl Grey
- 7,426
- 6
- 39
- 59
3
votes
1 answer
How to get the size of an inherited form in the base form?
Suppose you have a form called FormBase and all other forms inherit from this form.
For example, I have public class Form formTest : FormBase
What I have now in the ctor of formTest:
public class Form formTest : FormBase
{
public formTest()
…

GuidoG
- 11,359
- 6
- 44
- 79
3
votes
1 answer
All control's properties disabled in Visual Studio
I have a parent form and a child form that inherits from the former. In design mode all the inherited controls' properties are disabled. How can I change these properties in the child form?
Here is a screenshot of the designer. Note how I have…

user3646717
- 1,095
- 2
- 12
- 21
3
votes
2 answers
Base form controls not visible in child form
I'm using C#.Net and have a base form that is inherited by several forms.
Until yesterday, when the child (derived) form was opened in the designer the base forms controls would be displayed and shown as locked.
Now, however the form is simply…

Kildareflare
- 4,590
- 5
- 51
- 65
2
votes
1 answer
Silverlight Custom Property Inheritance
I have a class inheriting from UserControl, with a custom DependencyProperty. I put a standard button inside (not necessarily it's immediate child) and I want to get the value of my custom DP on the button, like this:
usercontrol.MyDependency =…

TDaver
- 7,164
- 5
- 47
- 94
2
votes
3 answers
C# Winforms visual inheritance problem with DataGridView
From here I have created a BaseForm, then set all its BaseForm.Designer.cs private members to protected. Then has had a visually inherited/derived Form.
Now I am able to re-size or modify all the controls in the derived Form in design-time except…

user366312
- 16,949
- 65
- 235
- 452