Menu
  • HOME
  • TAGS

Form with a MainMenu shrinks every time the project is run

c#,winforms,menu,visual-c#-express-2010,visual-studio-designer

There is something built-in to that old menu system that increases the size of the form by the height of the menu system when it gets attached to its Menu property when using the designer. For a work-around, go in the Designer.cs file, comment out this line: // this.Menu =...

Why does visual studio put CommandText in resx resource file vs designer code behind file?

.net,visual-studio-2012,resx,visual-studio-designer

Finally, after some googling I found the answer posted here: I have examined it a little further. It appears that the commandtext is saved in the resource when it's length is more the 200 characters. This not only applies to the commandtext property, but to all string properties, e.g. the...

How do you change the type of a WinForms control to a new type that is derived from the original type when using Visual Studio Designer?

vb.net,winforms,visual-studio,user-interface,visual-studio-designer

You just need to replace a the lines of code that you initialize your group boxes. Instead of: Dim groupBox as new GroupBox(); You would change that to: Dim groupBox as new GroupBoxPlus(); You could simply search for 'as new GroupBox();' and replace with 'as new GroupBoxPlus()'. Modifying the generated...

Visual Studio designer does not generate code for `List` members of `Windows.Forms.Control`

c#,winforms,visual-studio-2010,visual-studio-designer

It's necessary to implement a TypeConverter for the class. What this TypeConverter do is just returning a constructor descriptor for the class. Also, specify the TypeConverter of the class using the parameter [TypeConverter(typeof(typeConverter))]. According to MSDN How to: Implement a Type Converter in this case more specifically on the Type...

Can I preview my DataTemplate(s) in my collection-based controls in the designer?

wpf,visual-studio,xaml,visual-studio-2013,visual-studio-designer

you can use a design time viewmodel. Add these attributes to the usercontrol / window: xmlns:designTime="clr-namespace:NamespaceToYourDesignTimeViewmodel" mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=designTime:DesignTimeMyViewModel, IsDesignTimeCreatable=True}" Assuming your design time viewmodel has the same structure as the run time viewmodel (you may choose to enforce that with an interface); then you can create design time data...

Visual Studio Designer Bottom Pane

visual-studio-2013,visual-studio-designer

When something like a SerialPort or SaveFileDialog appears at the bottom the designer, it just means that component is not a physical thing that gets drawn on the form/window. To avoid confusion, it is displayed outside of the window. You can click on it to see and change its properties,...