TextBoxをプロパティにバインドしました。使用せずにtextBoxのコンテンツを更新する方法はありますか
RaisePropertyChanged(() => Property);
プロパティ内?
別のProperty2のProperty1の値を更新してから、Property2内のProperty1にバインドされているTextBoxの値を更新したいと思います。
それは可能ですか?
PropertyChangedCallbackをお探しの方もいらっしゃると思います。
基本的なsentaxはこれです:
static ClassName()
{
Property = DependencyProperty.Register("PropertyName", typeof(propertyType), typeof(ownerType),
new UIPropertyMetadata(new PropertyChangedCallback(PropertyChangedCallback));
}
static void PropertyChangedCallback(DependencyObject obj, DependencyPropertyChangedEventArts e)
{
ClassName class = obj as ClassName;
// Manipulate properties by accessing them through class.
}
詳細については、次のリンクを参照してください:http: //msdn.microsoft.com/en-us/library/ms745795.aspx