windows-forms-designer

Can I change the default modifier from Friend to Private in the Windows Forms designer in VS 2008?

做~自己de王妃 提交于 2019-12-03 12:56:33
When I develop a Windows Forms app in Visual Studio using C#, every control that I add to my form is by default marked as private , which is what I want. When using VB.NET, every control is by default marked as Friend (the equivalent of internal in C#), which is not what I want. Can I just change this default? It seems like surely it's a setting somewhere. Annoying, isn't it. What I usually do is when the form is stable, I replace Friend WithEvents to Private then add WithEvents to the controls that have Handles clauses. Yes, you would think there was a setting, but I never found it. This was

Zooming in the visual studio form designer

回眸只為那壹抹淺笑 提交于 2019-12-03 10:35:24
问题 I'm using the Visual Studio 2013 form designer to edit a form. The size of the form in the designer window is too big so I want to zoom out. In applications like Photoshop or Blend I could (among other things) use the keyboard shortcut Ctrl-0 to fit the design to the screen. In Visual Studio how do I zoom out in the form design window? 回答1: The Windows Forms designer doesn't zoom. The WPF one does because it's vector based, but WinForms is pixel based you don't get the zooming. If you've got

Automatic regenerate designer files

拈花ヽ惹草 提交于 2019-12-03 05:35:30
Recently I've been making some improvements to a lot of the controls we use, for example give properties default values and making buttons private instead of protected. By making this kind of adjustments you need to regenerate the designer files of the forms which have this control on it or controls which inherit from the control. In the past this wasn't really a problem because we only had 20-30 forms. At the moment we've got more than 300 forms which would mean opening the same amount of designers in VS2010. So my question: do you know a way of automating this process so all of the forms get

Chart x-axis maximum value not being set correctly

◇◆丶佛笑我妖孽 提交于 2019-12-02 19:51:21
问题 I currently have a chart on my C# Windows Form Application (in Visual Studio 2013) that gradually draws a line onto it using a timer. I have tried to set the minimum and maximum values for the x- and y-axes and although the y-axis values are being set correctly and appearing as expected on the chart, the x-axis range is not being set correctly and stops at a certain point (around 17.9). Here is the code for the chart and the timer that I currently have: private void btnPlotGraph_Click(object

Chart x-axis maximum value not being set correctly

江枫思渺然 提交于 2019-12-02 11:46:11
I currently have a chart on my C# Windows Form Application (in Visual Studio 2013) that gradually draws a line onto it using a timer. I have tried to set the minimum and maximum values for the x- and y-axes and although the y-axis values are being set correctly and appearing as expected on the chart, the x-axis range is not being set correctly and stops at a certain point (around 17.9). Here is the code for the chart and the timer that I currently have: private void btnPlotGraph_Click(object sender, EventArgs e) { chart1.ChartAreas[0].AxisX.Minimum = 0; chart1.ChartAreas[0].AxisX.Maximum =

Convert XAML WPF Window to WinForm

百般思念 提交于 2019-12-02 10:33:07
问题 Is there any utility or converter to convert XAML WPF window to .Net 2.0 Windows forms form? 回答1: No, and there's unlikely to be anything like this; WPF and WinForms are disparate frameworks, a WPF UI can't really be converted to a WinForms UI due to differences in UI composition, layout differences, different positioning systems, etc. 回答2: There is no tool to convert it across. It might be worth using an ElementHost to load WPF components in WPF, that way you don't need to convert and can re

Visual Studio Winform designer: Set DataBindings on current control BindingSource

会有一股神秘感。 提交于 2019-12-02 08:47:49
问题 I am creating a UserControl in Winforms, using Visual Studio 2013 designer. It contains a TextBox. I added a BindingSource (which DataSource property is set in code to a List). When I click on the TextBox, look in the property window (F4), expand the "(DataBindings)" node and click on the "(Advanced)" button the Binding window opens. In that window, there is no choice available in the Bindings list (beside Add). I Expected to find my BindingSource in that list. Is it possible to get my custom

How to enable Default Values for properties in a 'CollectionEditor' dialog

会有一股神秘感。 提交于 2019-12-02 05:36:14
问题 Please read entire question first to understand where I would have the ability to reset the default value of a property. When defining a custom class that can be visually designed, one can implement a collections editor to modify properties which are lists, arrays, collections, using the following pattern: [Editor(typeof(CollectionEditor), typeof(UITypeEditor)), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ElementCollection Elements { get; } Editing the

Convert XAML WPF Window to WinForm

Deadly 提交于 2019-12-02 02:53:05
Is there any utility or converter to convert XAML WPF window to .Net 2.0 Windows forms form? No, and there's unlikely to be anything like this; WPF and WinForms are disparate frameworks, a WPF UI can't really be converted to a WinForms UI due to differences in UI composition, layout differences, different positioning systems, etc. Tom Dudfield There is no tool to convert it across. It might be worth using an ElementHost to load WPF components in WPF, that way you don't need to convert and can re-use WPF components. If you have a WPF window you would need to convert this to a UserControl to

Visual Studio Winform designer: Set DataBindings on current control BindingSource

陌路散爱 提交于 2019-12-02 02:50:40
I am creating a UserControl in Winforms, using Visual Studio 2013 designer. It contains a TextBox. I added a BindingSource (which DataSource property is set in code to a List). When I click on the TextBox, look in the property window (F4), expand the "(DataBindings)" node and click on the "(Advanced)" button the Binding window opens. In that window, there is no choice available in the Bindings list (beside Add). I Expected to find my BindingSource in that list. Is it possible to get my custom BindingSource (added with Drag&Drop in the designer) available in that Binding window? You have to set