title: How to bind a value to user control property?
body: <p>Now on,I just got <code>AG_E_PARSER_BAD_PROPERTY_VALUE</code>.I think this is because I didn't do any thing to my bind property.Is there any thing I　can do?</p>
  
  <pre><code>                    &lt;ListBox.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;StackPanel Orientation="Horizontal"&gt;
                                  &lt;Image Name="imgSvrIco" Source="{Binding pic}"/&gt;
                                  &lt;StackPanel Orientation="Vertical" Margin="2,2,2,10" Tag="{Binding tag}" MouseLeftButtonUp="StackPanel_MouseLeftButtonUp_1"&gt;
                                      &lt;TextBlock Name="lbTitle"  Text="{Binding title}" Margin="0,0,0,0" FontWeight="Bold" /&gt;
                                      &lt;TextBlock Text="{Binding text}" Visibility="{Binding textVisibility}"/&gt;
                                      &lt;StackPanel Orientation="Horizontal"&gt;
                                          &lt;TextBlock Text="{Binding time}"/&gt;
                                          &lt;TextBlock Text=" By " /&gt;
                                          &lt;!--&lt;my:UserBrand Address="{Binding address}" /&gt;--&gt;
                                      &lt;/StackPanel&gt;
                                  &lt;/StackPanel&gt;
                              &lt;/StackPanel&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
  </code></pre>
  
  <p>The commented code is the user control</p>
  
  <pre><code>   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
     at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
     at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
     at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single&amp; outWidth, Single&amp; outHeight)
     at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
     at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
     at System.Windows.UIElement.Measure(Size availableSize)
     at System.Windows.Controls.VirtualizingStackPanel.MeasureChild(UIElement child, Size layoutSlotSize)
     at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
     at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single&amp; outWidth, Single&amp; outHeight)
     at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single&amp; outWidth, Single&amp; outHeight)
     at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
     at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
     at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single&amp; outWidth, Single&amp; outHeight)
  </code></pre>
  
  <p>The control xaml</p>
  
  <pre><code>&lt;UserControl x:Class="Shisoft_Express_Communicate_mobile.controls.UserBrand"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d"
      FontFamily="{StaticResource PhoneFontFamilyNormal}"
      FontSize="{StaticResource PhoneFontSizeNormal}"
      Foreground="{StaticResource PhoneForegroundBrush}"
      d:DesignHeight="34" d:DesignWidth="395"&gt;
          &lt;StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Stretch" Orientation="Horizontal" Margin="0,0,0,-1"&gt;
              &lt;Image Name="image1" Stretch="Uniform" Width="32" Height="32" VerticalAlignment="Center" /&gt;
              &lt;TextBlock Name="textBlock1" Text="TextBlock" TextWrapping="NoWrap" Margin="3,0,0,0" /&gt;
          &lt;/StackPanel&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>the control cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Animation;
  using System.Windows.Shapes;
  using System.Text.RegularExpressions;
  using Shisoft_Express_Communicate_mobile.userinfos;
  using System.Windows.Media.Imaging;
  
  namespace Shisoft_Express_Communicate_mobile.controls
  {
      public partial class UserBrand : UserControl
      {
          public UserBrand()
          {
              InitializeComponent();
          }
          private String _address;
          public String address
          {
              get { return _address; }
              set
              {
                  _address = value;
                  //sinat:shisoftgenius@hot...shisofttester:::shisoft
                  String[] strs = Regex.Split(_address, ":::");
                  String imgCode;
                  String labText;
                  if (strs[0] != "user" &amp;&amp; strs[0] != "contact")
                  {
                      imgCode = strs[0].Split(':')[0];
                  }
                  else
                  {
                      imgCode = strs[0];
                      if (imgCode == "contact")
                      {
                          if (global.ContactIDTomName.ContainsKey(long.Parse(strs[1])))
                          {
                              strs[1] = global.ContactIDTomName[long.Parse(strs[1])];
                          }
                      }
                  }
                  labText = strs[1];
                  ImageSource imgsrc1 = new BitmapImage(new Uri(SEC_Services.Httprequest.BaseURL + "images/svr-icons/" + imgCode + ".png"));
                  this.image1.Source = imgsrc1;
                  this.textBlock1.Text = labText;
              }
          }
  
  
      }
  }
  </code></pre>