title: Object of type 'System.Windows.Data.Binding' cannot be converted to type 'System.String'
body: <p>I wonder if anyone can help. I have been banging my head against this problem for half a day now, I must be doing something wrong. I have a custom control with a number of dependency properties.</p>
  <pre class="lang-cs prettyprint-override"><code>    [TemplatePart(Name = InformationBubble.InformationBubbleTitlePart, Type = typeof(TextBlock))]
      [TemplatePart(Name = InformationBubble.InformationBubbleProductImagePart, Type=typeof(Image))]
  
      public class InformationBubble : Control 
      {
          #region Template Parts Name Constants
  
          /// &lt;summary&gt;
          /// Name constant for the Information Bubble Title Part
          /// &lt;/summary&gt;
          public const string InformationBubbleTitlePart = &quot;InformationBubbleTitleText&quot;;
  
          /// &lt;summary&gt;
          /// Name constant for the Information Bubble Product Image Part
          /// &lt;/summary&gt;
          public const string InformationBubbleProductImagePart = &quot;InformationBubbleProductImage&quot;;
  
          #endregion
  
          #region TemplateParts
  
          private TextBlock _Title;
  
          internal TextBlock Title
          {
              get { return _Title; }
              private set
              {
                  _Title = value;
  
                  if (_Title != null)
                  {
                      _Title.Text = this.ProductTitleText;       
                  }
              }
          }
  
          private Image _ProductImage;
  
          internal Image ProductImage
          {
              get { return _ProductImage; }
              private set
              {
                  _ProductImage = value;
  
                  if (_ProductImage != null)
                  {
                      _ProductImage.Source = this.ProductImageSource;
                  }
              }
          }
  
          #endregion
  
          #region Public String Product Title 
  
          // Dependency properties declaration
          public static readonly DependencyProperty ProductTitleProperty = DependencyProperty.Register(
              &quot;ProductTitle&quot;,
              typeof(string),
              typeof(InformationBubble),
              new PropertyMetadata(string.Empty, new PropertyChangedCallback(OnProductTitleChanged)));
  
          public static void OnProductTitleChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
          {
              InformationBubble iBubble = sender as InformationBubble;
  
              if (iBubble.Title != null)
              {
                  iBubble.Title.Text = e.NewValue as string;
              }
          }
  
          public string ProductTitleText
          {
              get { return GetValue(ProductTitleProperty) as string; }
              set { SetValue(ProductTitleProperty, value); }
          }
  
          #endregion
  
          #region Public Image Source Product Image
  
          public static readonly DependencyProperty ProductImageSourceProperty = DependencyProperty.Register(
              &quot;ProductImageSource&quot;,
              typeof(ImageSource),
              typeof(InformationBubble),
              new PropertyMetadata(null, new PropertyChangedCallback(OnProductImageSourceChanged)));
  
          public static void OnProductImageSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
          {
              InformationBubble iBubble = sender as InformationBubble;
  
              if (iBubble.ProductImage != null)
              {
                  iBubble.ProductImage.Source = e.NewValue as ImageSource;
              }
          }
  
          public ImageSource ProductImageSource
          {
              get { return GetValue(ProductImageSourceProperty) as ImageSource; }
              set { SetValue(ProductImageSourceProperty, value); }
          }
  
          #endregion
  
          public InformationBubble()
          {
               this.DefaultStyleKey = typeof(InformationBubble);
          }
  
          #region Overrides
  
          public override void OnApplyTemplate()
          {       
              base.OnApplyTemplate();
  
              Title = GetTemplateChild(InformationBubble.InformationBubbleTitlePart) as TextBlock;
              ProductImage = GetTemplateChild(InformationBubble.InformationBubbleProductImagePart) as Image;
          }
  
          #endregion
  
          #region Private Methods
  
          private void GoToState(string stateName, bool useTransitions)
          {
              VisualStateManager.GoToState(this, stateName, useTransitions);
          }
  
          #endregion
      }
  </code></pre>
  <p>Now if I use this control somewhere in my xaml it works if I do this:</p>
  <pre><code>&lt;controls:InformationBubble 
          ProductImageSource=&quot;{Binding SelectedItem.NormalImageSource}&quot;
          ProductTitleText=&quot;Test Title&quot;
          &quot;/&gt;
  </code></pre>
  <p>But if I try and data bind the product title text to the title property of the SelectedItem object in my ViewModel:</p>
  <pre><code>&lt;controls:InformationBubble 
              ProductImageSource=&quot;{Binding SelectedItem.NormalImageSource}&quot;
              ProductTitleText=&quot;{Binding SelectedItem.Title, Mode=TwoWay&quot;
              &quot;/&gt;
  </code></pre>
  <p>I get Object of type 'System.Windows.Data.Binding' cannot be converted to type 'System.String'. The text property of a TextBlock is a DependencyProperty so I must be missing something obvious here.</p>