Why can't i bind a DataGrid SelectedItem to a DependencyProperty Inside a usercontrol?
i want to bind a DataGrid SelectedItem inside a usercontrol to a DependencyProperty
and this is my code:
   
in the usercontrol(DataGridControl):

            public static readonly DependencyProperty DataGridSelectedItemProperty
            = DependencyProperty.Register(
            "DataGridSelectedItem"
            , typeof(object)
            , typeof(DataGridSelectorControl)
            , new UIPropertyMetadata(null));

        public object DataGridSelectedItem
        {
            get { return (object)GetValue(DataGridSelectedItemProperty); }
            set { SetValue(DataGridSelectedItemProperty, value); }
        }

      <DataGrid ItemsSource="{Binding Source={StaticResource theSource}}" 
               SelectedItem="{Binding ElementName=DataGridControl,Path=DataGridSelectedItem,UpdateSourceTrigger=PropertyChanged}"  />

and in the viewmodel:
  
        object projectSelectedItem;
        public object ProjectSelectedItem
        {
            get
            {
                return projectSelectedItem;
            }
            set
            {
                projectSelectedItem = value;
                RaisePropertyChanged("ProjectSelectedItem");
            }
        }

and in view:

    <MvvmCommonControl:DataGridControl  DataGridSelectedItem="{Binding ProjectSelectedItem}"  DataGridDataCollection="{Binding DataCollection}"/>

but it dosen't work!!
Why can't i bind a DataGrid SelectedItem to a DependencyProperty Inside a usercontrol?
===

i want to bind a DataGrid SelectedItem inside a usercontrol to a DependencyProperty
and this is my code:
   
in the usercontrol(DataGridControl):

            public static readonly DependencyProperty DataGridSelectedItemProperty
            = DependencyProperty.Register(
            "DataGridSelectedItem"
            , typeof(object)
            , typeof(DataGridSelectorControl)
            , new UIPropertyMetadata(null));

        public object DataGridSelectedItem
        {
            get { return (object)GetValue(DataGridSelectedItemProperty); }
            set { SetValue(DataGridSelectedItemProperty, value); }
        }

      <DataGrid ItemsSource="{Binding Source={StaticResource theSource}}" 
               SelectedItem="{Binding ElementName=DataGridControl,Path=DataGridSelectedItem,UpdateSourceTrigger=PropertyChanged}"  />

and in the viewmodel:
  
        object projectSelectedItem;
        public object ProjectSelectedItem
        {
            get
            {
                return projectSelectedItem;
            }
            set
            {
                projectSelectedItem = value;
                RaisePropertyChanged("ProjectSelectedItem");
            }
        }

and in view:

    <MvvmCommonControl:DataGridControl  DataGridSelectedItem="{Binding ProjectSelectedItem}"  DataGridDataCollection="{Binding DataCollection}"/>

but it dosen't work!!