private static void onTextContentPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { InterruptionCellControl thisControl = sender as InterruptionCellControl; if (e.NewValue != null && thisControl.m_EditText != null) { thisControl.m_EditText.Text = (string)e.NewValue; } thisControl.NotifyPropertyChanged("DisplayText"); }
private static void onIsInEditModeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { InterruptionCellControl thisInstance = sender as InterruptionCellControl; if (thisInstance.m_EditText == null) { thisInstance.m_EditText = new TextBox(); thisInstance.LayoutRoot.Children.Add(thisInstance.m_EditText); thisInstance.m_EditText.Style = TimeMerge.App.Current.Resources["gridCellTextBoxStyle"] as Style; thisInstance.m_EditText.Text = thisInstance.TextContent; thisInstance.m_EditText.TextChanged += thisInstance.editText_TextChanged; thisInstance.m_EditText.GotKeyboardFocus += thisInstance.editText_GotKeyboardFocus; } if (thisInstance != null && thisInstance.m_EditText != null) { thisInstance.m_EditText.Visibility = (bool)e.NewValue == true ? Visibility.Visible : Visibility.Collapsed; } }
private static void onVirtualTimeShownPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { InterruptionCellControl thisControl = sender as InterruptionCellControl; thisControl.NotifyPropertyChanged("DisplayText"); }