Introduction

Before reading this article, please go through the following articles:

  1. Introduction to WPF
  2. Working and Implementation of Controls

In this article we will try to learn about the Content Controls category in WPF and its usage.

Content Controls

Content Controls are mainly parent containers to hold the content. It displays information to the user to be viewed but that generally won't be modified.

Before we start with content controls, the following aspects need to be clear:

1. Property: A Property specifies the object's appearance or behavior. For example, the IsEnabled property specifies whether the user can interact with a control or not.

2. Method: A Method is a routine that a control executes to perform something. For example Coa unt Method counts the number of items available for the object or control.

3. Event: An event is related when a control raises one to let your application know that something has happened. For example TextBox raises a TextChanged event whenever its text changes.

Code Snippet

<Button Name="btnAdd" Content="Add" Click="btnAdd_Click" />

A Button is added in the application having "btnAdd" as an id, Add as Content and "btnAdd_Click" is the event.

4. Content Controls WalkThrough

Summary

In this article, we discussed Container Controls and their implementation. In the upcoming article I will talk about Layout Controls.

Thanks for reading. Please provide your valuable inputs and suggestion.