O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Ribbon control to display the video player controls

Until .NET 4.5, Ribbon control for WPF existed as a separate download. In Version 4.5 of .NET, Ribbon control and its corresponding child controls have been included as a part of the framework itself so that a separate download is not required. Ribbon and its child controls include RibbonButton, RibbonButtonGroup, RibbonTab, and so on.

In this recipe, we will modify the video player created in the last recipe so that the video control buttons are displayed using Ribbon control.

How to do it...

  1. Launch Visual Studio 2012. Open the solution named WpfMediaPlayer.
  2. Open MainWindow.xaml.
  3. Remove the Load, Play, Pause, and Stop buttons.
  4. Move MediaElement to the bottom. Once done, the UI will look as shown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required