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"/>
| 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' |
| #Requires -Version 5 | |
| <# | |
| .SYNOPSIS | |
| Windows Software Licensing Management Tool | |
| .DESCRIPTION | |
| SLMGR PowerShell workshop/framework to explore Windows activation management. | |
| This is a ported slmgr.vbs script. | |
| .NOTES | |
| - Prerelease prototype |
| function Test-FileLock ([string]$Path, [int]$TimeOutMs, [int]$Count) { | |
| $timeout = $TimeOutMs | |
| if ($timeout -lt 0) {$timeout = 0} | |
| if ($Count -gt 0) {$Count--} else {$Count = 0} | |
| do { | |
| try { | |
| $OFile = [System.IO.FileInfo]::new($Path) | |
| $OStream = $OFile.Open([System.IO.FileMode]::Open, [System.IO.FileAccess]::ReadWrite, [System.IO.FileShare]::None) | |
| if ($OStream) {$OStream.Close()} | |
| return $false |