How to set the binding text on code behind
===

I created the userControl in which has two textblock. I can set the text on xaml page for using this code.

        <my:Title Title  TitleCaption="test On XMAL"   />
   
However  I want to set the value of the text on the code. Would someone show me how to achieve this task? Thanks in advance.

There is my userControl: 

    <UserControl x:Name="TitleSection"  x:Class="CMSPhoneApp.Title"
    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="480" d:DesignWidth="480">

     
    <Grid x:Name="LayoutRoot" Style="{StaticResource GridTitleStyle1}" >
        
        <StackPanel>
        <TextBlock  x:Name="ApplictionTtile" Width="350" Text="MyAppTitle " HorizontalAlignment="Left" FontSize="20">
        	<TextBlock.Foreground>
        		<SolidColorBrush Color="#FFFFFF"/>
        	</TextBlock.Foreground>
        </TextBlock>
            <TextBlock   x:Name="PageTtile"  Style="{StaticResource TitleTextBlockStyle}" 
                   Text="{Binding Path=TitleCaption, Mode=TwoWay,  ElementName=TitleSection }"      
                         >
        	
             
        	 </TextBlock>
        </StackPanel>
    </Grid>
</UserControl>

The following is code behind of this page:

    namespace CMSPhoneApp
    {
        public partial class Title : UserControl
        {
        public Title()
        {
            InitializeComponent();
        }

        public static DependencyProperty TitleCaptionProperty =
     DependencyProperty.Register("TitleCaption", typeof(string), typeof(Title), null);

        public string TitleCaption
        {
            get
            {
                return (string)GetValue(TitleCaptionProperty);
            }
            set
            {
                SetValue(TitleCaptionProperty, value);
            }
        }
    }
}
