예제 #1
0
        /// <summary>
        /// Gets the control value.
        /// </summary>
        /// <returns></returns>
        public override object GetControlValue()
        {
            if (!HasCurrentCellState)
            {
                return(base.GetControlValue());
            }
#if WinRT || UNIVERSAL
            return(this.CurrentCellRendererElement.GetValue(IsInEditing ? SfDatePicker.ValueProperty : TextBlock.TextProperty));
#else
            if (IsInEditing)
            {
                var      dateEdit = this.CurrentCellRendererElement as DateTimeEdit;
                DateTime dateValue;
                if (dateEdit.DateTime != System.DateTime.MaxValue && dateEdit.Text != string.Empty)
                {
                    DateTime.TryParse(dateEdit.Text, out dateValue);
                    return(dateValue);
                }
                else
                {
                    return(null);
                }
            }
            return(CurrentCellRendererElement.GetValue(TextBlock.TextProperty));
#endif
        }
예제 #2
0
 /// <summary>
 /// Gets the control value.
 /// </summary>
 /// <returns></returns>
 public override object GetControlValue()
 {
     if (!HasCurrentCellState)
     {
         return(base.GetControlValue());
     }
     return(CurrentCellRendererElement.GetValue(IsInEditing ? TextBox.TextProperty : TextBlock.TextProperty));
 }
예제 #3
0
 /// <summary>
 /// Gets the control value.
 /// </summary>
 /// <returns></returns>
 public override object GetControlValue()
 {
     if (HasCurrentCellState)
     {
         return(CurrentCellRendererElement.GetValue(IsInEditing ? Selector.SelectedValueProperty : ContentControl.ContentProperty));
     }
     return(base.GetControlValue());
 }
예제 #4
0
 /// <summary>
 /// Gets the control value.
 /// </summary>
 /// <returns></returns>
 public override object GetControlValue()
 {
     if (!HasCurrentCellState)
     {
         return(base.GetControlValue());
     }
     return(CurrentCellRendererElement.GetValue(IsInEditing ? SfMultiColumnDropDownControl.SelectedValueProperty : TextBlock.TextProperty));
 }
예제 #5
0
        private void sfTextBoxExt_TextChanged(object sender, TextChangedEventArgs e)
        {
            var sfTextBoxExt = sender as SfTextBoxExt;

            if (string.IsNullOrEmpty(sfTextBoxExt.Text))
            {
                // Set null to value of SfDatePicker explicitly
                CurrentCellRendererElement.SetValue(SfDatePicker.ValueProperty, null);
            }
        }
예제 #6
0
        /// <summary>
        /// Gets the control value.
        /// </summary>
        /// <returns></returns>
        public override object GetControlValue()
        {
            if (!HasCurrentCellState)
            {
                return(base.GetControlValue());
            }
#if UWP
            return(this.CurrentCellRendererElement.GetValue(IsInEditing ? SfDatePicker.ValueProperty : TextBlock.TextProperty));
#else
            return(CurrentCellRendererElement.GetValue(IsInEditing ? DateTimeEdit.DateTimeProperty : TextBlock.TextProperty));
#endif
        }
 /// <summary>
 /// Gets the control value.
 /// </summary>
 /// <returns></returns>
 public override object GetControlValue()
 {
     if (HasCurrentCellState)
     {
         var contentControl = CurrentCellRendererElement as ContentControl;
         if (contentControl != null && !(contentControl.Content is FrameworkElement))
         {
             return(CurrentCellRendererElement.GetValue(ContentControl.ContentProperty));
         }
     }
     return(base.GetControlValue());
 }
 /// <summary>
 /// Gets the control value.
 /// </summary>
 /// <returns></returns>
 public override object GetControlValue()
 {
     return(HasCurrentCellState
            ? CurrentCellRendererElement.GetValue(ToggleButton.IsCheckedProperty)
            : base.GetControlValue());
 }
예제 #9
0
 public override object GetControlValue()
 {
     return(CurrentCellRendererElement.GetValue(SfComboBox.TextProperty));
 }