Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
WPF - Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fsobolev committed Oct 6, 2023
1 parent 118f9e3 commit e2671cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Examples/WPF/Controls/MPVControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@

namespace Nickvision.MPVSharp.Examples.WPF.Controls;

/// <summary>
/// MPV WPF Control.
/// Embedded window is created and MPV window is connected to it (see <see cref="MPVHwndHost"/>).
/// </summary>
public partial class MPVControl : UserControl
{
private Client _client;
private MPVHwndHost _hwndHost;

/// <summary>
/// Constructs MPVControl
/// </summary>
public MPVControl()
{
InitializeComponent();
Expand All @@ -19,11 +26,18 @@ public MPVControl()
AddChild(_hwndHost);
}

/// <summary>
/// Loads and plays file from path or URL
/// </summary>
/// <param name="url">Path or URL</param>
public void Load(string url)
{
_client.LoadFile(url);
_client.SetProperty("pause", false);
}

/// <summary>
/// Toggles pause
/// </summary>
public void CyclePause() => _client.CyclePause();
}

0 comments on commit e2671cb

Please sign in to comment.