window.xaml
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="440" Width="600" ResizeMode="CanResizeWithGrip" FontFamily="BIZ UDGothic, Global Monospace" FontSize="16" Title="Show-SpecialFolder" > <Grid> <DataGrid Name="dataGrid" AutoGenerateColumns="False" Margin="4" IsReadOnly="True" HeadersVisibility="None" SelectionMode="Single" > <DataGrid.Columns> <DataGridTextColumn Header="Data" MinWidth="800"> <DataGridTextColumn.Binding> <MultiBinding StringFormat="{}{0}
{1}"> <Binding Path="Name" /> <Binding Path="Path" /> </MultiBinding> </DataGridTextColumn.Binding> </DataGridTextColumn> </DataGrid.Columns> <DataGrid.ContextMenu> <ContextMenu> <MenuItem Header="_Open" Name="open" /> <MenuItem Header="_Open" Name="openEx"> <MenuItem Header="Open _here" Name="openAsInvoker" /> <MenuItem Header="Open here as _Administrator" Name="openAsAdmin" /> </MenuItem> <MenuItem Header="Path _as copy" Name="copyAsPath" /> <MenuItem Header="Power_Shell" Name="powershell" /> <MenuItem Header="Power_Shell" Name="powershellEx"> <MenuItem Header="Open _here" Name="powershellAsInvoker" /> <MenuItem Header="Open here as _Administrator" Name="powershellAsAdmin" /> </MenuItem> <MenuItem Header="Command _Prompt" Name="cmd" /> <MenuItem Header="Command _Prompt" Name="cmdEx"> <MenuItem Header="Open _here" Name="cmdAsInvoker" /> <MenuItem Header="Open here as _Administrator" Name="cmdAsAdmin" /> </MenuItem> <MenuItem Header="_Linux shell" Name="wsl" /> <MenuItem Header="_Linux shell" Name="wslEx"> <MenuItem Header="Open _here" Name="wslAsInvoker" /> <MenuItem Header="Open here as _Administrator" Name="wslAsAdmin" /> </MenuItem> <MenuItem Header="P_roperties" Name="properties"/> </ContextMenu> </DataGrid.ContextMenu> <DataGrid.CellStyle> <Style TargetType="DataGridCell"> <Setter Property="Padding" Value="3"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridCell}"> <Border Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" > <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </DataGrid.CellStyle> </DataGrid> </Grid> </Window> |