Get up to 80 % extra points for free! More info:

Lesson 21 - Audio/Video Player in C# and WPF - New Features

In the previous lesson, Audio/Video Player in C# and WPF - Appearance Customization, we improved the look of our WPF audio and video player. Today we're going to add new features that we'd expect from a typical player. Those are:

  • skip forward and backward
  • change the playback speed
  • change the volume

Let's start with a motivational picture of how the app will look after today's lesson:

Skipping and speed and volume change of video playback in C# .NET WPF

To implement these functions, we'll use other MediaElement properties such as: Position, SpeedRatio, and Volume. Next, we'll add a DispatcherTimer to display the current playback time and move the slider.

Note: As the form's design and code are already getting bigger, I'll no longer put the entire code here, but only samples of individual parts. You can download the entire code below as the attached app.

Skip backward and forward

We'll start with shifting the current playback position. We'll add buttons for forwarding and rewinding, and an indicator (Slider), which will show us the playback progress, and can also be used to shift the video. We'll also display the video's length, the current


...End of the preview...
Continue further

You will gain knowledge worth hundreds of thousands for a few crowns

You've come here and that's great! We believe that the first lessons showed you something new and useful
Do you want to continue the course? Go to the premium section.

Buy this course

Buy all currently available lessons with exercise submitting and other features for just $22.50
Current account balance $0
By buying this package, you'll have access to all 42 articles (39 lessons, 3 practical exercises) in this course.

Before buying this article, you have to buy the previous one

This article is licensed: Premium, by buying this article, you agree with the terms of use.

What will you get from us in the next lessons?
  • Unlimited and permanent access to individual lessons.
  • High quality IT knowledge.
  • Skills to help you get your dream and well-paid job.

Article description

Requested article covers this content:

In this C# .NET tutorial, we'll provide our WPF audio/video player with a function to skip the video and to change the playback speed and volume.

You gain credits by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.

Article has been written for you by Petr Pospisil