I put a wpf textbox inside a combobox to allow the user to enter a custom setting. I can read the keypress in the keydown event, but the text in the textbox does not change. What am I missing?
<ComboBoxItem Name="GridSizeCustom">
<StackPanel Height="30"
Orientation="Horizontal">
<TextBlock Text="Grid Size (8 - 200)"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="0"
/>
<TextBox Name="GridSizeBox"
KeyDown="test"
Width="50"
/>
</StackPanel>
</ComboBoxItem>
I step through this event handler when I press a key, but no change to the textbox text:
public void test(Object sender, KeyboardEventArgs e) {
int x = 0;
}
Any help is appreciated. Thanks.