This question already has answers here:
Windows.UI.Notifications is missing
(2 answers)
Closed 4 years ago.
I'm using a NotifyIcon to show a Ballontip.
Clicking the Ballontip fires an action.
If the Ballontip times out, it stays in the Win10 Notification center.
Is there a way to catch the click event of that notification, once it shows in the notification center?
Found: https://stackoverflow.com/a/39141010/1944848
It is a hacky way to add Windows.Data and the Windows.UI dependency from UWP to winforms.
You get access to ToastNotificationManager class then and can register to the Activated Event of the ToastNotification
Related
I'm using ZK CE-9.0.0.
I have a combobox which I need to open programmatically, on click of OK button of the Messagebox. Hence I have implemented a Listener for the click event of the OK button. Inside the click event, I'm opening the combobox by using the following code:
EventListener<Messagebox.ClickEvent> clickListener = new EventListener<Messagebox.ClickEvent>() {
#Override
public void onEvent(ClickEvent event) throws Exception {
mycombo.open();
}
};
Messagebox.Button[] buttons = new Messagebox.Button[] {Messagebox.Button.OK};
Messagebox.show("Hi btn", buttons, clickListener);
Now the problem that I'm facing is, the combobox opens for half a second. It then immediately gets closed automatically.
As per my understanding, it's because of the Messagebox. Once the execution of the click event is completed, the Messagebox is closed & it causes the combobox also to be closed.
Please have a look at this fiddler for better understanding. Please select the ZK version to be 9.0.0 before running it.
Can anyone help me with this please?
Thanks,
RAS
You are correct that the main issue comes from the button retrieving focus after the animation of the combobox.
The focus is given back to the button by the closed messagebox
Since the combobox loose focus, the combo popup is also closed.
A clean way to handle this would be to use an echo event to wait for the messagebox to be actually closed before sending the open action to the combobox.
See this fiddle:
https://zkfiddle.org/sample/1rkm5d/6-Combobox-gets-closed-on-MessageBox-close#source-2
This question already has answers here:
Click everywhere but here event
(8 answers)
Closed 4 years ago.
Is there any solution that can implement the click away feature with ng-show?
Here is the plunker:
http://jsfiddle.net/o0dwsrqf/
I'm using the button to show the text.
<button ng-click="test=!test">test</button>
And I'm using ng-show to show the text:
<ul ng-show="test">
And when I click away from the text I want to hide it. Is there anyway I can achieve this?
EDIT:
Defining click away I mean click anywhere else besides button and text area.
When I click away I want to hide the text.
You need to use event propagation to do this.
Attach a click event to the body tag or some other element that covers the entire page and then attach click events to the button and text area. The button should toggle test and swallow the event (e.stopPropagation()) and the textarea should get focus then swallow the event.
In order to make a quickstar/launcher,I want to make a resident message always show in action center,that would be unable to clear this message like android moblie top notification untill close my app.
and once click this message,my function launched,and message will still show in the action center.
I would be like to use WinForm to accomplish it,it's possible?
As per my knowledge, Only balloon notifications (Toasts) end up in action center. If user doesn't respond to a notification or click "close" it ends up in action center. When user clicks on it, it is marked as "read" and goes away. I don't think it is possible to create a non-dismissable message in action center. However you can create your own custom form outside action center like in corner of desktop
This question already has an answer here:
How to refresh Kendo Grid on delete and add row action?
(1 answer)
Closed 7 years ago.
I have data in kendo grid so on below api call i am deleting row record that is working at backend side but its not refreshing grid on client side. How can i refresh grid ?
So far tried code
main.js
$scope.excludeAssess = function(key){ RcsaFactory.assessmentDetails(key.riskAssessmentKey,'RS_DELETED').then(function(){
$scope.includeAssOptions.dataSource.read();
});
};
$scope.includeAssOptions = RcsaAssessConfig.includeAssessmentGrid;
You already read the dataSource but then you missed the second step which is refreshing the kendo grid, there is similar question here. Assuming $scope.includeAssOptions is your grid then you could simply $scope.includeAssOptions.refresh(); to refresh your grid
What's the name of the default red button with an X in the middle at the top right?
EDIT: I want to get the event associated with clicking that button.
You cannot disable the close box on its own using in properties window like you can with the minimize and maximize boxes. You can however disable the control box which contains them all.
Setting ControlBox to false will remove the minimize, maximize and close buttons.
You might want to consider why you are doing this though, as it's generally a good idea to let users quit out of windows using the close button (think of it as a cancel button).
EDIT:
You can handle when the user clicks on that close button using either the Closing or the Closed events of the Form. The difference between the two is that the Closing event fires before the form has closed (meaning that you can veto the closure by setting the Cancel property of the FormClosingEventArgs to true), whereas the Closed event fires after the form has actually closed.
it is possible to hook all messages goes to a form by implementing ImessageFilter interface
this link can be use full Using IMessageFilter to create a generic filter for operating system events
You can disable it by setting the ControlBox to false in the form properties, or in code like the following:
this.ControlBox = false;
Setting this will also hide the minimize and maximize buttons if that is OK. If not, the solution is a bit more elaborate.