RoughDraft.Format.ps1xml
<?xml version="1.0" encoding="utf-16"?>
<Configuration> <ViewDefinitions> <View> <Name>System.Windows.Media.FontFamily</Name> <ViewSelectedBy> <TypeName>System.Windows.Media.FontFamily</TypeName> </ViewSelectedBy> <CustomControl> <CustomEntries> <CustomEntry> <CustomItem> <Frame> <CustomItem> <ExpressionBinding> <ScriptBlock> if ($request -and $response) { $fileFound = Get-ChildItem -Path "$($_.Source).png" -ErrorAction SilentlyContinue if ($fileFound) { "<h3>$($_.SOurce)</h3><img src='data:image/png;base64,$([Convert]::ToBase64String([io.FILE]::ReadAllBytes($fileFound.FullName)))' />" } else { $_.Source } } else { $_.Source } </ScriptBlock> </ExpressionBinding> </CustomItem> </Frame> </CustomItem> </CustomEntry> </CustomEntries> </CustomControl> </View> </ViewDefinitions> </Configuration> |