public static int GetMaxLength(DependencyObject obj)
{
return (int)obj.GetValue(MaxLengthProperty);
}
public static void SetMaxLength(DependencyObject obj, int value)
{
obj.SetValue(MaxLengthProperty, value);
}
// Using a DependencyProperty as the backing store for MaxLength.
public static readonly DependencyProperty MaxLengthProperty =
DependencyProperty.RegisterAttached("MaxLength", typeof(int), typeof(EditableComboBox), new UIPropertyMetadata(OnMaxLengthChanged));
private static void OnMaxLengthChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
var comboBox = obj as Telerik.Windows.Controls.RadComboBox;
if (comboBox == null)
{
return;
}
if (textBox != null)
{
textBox.SetValue(TextBox.MaxLengthProperty, e.NewValue);
}
return null;
}
, null);
}
public static int GetCharacterCasing(DependencyObject obj)
{
return (int)obj.GetValue(CharacterCasingProperty);
}
public static void SetCharacterCasing(DependencyObject obj, int value)
{
obj.SetValue(CharacterCasingProperty, value);
}
// Using a DependencyProperty as the backing store for CharacterCasing.
public static readonly DependencyProperty CharacterCasingProperty =
DependencyProperty.RegisterAttached("CharacterCasing", typeof(int), typeof(EditableComboBox), new UIPropertyMetadata(OnCharacterCasingChanged));
private static void OnCharacterCasingChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
var comboBox = obj as Telerik.Windows.Controls.RadComboBox;
if (comboBox == null)
{
return;
}
where 'local' is the location of the class in your code
0
Konstantina
Telerik team
answered on 04 Feb 2010, 05:40 PM
Hi Peter,
Thank you for contacting us.
We are glad that you have found a solution yourself. Your Telerik points have been updated.
If you need any further assistance concerning our controls please feel free to contact us again.
Greetings,
Konstantina
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.