Here's my setup:
I have an application view leveraging a caliburn bootstrapper (should be irrelevant for the issue):
<Application x:Class="TestApp.App" xmlns:local="clr-namespace:TestApp" xmlns:shell="clr-namespace:TestApp.Shell" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary> <local:Bootstrapper x:Key="Bootstrapper" /> </ResourceDictionary> <telerik:FluentResourceDictionary /> <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/System.Windows.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/telerik.windows.controls.input.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Navigation.xaml" /> </ResourceDictionary.MergedDictionaries> <Style TargetType="shell:ShellView" BasedOn="{StaticResource RadWindowStyle}" /> </ResourceDictionary> </Application.Resources></Application>Here's my application's shell view:
<telerik:RadWindow x:Class="TestApp.Shell.ShellView" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:testApp="clr-namespace:TestApp.Shell" Width="800" Height="475" Header="Application title"> <Grid> </Grid></telerik:RadWindow>
Note in the above code the Header="Application title". When I start that application, it shows the window shown in the attachment, i.e. a window with title "TestApp.Shell.ShellViewModel". If I, however, refactor that with the following binding
Header="{Binding Header}"
and add the Header property to my view model
using Caliburn.Micro;namespace TestApp.Shell{ public class ShellViewModel : Conductor<IScreen> { public string Header => "Application title"; }}
then I see the correct application title.
Why can't I just hard-code my application title in my Window's xaml code? What am I doing wrong here?
