design-time

How to get the application path at design time in winforms, .net?

If you use Application.StartupPath in a referenced dll, the path points to the path of the IDE. Is there anyway to get the path of the actual application? Just to be clear, this is at design time. ETA: I've posted the solution below: ETA2: Because it's related, I thought i'd post a snippet of another useful design-time service. Lik...

Is anyone really using ThumbnailAttribute for Toolbox icons?

I was putting finishing touches on a new WPF/Silverlight custom control and decided that this time I would go with .NET 3.5 SP1 requirement (for WPF version). So, I decided to go with recommended new way of setting toolbox icon/image with ThumbnailAttribute. After spending some time on it I couldn't make it work and turned for help to Go...

WPF XAML - Could not create an instance of type 'GlyphTypeface'. at design time.

I'm trying to visualize a XAML resource file at design time. When I merge the dictionary for the following XAML resource file into a XAML Window I get the error: Could not create an instance of type 'GlyphTypeface'. The problem line is: <GlyphTypeface FontUri="C:\WINDOWS\Fonts\TAHOMA.TTF" /> I have verified that the font exist in the...

Can't databind at design time in WPF using MVVM - ViewModel property never gets called

Ok, I'm pulling my hair out over this, so any help will be hugely appreciated! I'm building a WPF application using the MVVM pattern. In an attempt to get data in at design time I am using the Ninject dependency injection framework in conjunction with a service locator (much like the example in an article at http://jonas.follesoe.no/Yo...

How to get the project path at Design Time

Hi, I use a component (System.ComponentModel.Component) and I want to get the application path of my project in order to create a file within it. Thx Florian ...

How can a component at designtime determine the project directory

Hello, I write a component which should store some information relative to the project directory. Every time a property of my component is changed it should write a file. So how can a component determine the current project directory at design time. Thanks in advance EDIT: I want to generate a delphi source file every time a property...

User control attributes at design-time

I'm testing a simple User Control in Visual Studio 2008: A Panel named Wrapper with some controls inside. Can Visual Studio handle this at design time? public partial class TestControl : System.Web.UI.UserControl { [Description("Css class of the div around the control.")] [CssClassProperty] public string CssClass { ...

DesignTime support for SharePoint 2007 Application Pages in VS2008

Is there design time support in VS2008 for SharePoint Application Pages? I've wrote an SPService and I want to develop an UI for the properties who are necessary for running this SPService. But I can't manage to get design time support in VS2008. I'm creating an custom ASPX which inherits from GlobalAdminPage and has the "_admin/admin.m...

Customized design-time attribute for WPF

I've created a custom control, and would like to create an attribute (available in Blend's design-time) which would offer a dropdown or combobox. The designer would then select one of the available options. Very much like the "Cursor" combo in the "Common Properties" tab, except that I want full control over what items go in the combo....

Using Moq at Blend design time

This might be a bit out there, but suppose I want to use Moq in a ViewModel to create some design time data, like so: public class SomeViewModel { public SomeViewModel(ISomeDependency dependency) { if (IsInDesignMode) { var mock = new Mock<ISomeDependency>(); dependency = mock.Object; // this throws! ...

How to expose a control collection to a property grid at design time

I have a custom control that with a property that is a collection of custom object. This custom object hava a reference to some component/controls. When at design time I tray to add an item to the collection and select the object, VS tells me that the control is not serializable. This is the code (simplified version - but not to much)...

Do I need to use any other attributes other than CssClassProperty to enabled design-time support?

Hi, I'm trying to provide the same design-time support that the CssClass provides on some custom properties of a server control. The documentation suggests that decorating the property with the CssClassProperty is all that's required. [CssClassProperty] public string SomeOtherCssClass{get;set;} This has no effect, in vs2008 or vs201...

Run time vs design time

I read somewhere that somebody could access a config value during run time but not during design time. Whats the difference between run time and design time in this context? ...

IoC and Design Time

I have a WPF application which I am using to learn MVVM and IoC. The problem is that the Model used by one of the Views expects to pull one of its dependancies in the constructor from an IoC container. When working on this View in the Visual Studio designer it cannot show the design because an exception is being raised in the model. ...

How To Create An ASP.NET Designer Host

I have been asked to build an application where I can drag and drop few WebControls onto the WebPage designer surface. So far I have read some articles on .NET Framework Design-Time architecture, like, MSDN Article: Hosting WinForms Designers, Developer Function Article etc. But I can't a find a way to host WebForms designer. The only ...

Retrieving/simulating run-time "layer" functionality in Flash under ActionScript 3.

Are there any AS3 classes to help arrange objects into layers, like in the designer, such that the objects all have the same parent? Obviously, I can use container clips to simulate layers, but I specifically want this kind of functionality for objects that have the same parent. My understanding is that the design-time notion of layers...

ASP.NET Custom Control

I am building an ASP.NET Web User Control which has a panel within it. How do I make the Panel within the user control resizable (i.e. with handles) at design time in Visual Studio. I need to create a design class or something?? Thanks. ...

Visual Studio Design Time Property - Form List Drop Down

[EDIT] To be clear, I know how to get a list of forms via reflection. I'm more concerned with the design time property grid. I have a user control with a public property of the type Form. I want to be able to select a form at design time from a dropdown. I want to populate the form dropdown list from a set namespace: UI.Foo.Forms This...

Component properties working at designtime but not runtime

I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors propert...

How do I load SciLexer.dll in Visual Studio 2008 Designer, on Windows 7 64-bit?

We develop a WinForm application using Scintilla.NET (1.7) component, which uses SciLexer.dll (unamnaged). At run-time, we distribute both 32bit and 64bit SciLexer.dll, and we load the correct one when the application starts (everything works fine). On our new development environments (Windows 7 64-bit), all our solutions build and run ...