Tag: .NET

Use COM type libraries in .NET CORE Windows Forms Project

In this post I’ll show how you can use COM type libraries in a .NET Core Windows Forms project. Sometimes you need to add a reference to a COM type library, for example, let’s say you want to…

Read More »

Customize ASP.NET MVC Model Metadata

Using ASP.NET MVC, sometimes you want to customize metadata for model. For example you want to read display name from an XML file, or you want to set some additional metadata for example for rendering. In this post,…

Read More »

Add Property to ASP.NET Identity Role

In previous post, I showed you how to add property to Identity user. Another common requirement when using ASP.NET Identity is adding new property to IdentityRole. In this post I’ll share a step by step guide which is…

Read More »

Add Property to ASP.NET Identity User

One of the common requirements when using ASP.NET Identity, is adding new properties to the User entity. For example let’s say, we want to add a Code property to IdentityUser entity to store personnel code for the user….

Read More »

Print RDLC Report without Preview

Sometimes you have a report which you want to print without showing a preview in ReportViewer. You can print an RDLC report programmatically using LocalReport object and CreateStreamCallback callback function. There is an article in MSDN which describes…

Read More »

How to edit a List<string> in PropertyGrid

When you define a property of List<string> type for a control, if you try to edit the property in PropertyGrid, a collection editor form will open and if you click on add button on the editor form, you…

Read More »

How to add item to Windows shell context menu to open your application

Sometimes when installing applications, you want to add an entry to the windows shell context menu to open your application and pass the selected file or folder name to your application. In this post I’ll show how to…

Read More »

Enable designer of child Panel in a UserControl

Sometimes you want to create a composite user control and allow users to interact with the user control at designer when they drop an instance of your user control on a form. For example, let’s say we are…

Read More »

DataAnnotations Validation Attributes in Windows Forms

In this post, I’ll show how to use Data Annotation Validation attributes to perform validation in a Windows Forms Application. Data Annotation Validation attributes enable you to perform model validation simply by decorating class properties with validation attributes…

Read More »

How to get value of advanced power settings

Some times you may need to get value of advanced power settings in your application. For example you may want to know after how much idle time, the system will hibernate of sleep. Here in this post I’ll…

Read More »