public bool SetDataRoot(global::System.Object newDataRoot) { this.bindingsTracking.ReleaseAllListeners(); if (newDataRoot != null) { this.dataRoot = (global::Demoo.ViewModels.InkSmartCanvasViewModel)newDataRoot; return(true); } return(false); }
// Update methods for each path node used in binding steps. private void Update_(global::Demoo.ViewModels.InkSmartCanvasViewModel obj, int phase) { this.bindingsTracking.UpdateChildListeners_(obj); if (obj != null) { if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0) { this.Update_EnableLassoSelection(obj.EnableLassoSelection, phase); this.Update_EnableTouch(obj.EnableTouch, phase); this.Update_EnableMouse(obj.EnableMouse, phase); this.Update_EnablePen(obj.EnablePen, phase); } } }
public void UpdateChildListeners_(global::Demoo.ViewModels.InkSmartCanvasViewModel obj) { InkSmartCanvasPage_obj9_Bindings bindings = TryGetBindingObject(); if (bindings != null) { if (bindings.dataRoot != null) { ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_; } if (obj != null) { bindings.dataRoot = obj; ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_; } } }
public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e) { InkSmartCanvasPage_obj9_Bindings bindings = TryGetBindingObject(); if (bindings != null) { string propName = e.PropertyName; global::Demoo.ViewModels.InkSmartCanvasViewModel obj = sender as global::Demoo.ViewModels.InkSmartCanvasViewModel; if (global::System.String.IsNullOrEmpty(propName)) { if (obj != null) { bindings.Update_EnableLassoSelection(obj.EnableLassoSelection, DATA_CHANGED); bindings.Update_EnableTouch(obj.EnableTouch, DATA_CHANGED); bindings.Update_EnableMouse(obj.EnableMouse, DATA_CHANGED); bindings.Update_EnablePen(obj.EnablePen, DATA_CHANGED); } } else { switch (propName) { case "EnableLassoSelection": { if (obj != null) { bindings.Update_EnableLassoSelection(obj.EnableLassoSelection, DATA_CHANGED); } break; } case "EnableTouch": { if (obj != null) { bindings.Update_EnableTouch(obj.EnableTouch, DATA_CHANGED); } break; } case "EnableMouse": { if (obj != null) { bindings.Update_EnableMouse(obj.EnableMouse, DATA_CHANGED); } break; } case "EnablePen": { if (obj != null) { bindings.Update_EnablePen(obj.EnablePen, DATA_CHANGED); } break; } default: break; } } } }