1k0n.WinUI.Extensions 1.0.0

dotnet add package 1k0n.WinUI.Extensions --version 1.0.0                
NuGet\Install-Package 1k0n.WinUI.Extensions -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="1k0n.WinUI.Extensions" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add 1k0n.WinUI.Extensions --version 1.0.0                
#r "nuget: 1k0n.WinUI.Extensions, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install 1k0n.WinUI.Extensions as a Cake Addin
#addin nuget:?package=1k0n.WinUI.Extensions&version=1.0.0

// Install 1k0n.WinUI.Extensions as a Cake Tool
#tool nuget:?package=1k0n.WinUI.Extensions&version=1.0.0                

1k0n.WinUI.Extensions

NuGet

Description

This library provides a set of extensions for WinUI 3.0.

BitmapSourceHelper class

This class provides a set of methods to dynamically create BitmapSource objects.

CreateBitmapSourceFromBytesAsync(byte[]? imageFileBytes)

This method creates a BitmapSource object from a byte array.

var bitmapSource = await BitmapSourceHelper.CreateBitmapSourceFromBytesAsync(bytes);

CreateBitmapSourceFromStreamAsync(Stream imageFileStream)

This method creates a BitmapSource object from a System.IO.Stream.

var bitmapSource = await BitmapSourceHelper.CreateBitmapSourceFromStreamAsync(stream);

MemoryStreamExtensions class

This class provides convience extensions for InMemoryRandomAccessStream.

CopyStreamAsync(this InMemoryRandomAccessStream memoryStream, ulong position, System.IO.Stream stream)

This method copies the content of a System.IO.Stream to an InMemoryRandomAccessStream.

using var memoryStream = new InMemoryRandomAccessStream();

await memoryStream.CopyStreamAsync(0, fileStream);

WriteBytesAsync(this InMemoryRandomAccessStream memoryStream, byte[]? bytes)

This method writes a byte array to an InMemoryRandomAccessStream.

await memoryStream.WriteBytesAsync(bytes);

ToRandomAccessStreamAsync()

This method creates an InMemoryRandomAccessStream from a System.IO.Stream.

using var memoryStream = await stream.ToRandomAccessStreamAsync();

1k0n.WinUI.Extensions is licensed under the MIT License.

copyright (c) 2023 John Meyer Jr.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Product Compatible and additional computed target framework versions.
.NET net6.0-windows10.0.19041 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 247 1/18/2023