No matter how I install it - it does not work! :( Suppose:
<UserControl x:Class="CWServer.Views.MainView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:CWServer" xmlns:viewModels="clr-namespace:CWServer.ViewModels" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" DataContext="JobService"> <!-- CWServer.ViewModels.JobService --> <Grid> <TextBlock Text="{Binding Path=TestProperty}"/> </Grid> </UserControl> Nothing derives ...
Ahh, everything I found
<UserControl.DataContext> <viewModels:JobService/> </UserControl.DataContext> But why can't I use a shorter recording ???
DataContext="{x:Type viewModels:JobService}"