designer

Using VS 2005 to design abstract forms

江枫思渺然 提交于 2019-12-05 14:39:18
There's a famous bug in Visual Studio that prevents you from using the form designer on a subclass of an abstract form. This problem has already been elucidated and solved most elegantly by Urban Potato ; that's not the part I'm having trouble with. The trouble is, I have duplicated the technique described by Urban Potato, and included it in my project (which happens to be pretty big), and now every time I try to open the designer of my derived form, I get that Microsoft "frightfully sorry, old chap, but I'm going to have to kill you now" message (reminiscent of Otto in A Fish Called Wanda )

.NET Configuration Section Designer - Where is my collection?

你离开我真会死。 提交于 2019-12-05 04:04:37
问题 I am using the Configuration Section Designer for .NET to build a simple ConfigurationElementCollection . It appears that everything builds just fine and the code is automatically generated since the sub-elements are visible with Intellisense. Unfortunately, even though I have added elements to the collection in the configuration section, they do not exist at run-time; it shows the collection's Length property to be 0 - i.e. the collection is empty even though, as you can see in my example

Why does QT designer re-size or not allow me to shrink or expand widgets or buttons?

a 夏天 提交于 2019-12-05 02:52:30
Often times while using QT designer I find myself needing to re-size things either by shrinking or expanding them. Whenever I try to do this the program does not allow me and simply reverts to the original default size it gives me when placing the object within my window, regardless of the layout I have. Why does it do this? And is it possible to change this so that I can re-size things to my own will without restrictions? I have been trying to learn how to properly use QT designer, but I can't find much information on this on the internet. Anything placed in a "Layout" will be automatically

How to stop visual studio from opening my winforms controls in the designer

爷,独闯天下 提交于 2019-12-04 19:27:07
问题 When I want to edit/view the code for a winforms control/form i created, I need to right-click in the solution and select "view code". The default action for opening the file is "view designer". This appears to be the case for any C# file containing a class that inherits from a winforms control, even if this is indirectly. The daft thing is that VS does this if it can't run the designer (for instance when the control is not the first class in the file). Is there hint or attribute or

Winforms Designer: Modify (and keep) properties in sub objects

久未见 提交于 2019-12-04 19:04:25
For a WinForms control, I'd like to move certain settings into a sub object. One of them is a custom class containing all UI Strings, the other a OpenFileDialog: class MyControl: Control { // ... private OpenFileDialog m_dlgOpen = new OpenFileDialog(); public OpenFileDialog DialogOpen { get { return m_dlgOpen; } } } This adds the sub object to the designer, and allows to edit its properties (e.g. title, default extension, filter). However, the changes are nto added to the InitalizeComponent method, so they are lost. Is it possible to make this properties "persist" in the InitializeComponent

Making the Visual Studio designer ignore a public property

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 17:41:42
问题 I have a UserControl with a public property using the following attributes: [Browsable(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] I have tried deleting the owner form, re-creating a fresh form in Visual Studio 2010, and adding this UserControl to the form. It keeps adding a line like the following in the Designer file: this.vMyUserControl.MyProperty = ((MyNamespace.MyClass)(resources.GetObject("vMyUserControl.MyProperty"))); This crashes my application

Question How to invalidate/refresh the VS IDE designer for C#?

╄→гoц情女王★ 提交于 2019-12-04 14:03:35
问题 I have CustomForm inherited from Form which implements a boolean property named Prop . The forms I'll be using will inherit from CustomForm . This property will do some painting and changes (if it's enabled) to the form. However, this is not working as it should, the VS IDE designed is not being refresh to show the changes. But if I press Ctrl+Shift+B (Menu: Build » Build Solution) the VS IDE will refresh, the form designer will even disappear for a split second and will redraw itself with

Visual Studio keeps resizing my form without me telling it to, help! [duplicate]

允我心安 提交于 2019-12-04 12:54:18
This question already has answers here : visual studio 2005 designer moves controls and resizes Form (10 answers) Closed 4 years ago . I am running visual studio 2008. Every so often when I go to the designer view of one of my forms, the designer will make the form slightly larger. This happens on forms where I have a minimum size. I want the form to be the minimum size so why does it keep adjusting the size on me? I was having this issue with a particular form that hosted a user control. Everytime I did a full Rebuild Solution it would make the form shorter. Found a simple solution: in the

Argument validation in custom activity designer

夙愿已清 提交于 2019-12-04 09:19:02
I am having problems getting validation to work properly in the designer for my custom activity. The simplest sample to reproduce the behavior is as follows: I have a custom WF4 activity with a dynamic collection of arguments stored in a dictionary: [Designer(typeof(DictionaryActivityDesigner))] public class DictionaryActivity : NativeActivity { [Browsable(false)] public Dictionary<string, InArgument> Arguments { get; set; } public InArgument<string> StringArg { get; set; } public DictionaryActivity() { Arguments = new Dictionary<string, InArgument>(); } protected override void Execute

wpf xaml designer bug

早过忘川 提交于 2019-12-04 08:41:09
every time we open a *.xaml file in our project - we see not working designer and a lot of messages 'type not found' 'assembly not found' etc. After a couple of experiments, i found out a root of a problem : create new WPF application, create a folder in project root, add some value converter to folder, try to use it on your 'MainWindow.xaml' you will probably write something like this : xmlns:Folder="clr-namespace:WpfApp.Folder" and then <Window.Resources> <Folder:SomeValueConverter x:Key="someKey"/> </Window.Resources> You know... And, now the most interesting thing! when you build your