Exemple #1
0
 /// <summary>
 /// Replaces a <see cref="DataField"/>'s <see cref="DatePicker"/> control with another control
 /// and updates the bindings.
 /// </summary>
 /// <param name="field">The <see cref="DataField"/> whose <see cref="TextBox"/> will be replaced.</param>
 /// <param name="newControl">The new control you're going to set as <see cref="DataField.Content" />.</param>
 /// <param name="dataBindingProperty">The control's property that will be used for data binding.</param>
 public static void ReplaceDatePicker(this DataField field, FrameworkElement newControl, DependencyProperty dataBindingProperty)
 {
     field.ReplaceContent(newControl, dataBindingProperty, binding => { }, DatePicker.SelectedDateProperty);
 }
Exemple #2
0
 /// <summary>
 /// Replaces a <see cref="DataField" />'s <see cref="TextBox" /> control with another control
 /// and updates the bindings.
 /// </summary>
 /// <param name="field">The <see cref="DataField"/> whose <see cref="TextBox"/> will be replaced.</param>
 /// <param name="newControl">The new control you're going to set as <see cref="DataField.Content" />.</param>
 /// <param name="dataBindingProperty">The control's property that will be used for data binding.</param>
 public static void ReplaceTextBox(this DataField field, FrameworkElement newControl, DependencyProperty dataBindingProperty)
 {
     field.ReplaceContent(newControl, dataBindingProperty, binding => { }, TextBox.TextProperty);
 }