designer

Fix embedded resources for a generic UserControl

纵饮孤独 提交于 2019-11-27 13:37:42
问题 During a refactoring, I added a generic type parameter to MyControl , a class derived from UserControl. So my class is now MyControl<T> . Now I get an error at runtime stating that the embedded resource file MyControl`1.resources cannot be found. A quick look with .NET Reflector shows that the resource file is actually called MyControl.resources , without the `1 . At the start of the MyControl<T>.InitializeComponent method there is this line which is probably the one causing problems: System

Designer.cs not updating when new controls added to .aspx

末鹿安然 提交于 2019-11-27 13:11:22
I've added a new control to my aspx files and noticed that not only was the new control not added to the designer file but that it was also missing quite a few other controls that were added by other members of the team. I've tried deleting the designer.cs file and using "Convert to Web Application" with no success. Some other things i've tried have been excluding the aspx from the project, building, and then re-including with no success. I've also manually entered in a control that was missing in the designer into the designer. When I run after do so an error appears saying the control isn't

Visual studio designer in x64 doesn't work

好久不见. 提交于 2019-11-27 12:05:53
In Visual Studio 2010 64bit I can't design my forms. I keep getting this warning (and error): Warning 18 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: MainForm --- The base class 'Blah' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. This only happens with when I compile for x64 ... in x86 the designer works well. Just want to be clear that I NEED the project to work on x64 because a lot of the project's components are compiled in

<Subtype>Designer</Subtype> Added then removed by Visual Studio on load/unload

别说谁变了你拦得住时间么 提交于 2019-11-27 10:45:48
Anyone see this before? I have a large Visual Studio project that keeps adding [Subtype]Designer[/Subtype] to my .vcproj then removing it on the next open and close of the project. There is only one class defined in StoredImageControl.cs . Anyone know how to shut this off as it is really messing up my revision control. This is before: <EmbeddedResource Include="StoredImageControl.resx"> <DependentUpon>StoredImageControl.cs</DependentUpon> </EmbeddedResource> This is after <EmbeddedResource Include="StoredImageControl.resx"> <DependentUpon>StoredImageControl.cs</DependentUpon> <SubType>Designer

Microsoft Visual Studio and C#: How to Visually Add Events to Controls?

廉价感情. 提交于 2019-11-27 05:24:59
Perhaps this is a stupid question, but for the life of me I cannot find a way to do this. How would one go about adding an event handler to a control in a form in Microsoft Visual Studio (2008) with C#? I can do it manually, but opening the Designer.cs file for the Form, but I cannot find a way to do it through the interface. In MSVC 6, with C++ and MFC, you could right click or some other action, and find a list of all the possible events for that control. Then you select it and it would bring up window letting you create a method to associate with that event. In VB it was even easier, you

How do I use promote to in Qt Designer in pyqt4?

孤街醉人 提交于 2019-11-27 04:53:48
In the designer when I right click a widget, and I click promote to I get this window. See the screenshot below. I have never used this feature. Basically, the header file is confusing me. What is it for? Does that mean I can create a new class in this case, inheriting QLineEdit and add more methods to it? What is the promoted class name? This allows you to use custom widgets defined elsewhere, which designer otherwise wouldn't know about. For example, if you've defined a widget MyLabel derived from QLabel , then you can define it here and then just insert a QLabel as placeholder in your ui

Visual Studio designer in x64 doesn't work

人盡茶涼 提交于 2019-11-27 03:59:15
问题 In Visual Studio 2010 64bit I can't design my forms. I keep getting this warning (and error): Warning 18 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: MainForm --- The base class 'Blah' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. This only happens with when I compile for x64 ... in x86 the designer works well. Just want to be

How do I “hide” controls that my control uses from the toolbox?

不羁岁月 提交于 2019-11-27 03:49:03
问题 I have developed a control in C#. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events. 回答1: Add the

VS2010 “An item with the same key has already been added”

徘徊边缘 提交于 2019-11-27 03:48:43
问题 I recently installed Visual Studio 2010 and copied and converted an old VS2005 solution to VS2010 When I edit this solution, if I try to change a control's .image property, VS2010 creates a message box telling me that "An item with the same key has already been added" (screenshot below), and won't let me browse for an image. I can add images for any other solution, even others ported from VS2005, but not this one. Any idea what I'm doing wrong? An item with the same key has already been added

Manual editing of *.designer.cs file

你离开我真会死。 提交于 2019-11-27 02:14:51
I'm aware, that the .designer.cs file contains data generated by the visual form designer in Visual Studio. However, I have some additional methods though, which I want to put into the .designer.cs file as well, because these are responsible for lower-level form handling (for example, pieces of my visual state manager). The InitializeComponent method inside the .designer.cs file has a comment stating, that it is automatically generated and should not be modified by user. Does this restriction apply only to that method or shouldn't the .designer.cs file be edited by user at all? I've noticed,