CommandPalettePreview.xaml
1 <?xml version="1.0" encoding="utf-8" ?> 2 <UserControl 3 x:Class="Microsoft.CmdPal.UI.Controls.CommandPalettePreview" 4 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 5 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 6 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 7 xmlns:h="using:Microsoft.CmdPal.UI.Helpers" 8 xmlns:local="using:Microsoft.CmdPal.UI.Controls" 9 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 10 mc:Ignorable="d"> 11 <Border 12 Width="200" 13 Height="120" 14 BorderBrush="{ThemeResource SurfaceStrokeColorDefaultBrush}" 15 BorderThickness="1" 16 CornerRadius="8" 17 Translation="0,0,8"> 18 <Grid> 19 <Border 20 HorizontalAlignment="Stretch" 21 VerticalAlignment="Stretch" 22 BorderBrush="{ThemeResource SurfaceStrokeColorDefaultBrush}" 23 BorderThickness="1" 24 Visibility="{x:Bind h:BindTransformers.NegateVisibility(ShowBackgroundImage), Mode=OneWay}"> 25 <Border.Background> 26 <AcrylicBrush 27 FallbackColor="{x:Bind PreviewBackgroundColor, Mode=OneWay}" 28 TintColor="{x:Bind PreviewBackgroundColor, Mode=OneWay}" 29 TintOpacity="{x:Bind PreviewBackgroundOpacity, Mode=OneWay}" /> 30 </Border.Background> 31 </Border> 32 <local:BlurImageControl 33 HorizontalAlignment="Stretch" 34 VerticalAlignment="Stretch" 35 BlurAmount="{x:Bind PreviewBackgroundImageBlurAmount, Mode=OneWay}" 36 ImageBrightness="{x:Bind PreviewBackgroundImageBrightness, Mode=OneWay}" 37 ImageSource="{x:Bind PreviewBackgroundImageSource, Mode=OneWay}" 38 ImageStretch="{x:Bind ToStretch(PreviewBackgroundImageFit), Mode=OneWay}" 39 IsHitTestVisible="False" 40 TintColor="{x:Bind PreviewBackgroundImageTint, Mode=OneWay}" 41 TintIntensity="{x:Bind ToTintIntensity(PreviewBackgroundImageTintIntensity), Mode=OneWay}" 42 Visibility="{x:Bind ShowBackgroundImage, Mode=OneWay}" /> 43 44 <Grid> 45 <Grid.RowDefinitions> 46 <RowDefinition Height="100" /> 47 <RowDefinition Height="20" /> 48 </Grid.RowDefinitions> 49 50 <Border 51 x:Name="ContentPreview" 52 Grid.Row="0" 53 Background="{ThemeResource LayerOnAcrylicPrimaryBackgroundBrush}"> 54 <Grid> 55 <Grid.RowDefinitions> 56 <RowDefinition Height="20" /> 57 <RowDefinition Height="*" /> 58 </Grid.RowDefinitions> 59 60 <Border BorderBrush="{ThemeResource CmdPal.TopBarBorderBrush}" BorderThickness="0,0,0,1" /> 61 </Grid> 62 63 </Border> 64 65 <Border 66 x:Name="CommandBarPreview" 67 Grid.Row="1" 68 Background="{ThemeResource LayerOnAcrylicSecondaryBackgroundBrush}" 69 BorderBrush="{ThemeResource CmdPal.CommandBarBorderBrush}" 70 BorderThickness="0,1,0,0" /> 71 </Grid> 72 73 </Grid> 74 </Border> 75 </UserControl>