Esempio n. 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
        }
Esempio n. 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));
 }
Esempio n. 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());
 }
Esempio n. 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));
 }
Esempio n. 5
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());
 }
Esempio n. 8
0
 public override object GetControlValue()
 {
     return(CurrentCellRendererElement.GetValue(SfComboBox.TextProperty));
 }