Hi! I appreciate your time very high but this time I can't go without your help. Please don't consider me as lazy and slothful programmer but I've tryed to solve my problem for all day today and my efforts to solve it remain ineffectual. The matter is in the following: I've studied the Prism 6 application solution you give me as answer on my question at http://www.telerik.com/forums/can-i-use-telerik-styles-for-prism-window-%28wpf%29-and-prism-usercontrol-%28wpf%29-that-are-supplied-with-prism-template-pack-for-prism-6 and try to write similar application myself. But all that is achieved by me here is that the solution of this application is succsesfully built without errors and runs. But herewith the MainWindow of my application is not displayed on the computer screen! I attached the structure of my application solution in Teleril_Prism_Unity.PNG file.I use MS VS 2015 Professional (russified).
Below is App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
Below is Bootstrepper:
class FcBootstrapper : UnityBootstrapper
{
protected override DependencyObject CreateShell()
{
return Container.Resolve<MainWindow>();
}
protected override void InitializeShell()
{
((RadWindow)this.Shell).Show();
}
}
Below is App.XAML:
<Application x:Class="FlowmeterConfigurator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:FlowmeterConfigurator"
xmlns:views="clr-namespace:FlowmeterConfigurator.Views">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Below is App.XAML.CS:
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var bootstrapper = new FcBootstrapper();
bootstrapper.Run();
}
}
Below is MainWindow.XAML:
<telerik:RadWindow x:Class="FlowmeterConfigurator.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:prism="http://prismlibrary.com/"
xmlns:views="clr-namespace:FlowmeterConfigurator.Views"
prism:ViewModelLocator.AutoWireViewModel="True"
Header="{Binding Title}" Height="300" Width="300">
<Grid>
</Grid>
</telerik:RadWindow>
Below is MainWindow.XAML.CS:
public partial class MainWindow : RadWindow
{
public MainWindow()
{
InitializeComponent();
}
}
And below is MainWindowViewModel.CS
public class MainWindowViewModel : BindableBase
{
private string _title = "Prism Unity Application with Telerik";
public MainWindowViewModel()
{
}
public string Title
{
get { return _title; }
set { SetProperty(ref _title, value); }
}
}
I created this application as Telerik Empty Project and after added folders there. Then I added RadWindow in Views folder and named it MainWindow and then deleted MainWindow (which was WPF Window) created with the solution. And after it I aded Prism 6 for WPF library via NuGet. Please reply me (if this is possible of course) why MainWindow is not visualized when the application runs. I would be very much obliged to you.
Eugene.