Create a new project, Add a new item and then select user control

Adding User Control

Then go to MyUserControl1.xaml and add textblock and image from toolbox.

User Control

Now we want to give the control to the user using our custom control so he/she can change text and image. For that go to MyUserControl1.xaml.cs and add a dependency property of type as of the 'text' property of textblock i.e string. In this case set metadata to 'null'.

Dependency Property

Do the same for source of the image of the type 'ImageSource'

Dependency Property

Now bind the respected properties with our dependency properties so they can be changed by the user

Data Binding

Data Binding

Now we can use our created custom control anywhere we like. And can change the text or image source to add any image

Using Custom Control

Like this we can give the desired control over our custom control to the user by binding them with our created dependency properties.

Source Code: https://github.com/umerqureshi93/CustomControl

Create a new project, Add a new item and then select user control

Adding User Control

Then go to MyUserControl1.xaml and add textblock and image from toolbox.

User Control

Now we want to give the control to the user using our custom control so he/she can change text and image. For that go to MyUserControl1.xaml.cs and add a dependency property of type as of the 'text' property of textblock i.e string. In this case set metadata to 'null'.

Dependency Property

Do the same for source of the image of the type 'ImageSource'

Dependency Property

Now bind the respected properties with our dependency properties so they can be changed by the user

Data Binding

Data Binding

Now we can use our created custom control anywhere we like. And can change the text or image source to add any image

Using Custom Control

Like this we can give the desired control over our custom control to the user by binding them with our created dependency properties.

Create a new project, Add a new item and then select user control

Adding User Control

Then go to MyUserControl1.xaml and add textblock and image from toolbox.

User Control

Now we want to give the control to the user using our custom control so he/she can change text and image. For that go to MyUserControl1.xaml.cs and add a dependency property of type as of the 'text' property of textblock i.e string. In this case set metadata to 'null'.

Dependency Property

Do the same for source of the image of the type 'ImageSource'

Dependency Property

Now bind the respected properties with our dependency properties so they can be changed by the user

Data Binding

Data Binding

Now we can use our created custom control anywhere we like. And can change the text or image source to add any image

Using Custom Control

Like this we can give the desired control over our custom control to the user by binding them with our created dependency properties.

Create a new project, Add a new item and then select user control

Adding User Control

Then go to MyUserControl1.xaml and add textblock and image from toolbox.

User Control

Now we want to give the control to the user using our custom control so he/she can change text and image. For that go to MyUserControl1.xaml.cs and add a dependency property of type as of the 'text' property of textblock i.e string. In this case set metadata to 'null'.

Dependency Property

Do the same for source of the image of the type 'ImageSource'

Dependency Property

Now bind the respected properties with our dependency properties so they can be changed by the user

Data Binding

Data Binding

Now we can use our created custom control anywhere we like. And can change the text or image source to add any image

Using Custom Control

Like this we can give the desired control over our custom control to the user by binding them with our created dependency properties.