How do I connect a button on Visual Studio 2022 in WinForms application? - winforms

I'm using Nuget package (System.Data.SqlClient-4.8.3) in Visual Studio 2022. How do I add a button to run my C# code as an on-click for a WinForms GUI? I'm using the Entity-Framework .NET 6.0.

This youtube video is a little more comprehensive for where to find the "ToolBox", what to look for in the toolbox, and how to manipulate click actions for events:
Adding and Writing Code on Button using Visual Studio 2019
If your ToolBox is not showing, then go to views and toggle it on.

Related

MVVM Light templates not showing in "Add Item" menu (VS 2017)?

I've installed MVVM Light Toolkit through NuGet in VS 2017. The problem is that when I click "Add New Item" on any project, I don't see any MVVM templates that appear in MVVM Light tutorials.
They must look like this (but I don't see them in my project):
http://prntscr.com/n9bs1q
I found similar questions about VS 2012. The answers advise to search for C:\Program Files (x86)\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Vsix
But I have no such folder not in Program Files (x86), neither in Program Files.
Help me please, what should I do for the templates to appear?
MVVM Light NuGet can only add related resources (assemblies/.cs files) into the project. It wont add Templates into Visual Studio. To get templates in Visual Studio, you have to install MVVM Light Visual Studio Extension by following the below steps.
Open Visual Studio and go to Tools->Extensions and Updates.
In the Extensions and Updates window lick Online in the left pane.
In the search bar, type MVVM Light.
In the search results find MVVM Light for VS2017. Click Download and accept license.
Extension will be installed once Visual Studio gets restarted. Then you can get the templates.
UPDATE:
They have stopped support of Item Templates for MVVM Light in Visual Studio 2017. Its been there up to VS 2015. So you can only get Project Templates (File->New Project) in VS 2017 extension. You can see similar queries here.

Unable to add WPF controls to the toolbox in Visual Studio 2013

First of all, I am completely new to Visual Studio, so please don't be too judgmental. I have a project I need to do in C# for my studies and my team uses a GitHub repository. I am in charge of creating the GUI and I am stuck at the very beggining.
I want to create the main application window using WPF, but when I use toolbox > choose items, I can not see the WPF tab. Also, when I am trying to enable the designer view, nothing happens.
Is it perhaps the software version being Visual Studio Community 2013 causing the issue? Do I need to have the Visual Studio Professional version in order to use WPF toolbox?
I'm attaching a link to the screen of the situation below.
As I presumed, all I needed was the professional version of Visual Studio. After obtaining and installing it everything works fine.

Microsoft silverlight controls not recognised by microsoft visual studio 2010 ultimate coded UI Test

Req: Need to do automation testing on Website with silverlight controls using "MS Visual Studio 2010 ultimate - coded UITest".
Problem: While recording silverlight control, it displays an error "MS Silverlight control cannot be recognised. Check http:\go.microsoft.com\fwlink\?linkID=157214"
how to resolve this issue with prerequiste
Probably the IE browser should be set to Compatibility view.
http://swautomation.wordpress.com/tag/microsoft-visualstudio-testtools-uitest-extension-silverlightuiautomationhelper/

How do you edit styles in WPF 4.5 under Windows 7?

I just realised that Blend for Visual Studio 2012 does not support WPF apps under W7.
Once I opened a window I can only see raw XAML.
I need to edit a style for a chart dataseries System.Windows.Controls.DataVisualization.Charting. I normally use Blend for these kind of tasks - because it pulls default styles from somewhere and gives it to you in a blink of an eye.
now I am stuck.. what would you guys do?
P.S. here is nice summary for future references: http://blendinsider.com/technical/available-now-blend-for-visual-studio-2012-2012-08-15/
(scroll down to see the table what version supports what)
You need to use the Blend Preview that supports WPF apps.
http://expression.microsoft.com/en-us/jj154135
How can I design an animation with a WPF project in Visual Studio 2012?
Visual Studio 2012 Update 2 will have a released version of Blend which supports WPF...in the meantime use the preview one.
http://www.microsoft.com/expression/

ReportViewer (.rdlc) light designer for WinForms

Are there any other ReportViewer designer beside the Visual Studio (with GUI of course I know that any XML/TEXT editor can change definition of .rdlc file) ?
One day when I finish my rich (fat) client application at all, Ill love to try embed in report designer, so end users can do cosmetics modification of theirs report files without having installed Visual Studio.
Sub question, does this feature have CrystalReport service ?
I tried an opensource editor: http://www.fyireporting.com/products.html, and it works! (I have several WinForms apps which use the ReportViewer from Visual Studio 2008). You can, of course, download the sources also and adapt it if needed.
Visual Studio Community is Free and includes all the functionality of Visual Studio Professional.
http://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

Resources