I tryed this example with two type of fields with style MaterialDesignFloatingHintTextBox and MaterialDesignFloatingHintPasswordBox, but I noticed that when the event get is triggered the popup is showed correctly but when I go to the popup to press one of the button, the lost focus event of the text field is triggered and the popup is closed :/
My question is that do you know some solutions? Or do you know some osd keyboard that works with the materialdesignxamltoolkit?
Finally I solved the problem:
is not a problem of user controls or xamltoolkit, but only a focus problem, so setting property Focusable = false in the button and other controls in the old keyboard works very well.
I hope that this post can be useful to someone that have my same problem.
Cheers
Franco
Related
I have Modal that appears when pressing on edit button on specific section. Sections are comments displayed with FlatList. Interesting thing is when I open edit panel and click on TextInput to edit text from that comment keyboard shows up and here is what happens:
If the edit button of that comment is above the keyboard height (that will shows later when I press the TextInput in edit Modal) everything works perfectly. But when I press the edit button and its located bellow keyboard height (basically if the position of button is ,,inside,, of keyboard position) when I press the TextInput in edit Modal, Modal get closed without any logic. And since I render modal as Pure.Component for each section and it is visible by bool value in each comment state, when I press edit button state changes to true, but when this problem happens state is not updated, it's still true and I can not activate edit Modal again, since it looks like its already open. And I can open Modal of any other comment without problem. What can cause the problem or what am I doing wrong?
If you need any more details let me know. I do not know what part of code should I post here since I do not know what cause the problem, but it is about Keyboard height for sure.
Keyboard is messing things up. I made a workaround by making scrollToIndex, so when ever I press on edit button it will move that comment to be first displayed, that way it will always be above Keyboard.
I'm displaying a Popup in response to a button click (popup.IsOpen = true;). The popup contains a ComboBox, and when I click an item in the combobox, one of the things the SelectionChanged event does is to hide the popup.
The Popup appears over a DataGrid that I also have on my page, and I'm finding that the mouse-click on the combobox is also being picked up by a MouseUp event that I've got on the DataGrid. Any idea what's going on?
The MouseUp Event has a routing strategy of type Bubbling. Events that use this type of strategy get passed up the chain to parent controls. Since the Popup is a child of the DataGrid, the event will "bubble" up to the DataGrid. If you would rather the event not bubble, you can try using PreviewMouseUp, which has a Tunneling routing strategy, and will "tunnel" down the chain to child controls. Here is a decent overview of Routing Strategies.
I've hit the same issue. Oddly, it doesn't happen when the code is run in the debugger - it only happens in the release version. It really seems to be a bug in WPF. Trying to catch the click and set the event to handled doesn't work.
My workaround is to, when the popup opens, to tell the control underneath to ignore the click.
I am using Richfaces suggestionBox as a combobox. You can see this usage in the second example of livedemo: http://livedemo.exadel.com/richfaces-demo/richfaces/suggestionBox.jsf?c=suggestionBox
The problem is that if I double click on the arrow icon, the suggestion box will not disappear after that. In fact, we just need to repeatedly click on the icon, the issue will occurs.
Thanks!
A work-around here:
http://community.jboss.org/thread/164345?tstart=0
I've created a Google like SearchBox control in Silverlight. That means, as I type in the box, a DropDownListBox appears just below the SearchBox, showing all the items that match with the text I've typed in searchbox so far (i.e AutoComplete feature), exactly like this:
Now, I want to add a functionality to it : I want to make the DropDownListBox to disappear, as soon as user clicks outside it, or anywhere on the screen. I cannot handle MouseLeftButtonDown (or any such event) in other controls, to accomplish this, because users can click anywhere, including non-silverlight region. Can anybody suggest me what should I do to achieve this?
So my question basically is:
How to know if user has just clicked and the click event occurred outside a particular control?
Please note that AutoCompleteBox doesn't serve my purpose. So I cannot use it.
I have a feeling that working with LostFocus event can solve your problem.
I guess this question is a bit old, but i just stumble upon trying to do the same and finding a solution. This is what i did
Created a Border with All Margins -500, this will cover the full screen essentially.
On Click Behaviour of this Border, the dropdown section of SearchBox
is collapsed.
Adjust z-Index of Border just below the SearchBox and DropDown
section, so clicking on SearchBox or DropDown wouldn't close it.
Set Border Visibility Collapsed, and make it visible when DropDown is Visible.
I hope it helps someone who is looking for the similar problem.
I have a problem regarding combobox dropdown. Once a dropdown is opened, if I want to move focus to other control (say a textbox), I need to click twice because on first click, the combo dropdown is closed and then on second click, the textbox gets focus. How should I fix this? Please help.
You could listen to the DropDownList.SelectedIndexChanged event, and in the event handler set focus to the next control, either by setting TextBox.Focus(), or by calling System.Windows.Forms.Control.SelectNextControl()
I think this would be 'non standard' behaviour for what its worth. Its quite normal to expect the user to tab or select the next control after using a drop down.
Edit: Sorry, in a WPF ComboBox the equivalent event is SelectionChanged, but on reflection you'd be better using OnDropDownClosed. This would mean you only move the focus specifically after using the drop down rather than just whenever the value changes.