NavigateUri is placed in DataContext property.
<!-- work around for buggy Hyperlink -->
<Style x:Key="HyperLink" TargetType="{x:Type Underline}">
<Setter Property="Foreground" Value="Blue"/>
<Setter Property="FontStyle" Value="Italic"/>
| <# | |
| .SYNOPSIS | |
| Removes comments and extra white space from an input PS script. | |
| .DESCRIPTION | |
| The filters omit white space and indented formatting in the output. Filters are comments, newlines, spaces, statement separator (;). | |
| .PARAMETER Path | |
| Specifies the path to the PS file to compress. | |
| .PARAMETER ScriptBlock | |
| Specifies the PowerShell scriptblock to compress. | |
| .PARAMETER NoTest |
| <# | |
| .SYNOPSIS | |
| Encrypt/decript strings. | |
| .DESCRIPTION | |
| AIO encryption dotsource mini-module. | |
| The module supports AES and DPAPI encryption methods. | |
| .FUNCTIONALITY | |
| Encryption method: Protect-String | |
| Decryption method: UnProtect-String | |
| Data method: Get-CipherData |
| using System.Diagnostics; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| using System.Security.Cryptography; | |
| using System.Text.RegularExpressions; | |
| namespace Encryption | |
| { | |
| public class Encryption //: IDisposable | |
| { |
| using Microsoft.CSharp; | |
| using System; | |
| using System.CodeDom.Compiler; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.Diagnostics; | |
| using System.Globalization; | |
| using System.IO; | |
| using System.IO.Compression; |
| function Convert-BoundParameters ([hashtable]$parameters) { | |
| if (-not $parameters.count) {return} | |
| $params = [System.Text.StringBuilder]::new() | |
| $null = $parameters.GetEnumerator().foreach{ | |
| $key,$val = $_.Key,$_.Value | |
| if ($val -is [System.Management.Automation.SwitchParameter]) { | |
| if ($val.IsPresent) {$params.Append(" -$key")} | |
| } | |
| elseif ($val -is [string]) { | |
| if ($val.contains(' ') -or [string]::IsNullOrEmpty($val)) {$val = "'$val'"} |
| class PngIconConverter { | |
| static [bool] Convert([System.IO.Stream]$input_stream, [System.IO.Stream]$output_stream, [int]$size, [bool]$keep_aspect_ratio) { | |
| $input_bit = [System.Drawing.Bitmap]::FromStream($input_stream) | |
| if ($input_bit -eq $null) {return $false} | |
| if ($size -lt 1) {$size = 32} | |
| if ($keep_aspect_ratio) { | |
| $width = $size | |
| $height = $input_bit.Height / $input_bit.Width * $size | |
| } else { | |
| $width = $height = $size |
| <# | |
| .SYNOPSIS | |
| An AIO function to export icons stored within .DLL and .EXE files. | |
| .DESCRIPTION | |
| Export-Icon can export icons of all sizes, and all color formats to a number of formats, including bmp, png, jpg, gif, emf, exif, icon, tiff, heif, and webp. In addition, it can also export to a different size. All sizes are native, no scaling, except custom sizes. | |
| This function quickly exports *all* icons stored within the resource file. | |
| Export-Icon is independent on .NET version. It uses a custom icon extractor engine because Windows PowerShell doesn't have [System.Drawing.Icon]::ExtractIcon method (https://learn.microsoft.com/en-us/dotnet/api/system.drawing.icon?view=netframework-4.8.1). In addition, PowerShell 7.6+ [System.Drawing.Icon]::ExtractIcon method has a limited capability. Besides, neither ExtractIcon* functions from user32.dll have a parameter associated with size. | |
| .PARAMETER Path | |
| Mandatory. Position is 0. Specifies a filepath to the resource. | |
| .PARAMETER Output |
| <# | |
| .SYNOPSIS | |
| SVG to Windows ICO converter. | |
| .DESCRIPTION | |
| The script uses Inkscape app to convert SVG to PNG and then ensembles PNGs to a single ICO using .NET. | |
| Key features: | |
| - Multisize ICO | |
| - Just one Inkscape instance per multiple size conversions, i.e. a conversion time is independent on amount of sizes | |
| - Control over SVG exported area | |
| - Ability to replace colors in SVG |
| /* | |
| SYNOPSIS : Icon Reader for C# | |
| DESCRIPTION : A utility class that extracts the list of all icons handles (all sizes, all color counts) for a binary file like DLL, EXE, or ICO | |
| UTILITIES : GetTotal, ImportIcons, ExportIcons, Dispose | |
| FEATURES : Export: by size and index, multisize icons, split icon groups by size | |
| VERSION : 4.0 | |
| LASTUPDATE : 2026-Sep-5 | |
| LINK : https://en.wikipedia.org/wiki/ICO_(file_format) | |
| NOTES : Only builtin sizes are exported; GIF,BMP,JPEG always have the background in black | |
| BACKLOG : |