Home » .NET
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 »DataGridView Password Column
Windows Forms have a few column types for DataGridView including DataGridViewTextBoxColumn, DataGridViewCheckBoxColumn, DataGridViewComboBoxColumn, DataGridViewImageColumn, DataGridViewButtonColumn and DataGridViewLinkColumn. You can also create custom columns for DataGridView by deriving from DataGridViewColumn or any of mentioned classes and provide a new…
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 »Unit test a public method which relies on a protected method
Sometimes you need to write unit tests for a public method which is relying on some other protected methods. For example, lets say we have a business logic class which has a public GetGreatestId method, which returns the…
Read More »