How to create a dropdown image in WPF - wpf

How do I create a dropdown image in WPF?
I want to have an image on my xaml window (without arrow or anything else, just an image).
When I click the image a dropdown should appear.
On the dropdown I can select an item.
When the dropdown opens the current selected item should be checked.
I tried this on an image, on a dropdown, but cannot find how to make it work...
Thank you very much!

Related

How can I toggle image source on checkbox click?

I have a checkbox and two images. When the checkbox is not checked, I want to show the first image. But when the checkbox is checked, I want to display another image.
I am new to React and I am not sure how to achieve this. Anybody can help?

wpf custom combobox with datagrid but after popup dorpdown the first item is not selected

i have customed a wpf combobox with a datagrid in it.
After you click the toggle button of the combobox, it will open the dropdown popup and show the datagrid like the image below.
cilck the toggle buttom to show the whole result
Now my question is why the first item in the datagrid in the dropdown popup is not selected?And if after i press the down arrow key, it will select the second(like the image below press the down arrow key right after the dropdown shows) item which makes me fell that the first item is somehow selected but the highlight background is not shown.
Is this about the focus or anything else? Really no idea here , Thanks in advance.

Extjs 6: How to forcefully show a tooltip on an element on a button click?

I have a scenario i.e.combobox and a button. I want to show a tooltip on combox when I click on a button and hide it when i click again. How do I do that without using ids on tooltip instance? Also can I specify the position of tooltip i.e x and y relative to combobox and style tooltip a little bit?
Thanks a lot
When you click on button create new tooltip instance as below:
Ext.create('Ext.tip.ToolTip', {
html:<tip contents>,
id:<some id>
});
And showBy() this instance for that combo like tip.showBy(<combo instance>).
Now again you click on button you check if tip instance is present, if yes then hide it else show it again. But you will need some id for tooltip.

Select Combobox with Selenium IDE

In my application I have lot of combo boxes available. I need to click an arrow button which is on combo box. I am using Selenium IDE. When I record the clicking of the arrow button from combo box it will work at that time, but when I come back to same page it will display that the element is not found.
Thank you in advance.
I recommend you to understand first, how values are coming into your combo boxes. I think when you clicked on combo box, AJAX call will be fired and values will be loaded into your combo boxes.
You can use the command "waitForElementPresent" or "waitForTextPresent" when clicked on combo box.
Do not click on combo box button while recording.......
Do right click on button and get element by ID

Dropdown menu overlaps other controls

In my WPF application I would like to get a dropdown menu under some other elements in the window. When menu is expanded it overlaps other controls. But I need these controls remain over the menu anytime.
I tried to play with ZIndex, but without any success.
Is it possible somehow to show dropdown menu under other controls?
Thanks for help!
You cannot achieve this with a drop-down menu, because by definition it is displayed on a separate window above the current window.
So if you want some control to appear under other controls, you have to use just normal controls like Grid, make them invisible at the beginning, and show as soon as you need the "dropdown" to appear (and of course hide afterwards).

Resources