Obie  Stracke

Obie Stracke

1624584521

What's new in Windows Forms in .NET 6.0 Preview 5

In this post we are going to talk about what’s new in Windows Forms runtime in .NET 6.0 Preview 5.

Application-wide default font

.NET Framework and Windows Forms were designed and built in a completely different world from today – back when CRT monitors still largely maxed out at 1024×768, and “Microsoft Sans Serif” was the default font on Windows.

However, nothing is ever set in stone, and even fundamental properties like default font change once in a while. Windows Vista received a fair share of UI updates, including the default font, which was changed to Segoe UI. But this wasn’t something that could be changed in .NET Framework, and it continued using Microsoft Sans Serif as the default font.

Fast forward to 2018 and .NET Core 3.0, where we were finally able to start modernizing Windows Forms. We changed the font to Segoe UI in dotnet/winforms#656, and quickly learned that a great number of things depended on this default font metrics. For example, the designer was no longer a true WYSIWYG, because Visual Studio process is run under .NET Framework 4.7.2 and uses the old default font, whereas a .NET application at runtime uses the new font. (Before you ask, we are working on a feature that will address this discrepancy.)

#windows forms #winforms #dotnet #dotnet core #dotnet 6 preview

What is GEEK

Buddha Community

What's new in Windows Forms in .NET 6.0 Preview 5
Einar  Hintz

Einar Hintz

1602560783

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
{
    [Key]
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    [MaxLength(11)]
    public string SWIFTCode { get; set; }

    [DisplayName("Amount")]
    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }
}

C#Copy

Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

Obie  Stracke

Obie Stracke

1624584521

What's new in Windows Forms in .NET 6.0 Preview 5

In this post we are going to talk about what’s new in Windows Forms runtime in .NET 6.0 Preview 5.

Application-wide default font

.NET Framework and Windows Forms were designed and built in a completely different world from today – back when CRT monitors still largely maxed out at 1024×768, and “Microsoft Sans Serif” was the default font on Windows.

However, nothing is ever set in stone, and even fundamental properties like default font change once in a while. Windows Vista received a fair share of UI updates, including the default font, which was changed to Segoe UI. But this wasn’t something that could be changed in .NET Framework, and it continued using Microsoft Sans Serif as the default font.

Fast forward to 2018 and .NET Core 3.0, where we were finally able to start modernizing Windows Forms. We changed the font to Segoe UI in dotnet/winforms#656, and quickly learned that a great number of things depended on this default font metrics. For example, the designer was no longer a true WYSIWYG, because Visual Studio process is run under .NET Framework 4.7.2 and uses the old default font, whereas a .NET application at runtime uses the new font. (Before you ask, we are working on a feature that will address this discrepancy.)

#windows forms #winforms #dotnet #dotnet core #dotnet 6 preview

Steve  Kunde

Steve Kunde

1592723737

TWC9: .NET 5.0 Preview 5,Windows Terminal 1.1 Preview,WSL GPU Support

After a brief hiatus, Christina is back with the latest developer news, including: 1:12 - Microsoft Build Book of News 2020 https://news.microsoft.com/build-

#twc9 #.net 5.0 #preview #windows terminal #wsl gpu support #programming

Shayne  Bayer

Shayne Bayer

1592389602

Announcing .NET 5 Preview 4 and our journey to one .NET | .NET Blog

.NET 5 is the next version and future of .NET. We are continuing the journey of unifying the .NET platform, with a single framework that extends from cloud to desktop to mobile and beyond. Looking back, we took the best of .NET Framework and put that into .NET Core 3,

#.net #.net 5 preview 4 #preview #.net blog #programming

Using Windows Forms DataGridView in .NET Core 3.1

How to use Windows Forms DataGridView on .NET Core.

#.net #windows #windows forms datagridview #.net core 3.1 #.net core #programming