This question is locked. New answers and comments are not allowed.
Hello.
I have dropdownbutton with textbox inside content.
Inside of TextBox MouseLeftButtonDown event handler I am trying to open dropdown.
So on first click on textbox dropdown opens and immediately closes.
On second click all works as expected - drop down opens normally.
You can download sample project here
How to fix this behavior?
Thanks.
I have dropdownbutton with textbox inside content.
Inside of TextBox MouseLeftButtonDown event handler I am trying to open dropdown.
So on first click on textbox dropdown opens and immediately closes.
On second click all works as expected - drop down opens normally.
<
telerik:RadDropDownButton
x:Name
=
"PointDropDown"
Grid.Column
=
"1"
Height
=
"22"
Width
=
"600"
Margin
=
"3"
HorizontalContentAlignment
=
"Stretch"
VerticalContentAlignment
=
"Stretch"
>
<
telerik:RadDropDownButton.Content
>
<
TextBox
x:Name
=
"SelectedPointTextBox"
BorderBrush
=
"Transparent"
Background
=
"Transparent"
HorizontalAlignment
=
"Stretch"
Cursor
=
"Arrow"
VerticalAlignment
=
"Stretch"
IsReadOnly
=
"True"
Padding
=
"0, -3, 0, -3"
Text
=
"TextBlockText"
IsTabStop
=
"False"
TextAlignment
=
"Left"
MouseLeftButtonDown
=
"SelectedPointTextBoxMouseLeftButtonDown"
/>
</
telerik:RadDropDownButton.Content
>
<
telerik:RadDropDownButton.DropDownContent
>
<
telerik:RadGridView
x:Name
=
"PointGridView"
MaxWidth
=
"450"
MaxHeight
=
"350"
IsReadOnly
=
"False"
RowIndicatorVisibility
=
"Collapsed"
>
</
telerik:RadGridView
>
</
telerik:RadDropDownButton.DropDownContent
>
</
telerik:RadDropDownButton
>
private
void
SelectedPointTextBoxMouseLeftButtonDown(
object
sender, MouseButtonEventArgs e)
{
PointDropDown.Focus();
PointDropDown.IsOpen =
true
;
}
You can download sample project here
How to fix this behavior?
Thanks.