Projektdateien hinzufügen.

This commit is contained in:
Kevin Krüger
2023-07-24 12:00:34 +02:00
parent 656751e10b
commit 0d00a90942
210 changed files with 45049 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
namespace VideoBrowser.Helpers
{
using System.Drawing;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
/// <summary>
/// Defines the <see cref="ImageHelper" />.
/// </summary>
public static class ImageHelper
{
#region Methods
/// <summary>
/// The ToImageSource.
/// </summary>
/// <param name="icon">The icon<see cref="Icon"/>.</param>
/// <returns>The <see cref="ImageSource"/>.</returns>
public static ImageSource ToImageSource(this Icon icon)
{
var imageSource = Imaging.CreateBitmapSourceFromHIcon(
icon.Handle,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
return imageSource;
}
#endregion Methods
}
}