visual-inheritance

What's the state of play with "Visual Inheritance"

Hi, 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 explicitly remove or add controls etc, I turned to visual inheritance to solve the p...

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 controls on a base form, and inherit from it or to create a user control to drop on each f...

Visual inheritance in Java

The team in which I work has been getting problems with the visual inheritance of the forms in the Java platform. We want to develop a base JFrame with some controls in it and to have inherited forms from that base JFrame. The designer of the Netbeans 6.1 does not paint the controls of the base form in the inherited ones, so we can´t us...

Does Visual Inheritance work in VS2008?

I have a base form. I place Ok and Cancel buttons on the bottom right of the form and anchor them Bottom and Right. The inherited form does not honor the anchor properties of the Ok and Cancel buttons. Here are the exact steps to repro. 1- Create a base form with a button located at bottom/right. Anchor it there at Bottom,Right. 3- ...

Does Visual Inheritance work with User controls in VS2008

I have a base User Control. I place Ok and Cancel buttons on the bottom right of the control and anchor them Bottom and Right. I then create another user control that inherits from the base user control. I resize the inherited control (e.g. increase height or width). Throw the inherited control onto the form. Run. The inherited contro...

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 class. I can access it in the child form code, but not in the form designer. Is this just no...

Issue with inheriting custom control

Hi, I have an user control in our library that I need to inherit and make some update to it. The issue that I'm having right now is that I cannot instantiate the new user control directly. I have to call a method in the library that will create and pass an instance of the user control. Please check sample code below. I tried to use cas...

Visual inheritance in ASP.NET without master pages

I have a certain page and depending on an administrator role a lot of extra validation controls have to be inserted. However I don't want to take the risk that a validator gets turned on for other users. What I was thinking is to use some form of "Visual inheritance" but I don't know which path to choose. Perhaps have separate .aspx pag...

.NET inherited form problem

I have several forms in a C# application. I use Visual Studio 2010 Beta, but .NET 3.5 and C# 3 (so not the new stuff). 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 stuff, but with some additions). I changed things from private to...

Applying a common layout to ascx controls in ASP.NET MVC

What would be the best way to implement visual inheritance for partial ascx views in MVC? I have the main Site.Master file which provides a header, footer, sidebar and main content area. Then i have an Info.Master which uses Site.Master as it's master page and which provides a common layout for almost identical pages. Then all these sim...

ASP: Extend control (ASCX) and access base markup file from subclass code

Hello, I'm building form validation controls for our C# ASP application. The bulk of the work is handled by a BaseValidator control (subclassing System.Web.UI.UserControl), which also has the markup for the validation output. This is then extended by subcontrols like PasswordValidator, that provides the Validate method and any extra fie...

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 version of this common form, subclass it for all these very-similar-but-not-quite-the-sam...

C# visually subclass datagridview control VS2005

Maybe its something stupid, but I'm having a problem with a subclass of a DataGridView Control in VS2005 C#. I know I can subclass from almost anything by doing public class MyDataGridView : DataGridView {} no problem, and I put in some things / elements I want applicable globally. Now, I take this gridview and put into a custom use...

Base form controls not visible in child form

Hello 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 blank. None of the base forms controls are visible in the designer. Everything compile...

VB.NET Visual Inheritance: Friend VS Protected

Why is it that some components/controls will not be inherited visually in a child form if they are declared with the access modifier Friend vs when they are declared with Protected. For example, I've got a DataSet object in my Parent Form that was initially "Friend" (I drag and dropped it to the form, so it was shown as a control in th...

Activity layout inheritance

Hi! I start develop application on Android! I need to show common control on the top of few screens. In Blackberry I just inherit my screens from base screen with needed controls and it inherit UI and behaviour from base type. How can i do similar thing in Android? I mean, how can i organize it? Maybe, i need to create control or layout...

How to achieve visual inheritance in C# and VS2010

I'm using VS2010 and WinForms, and needs lots of forms for creating/updating data entities. How can I go about creating a base form from which to inherit (Cancel and OK buttons, entity parameters, etc)? ...

What is the standard approach for event handling in case of Visual Inheritance?

We know that when a Form is visually inherited, all of its controls are locked in design time. This problem requires that we place event handlers in the base form. Now what should I do if I want to place base-control event handlers in the derived Form? Since the controls are locked, approach of double clicking on the control to add an e...

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 the DataGridView. I am finding the DataGridView as locked in the derived Form, even though ...