mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-24 00:48:00 +08:00
4177708e49
## Summary of the Pull Request This PR enables user to preview PDF files in the Explorer preview pane and in Outlook. **What is this about:** Windows does not support out of the box experience for previewing PDF files in the preview pane. Users need to install third-party software like Adobe Acrobat reader. The PdfPreviewHandler module enbales the user to preview PDF files. **How does someone test / validate:** Run the installer, open Explorer and select a PDF file, enable the preview pane. Maybe need to remove third-party PDF software. ## Quality Checklist - [X] **Linked issue:** #3548 - [ ] **Communication:** I've discussed this with core contributors in the issue. - [X] **Tests:** Added/updated and all pass - [X] **Installer:** Added/updated and all pass - [X] **Localization:** All end user facing strings can be localized - [ ] **Docs:** Added/ updated - [x] **Binaries:** Any new files are added to WXS / YML - [ ] No new binaries - [x] YML for signing - [x] WXS for installer
79 lines
4.4 KiB
XML
79 lines
4.4 KiB
XML
<Page
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerPreviewPage"
|
|
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"
|
|
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
|
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
mc:Ignorable="d"
|
|
AutomationProperties.LandmarkType="Main">
|
|
|
|
<Page.Resources>
|
|
<converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Collapsed" FalseValue="Visible"/>
|
|
</Page.Resources>
|
|
|
|
<controls:SettingsPageControl x:Uid="FileExplorerPreview"
|
|
ModuleImageSource="ms-appx:///Assets/Modules/PowerPreview.png">
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<muxc:InfoBar Severity="Warning"
|
|
x:Uid="FileExplorerPreview_RunAsAdminRequired"
|
|
IsOpen="True"
|
|
IsClosable="False"
|
|
Visibility="{Binding Mode=OneWay, Path=IsElevated, Converter={StaticResource BoolToVisibilityConverter}}" />
|
|
|
|
<muxc:InfoBar Severity="Informational"
|
|
x:Uid="FileExplorerPreview_AffectsAllUsers"
|
|
IsOpen="True"
|
|
IsClosable="False"
|
|
/>
|
|
|
|
<controls:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane_GroupSettings">
|
|
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG" Icon="">
|
|
<controls:Setting.ActionContent>
|
|
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGRenderIsEnabled}"
|
|
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"/>
|
|
</controls:Setting.ActionContent>
|
|
</controls:Setting>
|
|
|
|
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_Preview_MD" Icon="">
|
|
<controls:Setting.ActionContent>
|
|
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MDRenderIsEnabled}"
|
|
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"/>
|
|
</controls:Setting.ActionContent>
|
|
</controls:Setting>
|
|
|
|
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_Preview_PDF" Icon="">
|
|
<controls:Setting.ActionContent>
|
|
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.PDFRenderIsEnabled}"
|
|
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"/>
|
|
</controls:Setting.ActionContent>
|
|
</controls:Setting>
|
|
</controls:SettingsGroup>
|
|
|
|
<controls:SettingsGroup x:Uid="FileExplorerPreview_IconThumbnail_GroupSettings">
|
|
<muxc:InfoBar Severity="Informational"
|
|
x:Uid="FileExplorerPreview_RebootRequired"
|
|
IsOpen="True"
|
|
IsClosable="False"
|
|
/>
|
|
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_SVG_Thumbnail" Icon="">
|
|
<controls:Setting.ActionContent>
|
|
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGThumbnailIsEnabled}"
|
|
IsEnabled="{Binding Mode=OneWay, Path=IsElevated}"/>
|
|
</controls:Setting.ActionContent>
|
|
</controls:Setting>
|
|
</controls:SettingsGroup>
|
|
|
|
</StackPanel>
|
|
</controls:SettingsPageControl.ModuleContent>
|
|
|
|
<controls:SettingsPageControl.PrimaryLinks>
|
|
<controls:PageLink x:Uid="LearnMore_PowerPreview" Link="https://aka.ms/PowerToysOverview_FileExplorerAddOns"/>
|
|
</controls:SettingsPageControl.PrimaryLinks>
|
|
</controls:SettingsPageControl>
|
|
</Page> |