Resources/XAML/FileReputation.xaml
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" FontSize="16" Style="{StaticResource Page_Style}"> <ScrollViewer> <Grid x:Name="ParentGrid"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="Use this page to assess a file's reputation with Microsoft Defender's built-in capabilities, powered by the Intelligent Security Graph. If Smart App Control is enabled or set to Evaluation mode, the results will be provided by Smart App Control. Otherwise, reputation verdicts from SmartScreen will be displayed. Administrator privileges are not required." Foreground="Black" FontSize="14" Margin="20,10,20,15" FontWeight="Normal" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"/> <Button x:Name="BrowseForFileButton" Style="{StaticResource CustomButtonStyle2}" ToolTipService.InitialShowDelay="1000" Margin="15" Grid.Row="1" ToolTip="Browse for a file to verify its reputation"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock Text="Browse For a File" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="8,0,8,0" FontWeight="SemiBold"/> </StackPanel> </Button> <StackPanel Orientation="Vertical" Grid.Row="2" Margin="0,0,0,15"> <StackPanel Orientation="Vertical"> <Label Content="File Reputation" Margin="10"/> <TextBox IsReadOnly="True" x:Name="FileReputationTextBlock" Margin="30,0,30,0" BorderThickness="0" ToolTip="The final verdict"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="10,0,10,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Style.Triggers> <!-- Trigger to apply blur when the TextBox is disabled --> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="5"/> </Setter.Value> </Setter> <!-- Reducing the opacity to further indicate that the TextBox is disabled --> <Setter Property="Opacity" Value="0.7"/> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> </StackPanel> <StackPanel Orientation="Vertical"> <Label Content="Reputation Source" Margin="10"/> <TextBox IsReadOnly="True" x:Name="ReputationSourceTextBlock" Margin="30,0,30,0" BorderThickness="0" ToolTip="Whether it's from Smart App Control or Smart Screen"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="10,0,10,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Style.Triggers> <!-- Trigger to apply blur when the TextBox is disabled --> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="5"/> </Setter.Value> </Setter> <!-- Reducing the opacity to further indicate that the TextBox is disabled --> <Setter Property="Opacity" Value="0.7"/> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> </StackPanel> <StackPanel Orientation="Vertical"> <Label Content="Validity Duration" Margin="10"/> <TextBox IsReadOnly="True" x:Name="ValidityDurationTextBlock" Margin="30,0,30,0" BorderThickness="0" ToolTip="The validity duration, something Microsoft Defender returns."> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="10,0,10,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Style.Triggers> <!-- Trigger to apply blur when the TextBox is disabled --> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="5"/> </Setter.Value> </Setter> <!-- Reducing the opacity to further indicate that the TextBox is disabled --> <Setter Property="Opacity" Value="0.7"/> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> </StackPanel> <StackPanel Orientation="Vertical"> <Label Content="File Handle" Margin="10"/> <TextBox IsReadOnly="True" x:Name="FileHandleTextBlock" Margin="30,0,30,0" BorderThickness="0" ToolTip="The selected File Handle"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="10,0,10,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Style.Triggers> <!-- Trigger to apply blur when the TextBox is disabled --> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="5"/> </Setter.Value> </Setter> <!-- Reducing the opacity to further indicate that the TextBox is disabled --> <Setter Property="Opacity" Value="0.7"/> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> </StackPanel> <StackPanel Orientation="Vertical"> <Label Content="File Path" Margin="10"/> <TextBox IsReadOnly="True" x:Name="FilePathTextBlock" Margin="30,0,30,0" BorderThickness="0" ToolTip="The selected File Path"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="10,0,10,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Style.Triggers> <!-- Trigger to apply blur when the TextBox is disabled --> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="5"/> </Setter.Value> </Setter> <!-- Reducing the opacity to further indicate that the TextBox is disabled --> <Setter Property="Opacity" Value="0.7"/> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> </StackPanel> </StackPanel> </Grid> </ScrollViewer> </UserControl> |