I have a Windows 8.1 application.
In that I have a SettingsFlyout in ShowIndependent mode.
Inside the settings flyout I have a List
I want the SettingsFlyout to dismiss on click of any item in the list.
I would be very glad if someone can point me in the right direction to implement it. Thanks in advance.
Just call SettingsFlyout.Hide():
By default, the settings flyout is dismissed when the user presses the
back button, and is always light-dismissed when the user taps outside
of it. In most cases, you will not need to call the Hide method to
dismiss the settings flyout.
Calling the Hide method has the same behavior as light dismiss. It
always returns the user to your app and closes the settings pane,
regardless of whether the settings flyout was opened by calling Show
or ShowIndependent.
Related
I have developed a chrome extension that opens a popup when I click on the icon near the address bar. Everything works fine, however I want to add some functionality to it. So I thought I'd also add a context menu item so that the user can simply search for the highlighted word. I want the popup to showup when the user clicks on the item in the context menu(the default popup in the top right corner and not a new popup window or a new tab).
Can I have this functionality? If yes, how do I implement it?
You can't make the popup page show programmatically as if the user clicked it.
However, you can still have something display based on the background script / content menu click. There are 4 main options for your background script:
Open a new tab to the popup.html page
Programmatic injection of javascript to construct a popup-like dialog on the page
Content script message passing to do the same as above, using a running content-script.
Use the notifications API for a simple minimally stylized message to the user.
Options 2, 3, 4 will allow the user to stay on their tab without any navigation. The notifications API route is the simplest to use if you just want some quick notification to the user, and there are fewer security snags. 2 and 3 require more book-keeping, but you can make the dialog look like your popup.
There should be an API for it now (as in 2023)
https://developer.chrome.com/docs/extensions/reference/action/#method-openPopup
update: tried, but failed, there was a bug.
https://github.com/GoogleChrome/developer.chrome.com/issues/2602
hope they fix it soon.
I was looking for extensions that I have already been used, but forget its name. This extension opened up the result into Context Menu, without open new TAB or popup.
may be useful
https://developer.chrome.com/extensions/contextMenus
So I am integrating AdMob banners in an android application. The Banner is situated at the bottom of view, working fine, not overlapping with the list view when scrolling and it's all good. I think that bottom position is a very good place to put the banner, but when clicking on the menu button, the menu does cover the banner. I guess this normal behavior but want to make sure it does not break the admob policies, specifically:
Ads should not be placed very close to or underneath buttons or any other object which users may accidentally click while interacting with your application.
Does anybody have a similar situation?
Thanks,
I think until you dont have it very close to the menu it would be fine.
All you need to make sure is that it should not interfere with user inputs and produce incorrect clicks.
Its usually on a more case to case basis.
I have a MFC dialog based application. User can change the language of the dialog, and I made this by closing existing dialog, and opening another with changed language. The problem is that the effect in the taskbar is that one icon is removed, and another identical is created in its place. If my application's icon is not the last icon in the task bar it will be perceived as it was moved to the end of taskbar icon set.
I want to retain icon's position in the taskbar, and rather to prevent icon flicker at all from happening. How do I do that?
The application must support OS'es from Windows XP to Windows 7.
EDIT: alternative question for which I would accept an answer is how to create an invisible window that is nevertheless shown in the taskbar, and how to forward relevant window messages from that window to my main window?
Make the dialog a child of another outer parent window. The parent can be a dialog or any other kind of window; all it will be providing is the title bar. If the user tries to resize it it will have to forward resizing commands to the dialog, but otherwise you shouldn't need to do much in the parent window.
Why not replace the dialog with a CFormView instead? That way there's a frame window that wraps around the dialog (which is embedded in a form view) and it's the frame window that owns the taskbar icon.
Create an SDI application that displays a CFormView. Display the dialog in the default language (or whatever langauge the user previously chose) on initialization. When the user chooses the 'change language' option, simply change the form view that's being displayed with a new one.
Bonus feature: with this design, the framework will take care of things like language-specific accelerators and menus for you with no effort on your part.
For more on how to do this, check out http://www.codeguru.com/cpp/w-d/doc_view/viewmanagement/article.php/c3341/Multiple-Views-Using-SDI.htm
Hi I am facing the problem on ICS like dialog is dismissed when we click outside dialog window, due to which I am getting problem like I don't get any confirmation from user.
Please help.
Check this method from the Android Developers site for dialog.
Try using the
dialog.setCanceledOnTouchOutside (boolean cancel)
Pass a boolean value to enable/disable dialog behaviour when touched outside of the dialog window.
Also go through these links:
How do I fire an event when click occurs outside a dialog
How to cancel an Dialog themed like Activity when touched outside the window?
I hope this answers your question.
You may use
dialog.setCancelable(true/false);
OR
dialog.setCanceledOnTouchOutside(true/false);
For the latest vesrions of Android;
It will disable outSideTouching event.
dialog.setCancelable(false)
Dialog CAN NOT cancel when touch out side OR press BACK key
dialog.setCanceledOnTouchOutside(false)
Dialog CAN NOT cancel when touched outside BUT ABLE to canceled when press BACK key
I have an android spinner which I call via the performClick method to show a list of items (the actual control is hidden from the user and is called from a checkbox, too complex to explain why I have done it this way).
If I do not want an item in the list, how can I dismiss the popup by clicking on the black area?
Does this make sense? :/
Edit: Sorry, forgot to mention that the users will not be able to operate the bottom buttons (device is going to be galaxy tab) as they will be covered up with protective layer due as they will be outdoors.
usually such a control is dismissed using the back key in the android applications. So I would suggest that you find a way to do it the same way on your control.
'Esc' button should do the same job..