Текст ошибки:
Возникает при использовании любых скинов 2007.Cannot find resource named 'office15ButtonMOBackground'. Resource names are case sensitive.
Ключевая проблема:
StiOptions.Wpf.CurrentTheme = StiOptions.Wpf.Themes.Office2007SilverTheme;
Смотрите файл-вложение.
Код: Выделить всё
<Window x:Class="WpfApp1.MainWindow"
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:wpfViewer="schemas-stimulsoft-com:wpf-viewer"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<wpfViewer:StiWpfViewerControl x:Name="ViewerControl"/>
</Grid>
</Window>
Код: Выделить всё
using System;
using System.Windows;
using Stimulsoft.Report;
namespace WpfApp1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
try
{
StiOptions.Wpf.CurrentTheme = StiOptions.Wpf.Themes.Office2007SilverTheme;
InitializeComponent();
}
catch (Exception e)
{
MessageBox.Show(e.Message);
throw;
}
}
}
}