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"/>
| 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 |
| 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'"} |
| 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; |
| using System.Diagnostics; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| using System.Security.Cryptography; | |
| using System.Text.RegularExpressions; | |
| namespace Encryption | |
| { | |
| public class Encryption //: IDisposable | |
| { |
| <# | |
| .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 |
| <# | |
| .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 |
| #Requires -Version 5 | |
| # Insipred by and credits to PS2EXE by Markus Scholts (https://github.com/MScholtes/PS2EXE) | |
| # Deeply refactored original code replacing outdated techniques and overloaded logics with modern look and feel. Full backward compatibility provided. | |
| # Source compressor added to significantly reduce output size. Source encoding, the return of the king. Experimental support for PowerShell Core introduced. | |
| <# TODO: | |
| - remove "extract" facility (from C#) | |
| #> |
| function Compare-Array { | |
| [CmdletBinding()] | |
| [alias('Compare-Object2','Compare-ObjectFast')] | |
| param ( | |
| [Parameter(Position=0)] | |
| [psobject[]] $ReferenceObject, | |
| [Parameter(Position=1)] | |
| [psobject[]] $DifferenceObject, | |
| [switch] $IncludeEqual, | |
| [switch] $ExcludeDifferent |
| <# | |
| Virtual multifunction via single function without additional parameters | |
| Get-FolderItem - list files | |
| Remove-FolderItem - delete files | |
| Copy-FolderItem - copy files | |
| Move-FolderItem - move files | |
| #> | |
| function Get-FolderItem { | |
| [cmdletbinding(DefaultParameterSetName='Filter')] | |
| [alias('Remove-FolderItem','Copy-FolderItem','Move-FolderItem')] #,'rfi','cfi','mfi','gfi' |