Hi, I have a data navigation user control in Silverlight which opens a child window where the user can enter search criteria and when they press 'Apply' it's suppose to update the bound property in the ViewModel (MVVM pattern.)
The links are: SearchDialog <--> DataNavigator <--> MyView <--> MyViewModel
The dependency property in SearchDialog seems to work, when I set its value, it shows up in DataNavigator; however when the dependency property changes, no notification seems to be sent from DataNavigator to MyView/MyViewModel.
SearchDialog derives from ChildWindow:
public string Search
{
get { return (string)GetValue(SearchProperty); }
set { SetValue(SearchProperty, value); }
}
public static readonly DependencyProperty SearchProperty =
DependencyProperty.Register("Search", typeof(string), typeof(SearchDialog),
new PropertyMetadata(null));
DataNavigator derives from UserControl:
public Binding Search { get; set; }
private void DataNavigator_Loaded(object sender, Windows.RoutedEventArgs e)
{
if (Search != null)
this._searchDialog.SetBinding(SearchDialog.SearchProperty, Search);
}
MyView derives from SilverlightFX.UserInterface.Navigation.Page:
<DataNavigator MovePreviousAction="$model.MovePrevious()"
CurrentIndex="{Binding CurrentIndex, Mode=TwoWay}"
MoveNextAction="$model.MoveNext()"
SaveAction="$model.SaveChanges()"
IsLoading="{Binding IsLoading, Converter={StaticResource VisibilityConverter}}"
Search="{Binding SearchString, Mode=TwoWay}"/>
MyViewModel derives from ViewModel:
public string SearchString
{
get { return this._search; }
set
{
if(value != this._search)
{
this._search = value;
this.RaisePropertyChanged("SearchString");
}
}
}
I've been trying for hours to find the problem but haven't had any success; anyone see the issue? Thanks in advance,