designer

Error when adding user-defined control to a form.

谁都会走 提交于 2020-01-07 03:02:53
问题 I have an user-defined control which includes a property ElementList of IList<WFParament> type. When I add my control into a form, I get the error: "WorkFlowDesign.WFParament[]" can't be transfered into "WorkFlowDesign.WFParament[]" 回答1: Does your usercontrol do anything on load? If so, try wrapping it in: if(!DesignMode) { //Do something } 回答2: I would verify that you don't have two versions of the assembly containing the type WorkFowDesign.WFParament loaded/referenced. This could happen if

Error when adding user-defined control to a form.

跟風遠走 提交于 2020-01-07 03:02:47
问题 I have an user-defined control which includes a property ElementList of IList<WFParament> type. When I add my control into a form, I get the error: "WorkFlowDesign.WFParament[]" can't be transfered into "WorkFlowDesign.WFParament[]" 回答1: Does your usercontrol do anything on load? If so, try wrapping it in: if(!DesignMode) { //Do something } 回答2: I would verify that you don't have two versions of the assembly containing the type WorkFowDesign.WFParament loaded/referenced. This could happen if

Custom Property Default Value & .NET Designer

馋奶兔 提交于 2020-01-06 08:22:18
问题 What's the best way to avoid (or control) the initialisation by the designer of a heavy custom property in .NET? Sometimes it is important to have a property set to something initially without that setting being acted upon when initially set. In the imaginary example below, I want to achieve the flexibility of having something like UpdateSetting as a property, but not the inconvenience of having the database set to zero every time the application starts up. All I can think of is another

Designer forcing resources to be embedded in form, rather than using Resources.resx?

做~自己de王妃 提交于 2020-01-04 04:34:24
问题 This problem has left me scratching my head! I'll try to be as concise as possible. On a high level: The problem is that although the project works fine and the code looks good to me. Whenever I edit and build certain forms, Visual Studio re-writes the *.Designer.cs files in a way that is very undesirable. I quite confident that these *.Designer.cs files have not been edited (especially the auto-generated portion) in the past. In more detail: Our project uses custom controls, some which

Preview Xamarin Form Pages

安稳与你 提交于 2020-01-03 08:27:08
问题 Is there any way to preview a Xamarin forms page without first deploying to device/emulator? Or is there any way to live edit the page and see changes somewhere (a bit like Snoopy for WPF). I tried both Xamarin Studio + Visual Studio and do not see a designer. 回答1: Update 30 Sept 2016: Using the latest version of Xamarin you can use the following steps: Use the View > Other Windows > Xamarin.Forms Previewer menu in Visual Studio to open the preview window. Use the Window > New Vertical Tab

How to set default XAML view in Visual Studio 2008

无人久伴 提交于 2020-01-03 07:26:06
问题 In Visual Studio 2008, when you add a new XAML window to a WPF Application Project, the default view you get is "split view" where the visual designer and the XAML code are shown one above the other in the same document. I prefer an alternative view which you can get by double-clicking on either the Design or XAML tabs. The visual designer and the XAML are in separate side-by-side tabbed views. This makes it easy to switch between them I want to know if it possible to make this the default

Using VS 2005 to design abstract forms

十年热恋 提交于 2020-01-02 05:20:06
问题 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,

Equivalent to designer guidelines in code

核能气质少年 提交于 2020-01-02 01:07:06
问题 The VCL form designer offers pink guidelines for aligning controls at their respective text base lines: But as far as I can tell this doesn't work for labels and checkboxes. Update: It works for labels if you place the controls exactly , e.g. by Ctrl - arrow . It kind of works for checkboxes - see screenshot. Now, on some forms I'm creating controls in code, e.g. ed := TEdit.Create(Self); ed.SetBounds(...); ed.Parent := SomePanel; etc. How can I ensure that their text base lines are aligned?

Argument validation in custom activity designer

核能气质少年 提交于 2020-01-01 12:02:47
问题 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

What causes the VS 2010 SP1 WPF Designer to crash?

送分小仙女□ 提交于 2019-12-30 18:59:33
问题 We're experiencing crashes on various machines in the VS2010 WPF designer in the following scenario: VS 2010 SP1 installed 64 Bit Windows 7 Reference to NHibernate.dll (Version 1.2.0.712) To reproduce the Error, create a new WPF Solution, perform the following actions: create a new WPF solution open the main window, add a textbox to it, set some static text add a reference to FluentNhibernate.dll, Version 1.2.0.712 Clean and Rebuild the solution Open main window in designer again, edit text