title: Catel WPF UserControl can`t get value from dependency property
body: <p>i have custom usercontrol, which must change some boolean variable in window and get value from some binding. But when i try get at first time value it equal to default value - null. And when i do action it`s work good.</p>
  
  <pre><code>&lt;catel:UserControl x:Class="App.Shell.Controls.ToggleButton"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:catel="http://catel.codeplex.com"
                     xmlns:debug="clr-namespace:System.Diagnostics;assembly=System"&gt;
      &lt;!-- Content --&gt;
      &lt;Grid&gt;
          &lt;Grid.Resources&gt;
              &lt;Style TargetType="{x:Type Button}"&gt;
                  &lt;Setter Property="Width" Value="37" /&gt;
                  &lt;Setter Property="Template"&gt;
                      &lt;Setter.Value&gt;
                          &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                              &lt;Label
                                  Margin="0"
                                  Padding="0"
                                  HorizontalContentAlignment="Center"
                                  VerticalContentAlignment="Center"
                                  Background="#010000"
                                  Foreground="#FEFEFF"
                                  FontSize="12"&gt;
                                  &lt;ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /&gt;
                              &lt;/Label&gt;
                          &lt;/ControlTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
                  &lt;Style.Triggers&gt;
                      &lt;DataTrigger Binding="{Binding IsTurnedOn}" Value="True"&gt;
                          &lt;Setter Property="Content" Value="Turn off" /&gt;
                      &lt;/DataTrigger&gt;
                      &lt;DataTrigger Binding="{Binding IsTurnedOn}" Value="False"&gt;
                          &lt;Setter Property="Content" Value="Turn on" /&gt;
                      &lt;/DataTrigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/Grid.Resources&gt;
  
          &lt;Button&gt;
              &lt;Button.InputBindings&gt;
                  &lt;MouseBinding Command="{Binding ToggleCmd}" MouseAction="LeftDoubleClick" /&gt;
              &lt;/Button.InputBindings&gt;
          &lt;/Button&gt;
      &lt;/Grid&gt;
  &lt;/catel:UserControl&gt;
  </code></pre>
  
  <p>with catel viewmodel</p>
  
  <pre><code>namespace App.Shell.Controls
  {
      using Catel.Data;
      using Catel.MVVM;
      using System;
      using System.Windows.Input;
  
      /// &lt;summary&gt;
      /// UserControl view model.
      /// &lt;/summary&gt;
      public class ToggleButtonViewModel : ViewModelBase
      {
          /// &lt;summary&gt;
          /// Initializes a new instance of the &lt;see cref="ToggleButtonViewModel"/&gt; class.
          /// &lt;/summary&gt;
          public ToggleButtonViewModel()
          {
              ToggleCmd = new Command(OnToggleCmdExecute);
          }
  
          /// &lt;summary&gt;
          /// Gets the title of the view model.
          /// &lt;/summary&gt;
          /// &lt;value&gt;The title.&lt;/value&gt;
          public override string Title { get { return "ToggleButton"; } }
  
          public Command ToggleCmd { get; private set; }
          private void OnToggleCmdExecute()
          {
              IsTurnedOn = !IsTurnedOn;
          }
  
          public bool IsTurnedOn
          {
              get { return GetValue&lt;bool&gt;(IsTurnedOnProperty); }
              set { SetValue(IsTurnedOnProperty, value); }
          }
          public static readonly PropertyData IsTurnedOnProperty = RegisterProperty("IsTurnedOn", typeof(bool), setParent: false, createDefaultValue: null);
          // TODO: Register models with the vmpropmodel codesnippet
          // TODO: Register view model properties with the vmprop or vmpropviewmodeltomodel codesnippets
          // TODO: Register commands with the vmcommand or vmcommandwithcanexecute codesnippets
      }
  }
  </code></pre>
  
  <p>and code behind</p>
  
  <pre><code>namespace App.Shell.Controls
  {
  using Catel.Windows.Controls;
  using System.Windows;
  using System.Windows.Input;
  using Catel.MVVM.Views;
  using System;
  using Catel.MVVM;
  
  /// &lt;summary&gt;
  /// Interaction logic for ToggleButton.xaml.
  /// &lt;/summary&gt;
  public partial class ToggleButton : UserControl
  {
      /// &lt;summary&gt;
      /// Initializes a new instance of the &lt;see cref="ToggleButton"/&gt; class.
      /// &lt;/summary&gt;
      public ToggleButton()
      {
          InitializeComponent();
      }
  
      [ViewToViewModel(MappingType = ViewToViewModelMappingType.TwoWayViewWins)]
      public bool IsTurnedOn
      {
          get { return (bool)GetValue(IsTurnedOnProperty); }
          set { SetValue(IsTurnedOnProperty, value); }
      }
      public static readonly DependencyProperty IsTurnedOnProperty =
          DependencyProperty.Register("IsTurnedOn", typeof(bool), typeof(ToggleButton), new PropertyMetadata(null));
  }
  </code></pre>
  
  <p>}</p>
  
  <p>i insert that control to my catel window</p>
  
  <pre><code>&lt;ctrls:ToggleButton IsTurnedOn="{Binding Path=IndividualSpeechTimerState, Mode=TwoWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}" /&gt;
  </code></pre>
  
  <p>When i try get property IsTurnedOn from UserControl at first time it equal to default value. </p>