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:
To implement these functions, we'll use other
properties such as:
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...
ict.social is a large database made up of manuals and tutorials, whose main goal is to provide high-quality IT education to everyone. We started out in the Czech republic, where we display roughly a million articles per month and receive plenty of gratitude from our users. Thanks to our successful establishment, we are now bringing these articles to the rest of the world.
Although we are trying to keep our content free of charge, maintaining the site is a huge effort for everyone involved. Therefore, some content (exercises and more advanced material) costs network points. Don't worry, they're really cheap :)
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.
Buying this article gives you unlimited access to it forever. You will learn some more and help us keep giving our site maintenance which helps you and others get better futures. It's a win-win.
You gain points 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.
You can get points immediately using:
|Credit card||SMS||Wire transfer|