design-time

UITypeEditor and IExtenderProvider

I have an extender (IExtenderProvider) which extends certain types of controls with additional properties. For one of these properties, I have written a UITypeEditor. So far, all works just fine. The extender also has a couple of properties itself, which I am trying to use as a sort of default for the UITypeEditor. What I want to do ...

Baseline snaplines in custom Winforms controls

I have a custom user control with a textbox on it and I'd like to expose the baseline (of the text in the textbox) snapline outside of the custom control. I know that you create a designer (inherited from ControlDesigner) and override SnapLines to get access to the snaplines, but I'm wondering how to get the text baseline of a control t...

How to detect design time in a VS.NET 2003 control library project

Code below is not working as expected to detect if it is in design mode (VS.Net 2003 - Control Library): if (this.Site != null && this.Site.DesignMode == true) { // Design Mode } else { // Run-time } It is used in a complex user control, deriving from another user control and including other user controls on it. Is there another w...

VS Design Time User Control CSS Duplication

I want to avoid the duplication of stylesheet link tags in the output html when a user control is dropped onto an aspx page. However if you omit the stylesheet link tag you don't get design time support for the stylesheet. Anybody know a way around this problem? ...

.Net WinForms Design Time Rules

I have an object that starts a thread, opens a file, and waits for input from other classes. As it receives input it writes it to disk. Basically, it's a thread safe data logging class... Here's the weird part. When I open a form in the designer (VS 2008) that uses the object the file gets created. It's obviously running under the d...

Add custom design time command to WinForms control

I have a custom WinForms control (inherits from control, i.e. without user interface jsut as Timer) to which I want to add a custom command add design time. This could be similar to the "right click and choose 'Edit Items...'" of a menu. Is this posisble? How? Also, could you recommend some general reading (online) about improving th...

Displaying available strongly typed resource classes in Property Window

I'm extending the Gridview Web Control as my first attempt at creating a custom control. As part of the extension I am encapsulating the localization of the grid column headers within the control. Among others, I'm exposing a couple of properties to enable this feature: bool AutoLocalizeColumnHeaders - enables the feature string Heade...

.NET Designtime Datasource (for Combobox)

Hi, i'm trying to create a ObjectDataSource which I can use to bind to a BindingSource which on his turn should be bound to a ComboBox. I've created a simple class and a simple list for this class (see below) The Times list class is not showing up at my toolbox, so I cannot drag it to the form so I can select it as the datasource for...

Windows .Net controls - Creating property templates

Assume that all text box controls in my .Net Windows application created by dragging a TextBox control onto the Form editor should have the following default properties (some text box instances can override these properties) : Text Align: Centre Resize : As per content Dock: Left, Top and Right Now, it becomes cumbersome and manual...

Can I iterate referenced assemblies at design-time in C#?

I am attempting to write a .NET component. The component will be dropped onto a form/user control and needs to access attributes in assemblies referenced by the components parent form/user control at design-time. Is it possible to obtain these assemblies at design time? ...

Design-Time Tutorials

I am looking for some (preferably) online tutorials on making controls with 'Rich design-time support' By Rich design time support i mean like how the menustrip works on a form and such. Any links to websites, good books or code samples (c# or vb.net) would be great. ...

Do you use FeatureConnectorAttribute or FeatureAttribute in the simple case to add a feature provider to a type?

I'm looking into implementing design-time support for some WPF controls, and I'm confused by the MSDN article Feature Providers and Connectors. In the How Feature Providers are Created at Design Time section, it mentions that in the simplest case, you can use FeatureConnectorAttribute to associate a feature provider with a class. This ...

What's a simple ParentAdapter implementation look like?

I'm trying to write a ParentAdapter implementation; I'm interested in providing design-time support for some WPF controls I'm writing and this is how you manage custom logic for reparenting items to different container controls. I started small, with the notion of creating a StackPanel-derived class that would only allow Button elements...

Creating a Designer similar to the UserControlDocumentDesigner

I would like to create a Designer that will allow me to add controls during runtime to a custom control, just like the System.Windows.Forms.UserControl. I noticed that the UserControl uses the UserControlDocumentDesigner, because this is internal i cannot use it. So i will implement my own. public class MyDesigner : DocumentDesigner {...

Adding design-time support for a nested container in a custom/usercontrol (Winforms).

Hi I have something similar to a wizard control, in the middle is a Panel I would like to use to place any child controls. I have found using the ScrollableControlDesigner will allow dropped controls to be added to the custom/usercontrol, but this is not what I require. It needs to be added to the container, so layout can be applied wi...

Visual Studio design time and fixed-layout tables - your opinions

Hi guys, I'm about to submit a bug to Microsoft. The following html is displayed fine in a browser, but in VS designer it makes the entire page scrollable - as the table isn't clipped by the div: <div style="width: 800px; height: 100px; overflow: scroll;"> <table style="table-layout:fixed"> <tr> <td style="widt...

Fuss over Runtime and Design Time packages in Delphi

I have seen that most of the components (VCLs) in Delphi are split in two parts. 1) DesignTime Package 2) RunTime Package Why all this fuss. What difference does it make if both RunTime and DesignTime packages are united into one single Package? I have never really been able to understand this separation logic. So what is the logic be...

Design-time drag and drop in Delphi?

Before Delphi 2006 (I think) introduced the TFlowPanel and TGridPanel, I did a control that was similar in concept. It still does a couple of things those controls do not do, and when upgrading my code to Delphi 2009, I decided to add a couple of enhancements to that as well. Right now, the order of the child controls is determined by t...

Custom Designer class for a .NET Windows Form issue

Hello guys, I have implemented a custom designer class which inherits from DocumentDesigner. The standard Form class in the .NET Framework uses the FormDocumentDesigner class (also inheriting from DocumentDesigner) but since this class is internal it is not possible to inherit from it and customize its behavior I copied the logic in thi...

Desired output at design time, Visual Studio 2008 (vb)

Is it possible to choose to run specific code at design time? What i would like to be able to do is to display a list of enums that are used ina specific form and menu. Is this possible to do? Any response would be appreciated. Thanks in advance! ...