XtraReports DocumentPreviewControl 更改框架背景颜色

XtraReports DocumentPreviewControl changes frame background color

我正在使用 XtraReports 的试用版。我的应用程序基于框架和材料设计对话框。我使用自定义强调色创建了几个页面。一切正常。但是,当我打开包含 DocumentPreviewControl 的对话框或页面并切换回其他页面时,我的页面背景变为白色。当我从页面中删除 DocumentPreviewControl 时一切正常。

有什么建议吗?

代码: ReportPage.xaml:

<StackPanel>
    <DockPanel Height="750" Background="#454545">
        <dxp:DocumentPreviewControl RequestDocumentCreation="True" DocumentSource="{Binding ReportDocument}" dx:ThemeManager.ThemeName="Office2013DarkGray"/>
    </DockPanel>
</StackPanel>

MainWindow.xaml:

<Frame Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" 
           Name="frame"
           Background="#FF454545"
           Margin="0,20,0,10"
           NavigationUIVisibility="Hidden">
            <Frame.Style>
                <Style TargetType="Frame">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsLogged}" Value="True">
                            <Setter Property="Source" Value="MainPage.xaml"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsLogged}" Value="False">
                            <Setter Property="Source" Value="NotLoggedPage.xaml"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Frame.Style>

出现此行为是因为 DevExpress 主题也会影响标准控件的样式。当控件注入可视化树时,默认的 Office2016White 主题将应用于所有元素。如果要禁用此行为,请在应用程序启动时将 ApplicationThemeHelper.UseLegacyDefaultTheme 属性 设置为 true:

public partial class App : Application {
    public App() {
         ApplicationThemeHelper.UseLegacyDefaultTheme = true;
    }
}