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