Silverlight ChildWindow가 있습니다. 링크를 클릭하면이 자식 윈도우가 열리고 내 ViewModel의 일부 데이터가 표시됩니다. 문제는 ViewModel의 데이터가 업데이트 될 때 업데이트되지 않는다는 것입니다. 팝업에서Silverlight 개체의 속성에 대한 데이터 바인딩
샘플 :
<TextBox Text="{Binding Path=AgentExceptionDetail.Action, Mode=TwoWay}" />
뷰 모델 :
private AgentExceptionDetail _agentExceptionDetail;
public AgentExceptionDetail AgentExceptionDetail
{
get { return _agentExceptionDetail; }
set
{
if (value != _agentExceptionDetail)
{
RaisePropertyChanged("AgentExceptionDetail");
_agentExceptionDetail = value;
}
}
}
이 AgentExceptionDetail 객체는 RIA-서비스의 호출을 통해서 채워집니다. 이 호출이 성공하고 데이터가 다시 가져옵니다. OneWay보다는 Mode = OneTime처럼 바인딩이 실제로 작동합니다. 팝업을 닫고 다시 열면 데이터가 표시되지만 팝업이 처음 열리면 AgentExceptionDetail = null이 반환되어 호출이 다시 돌아올 때 채워집니다.
바인딩이 실제로 "AgentExceptionDetail.Action"을 찾고있을 때 "AgentExceptionDetail"에 대한 속성 변경 이벤트를 발생시키는 것과 관련이 있습니까? 그렇다면이 방법이 있습니까?
업데이트 할 내용이 조금 더 필요하십니까? AgentExceptionDetail 또는 해당 Action 속성 Action 속성은 어떤 모습입니까? ... 개념적으로 당신이하고있는 것은 올바르게 보인다! – ColinE