Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com
81. What is Property-based Animation in WPF?
WPF introduces a property-based animation techniques to make animations in WPF easy.
It simply modify the value of control property over an interval of time and the target property must be a dependency property.
82. How many types of Animation support by WPF?
There are baiscally three types of Animation classes.
In C#, there are there ways for converting string to int. Each way has its own advantages and disadvantages. These ways are:
int.TryParse method (Best way)
int.Parse method converts string input into integer. It takes the string input and returns int as output.
static void Main(...
ConcurrentDictionary is one of five collection classes introduced in .NET 4.0. It exists in System.Collections.Concurrent namespace. ConcurrentDictionary is thread-safe collection class to store key/value pairs. ConcurrentDictionary can be used with multiple threads concurrently.
Without ConcurrentDictionary class, if we have to use Dictionary class with mult...
C# ConcurrentQueue is a thread-safe collection class. It is introduced in .NET 4.0 with other concurrent collection classes. It provides a thread-safe First-In-First-Out (FIFO) data structure. You can read more about Queue here. ConcurrentQueue exists in System.Collections.Concurrent namespace
ConcurrentQueue is a wrapper around generic Queue class. Queue...
ConcurrentStack is a thread-safe generic collection class introduced in .NET 4.0 framework. It provides a Last-In-First-Out (LIFO) data structure. You can read more about Stack here.
ConcurrentStack is like wrapper around Stack class. Stack class is not thread-safe. ConcurrentStack provides thread-safety. It internally uses locking to synchronize different threads.
ConcurrentBag is one of the thread-safe collection classes introduced in .NET 4.0. ConcurrentBag allows you to store objects in unordered way. Contrary to ConcurrentDictionary class, it allows you to store duplicate objects.
ConcurrentBag allows multiple threads to store the objects. It is optimized for scenarios where same thread act as producer and consumer. That means sam...
BlockingCollection is a collection class which ensures thread-safety. Multiple threads can add and remove objects in BlockingCollection concurrently.
It implements the producer-consumer pattern. In this pattern, there are two threads one is called producer and other is called consumer. Both threads share a common collection class to exchange data between them. BlockingC...
Many readers ask me a question regarding how we can add a tooltip for each item of ComboBox in WPF. Here I am presenting a very simple solution.
In the below example, I am creating a simple combobox. ComboBox DataTemplate defines a ListBoxItem for each item in combobox. ListBoxItem has both Content and Tooltip property. As we cannot use String.Format in Tooltip bi...
A delegate in C# represents a reference type that encapsulates a method. When we declare a delegate type we specify some parameters and a return type. We can only store those methods in delegates which has same parameters and same return type. Microsoft introduced some pre-built delegates so that we don't have to declare delegates every time. Action is one of the pre-b...
Predicate is a pre-built delegate in the .NET framework class library. Delegates are used to store method which has same parameters and return types as specify in the delegate type. Predicate is a generic delegate. It takes one parameter and returns a boolean value.
Predicate delegate is used for check whether a parameter meets specify condition or not.