🔭 I’m currently working on LiveSPICE, a SPICE-like circuit simulation tool for live audio signals.
federerer / notifications.wpf Goto Github PK
View Code? Open in Web Editor NEWToast notifications for WPF
License: MIT License
Toast notifications for WPF
License: MIT License
🔭 I’m currently working on LiveSPICE, a SPICE-like circuit simulation tool for live audio signals.
For my project I required a function to manually close a specific error notification, so I've decided to implement it and create as well a visual/testable interaction in the Wpf.Sample project (as shown below).
As I think this might be useful for everyone if the dev gives me branch creation permissions I'll push my version, to a separate branch.
Is there a possibility that we can hide this from the user?
Also, this window doesn't exit/close even after the application is closed as mentioned in Issue #10.
<Path x:Key="TrophyIcon" Data="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" Fill="White" x:Shared="False"/>
this is PackIconFontAwesome ico data How does ability let him show
Or what the icon here in the what data?
pls tell me
Hi,
I have an issue when using Notification with areaname like
notificationManager.Show(new NotificationContent
{
Title = "Comando inviato",
Message = message,
Type = NotificationType.Success
}, "ControlloAmbWindowArea");
<Grid>
<DockPanel>
<ProgressBar Visibility="{Binding ProgressBarVisibility}" DockPanel.Dock="Top" IsIndeterminate="True" Height="10"/>
<Label x:Name="lblName" DockPanel.Dock="Top" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" Content="{Binding DispositivoAudio.Nome}"/>
<ui:ControlloAmbView IsEnabled="{Binding IsControlEnabled}" ></ui:ControlloAmbView>
</DockPanel>
<notifications:NotificationArea x:Name="ControlloAmbWindowArea" Width="250" Position="TopRight" MaxItems="3"/>
</Grid>
Sometime before the notification close itself there is an unhandled exception:
Eccezione non gestita: System.InvalidOperationException: Impossibile risolvere tutti i riferimenti di proprietà nel percorso della proprietà 'LayoutTransform.ScaleX'. Verificare che gli oggetti applicabili supportino le proprietà.
in System.Windows.Media.Animation.Storyboard.VerifyPathIsAnimatable(PropertyPath path)
in System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
in System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
in System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer)
in Notifications.Wpf.Controls.Notification.Close()
in Notifications.Wpf.Controls.NotificationArea.d__12.MoveNext()
in System.Windows.Application.RunInternal(Window window)
window process is still running background. how to kill them?
Only happens when showing outside window
hello,
i want change position and area show but i don't know how do that? can you help me
thank you for Notifications.Wpf.
when creating a new "NotificationsOverlayWindow", in the NotificationManager, the window's owner is unset..
Creating toast notifications using the method below, will always leave the ToastWindow open as the application closes.
var notification= new NotificationContent(){ .. };
manager.Show(notification);
_window.Owner being set inside the NotificationManager allows normal Dispose/Close methods to end the lifecycle with the program, as WPF defaults to only closing on "LastWindowClosed".. this will confuse a lot of consumers of the NuGet Pkg...
In my project, I have suitivation based on the role, if it is admin i will show normal window where we have Showview with buttons show and showinwindow but if it is not admin role then window should not be visible instead it has to sit in the system tray and show custom notifications which are send.
I need context menu as well when the app sits in system tray
can you let me know how can this achieved with a sample
Having an issue getting the custom error message template to load. I am using the example you provided in your sample. The issue I am seeing is the object being passed is not a string but a NotificationContent object, so its skipping loading the template:
Is the sample old, or is this bug, or do I have my wiring wrong somewhere?
Hi there,
Despite following the instructions, I can't change the toast location - it is always bottom-right.
I declare the area in mainwindow xaml but it seems to be ignored.
A simple example in VB would be appreciated?
Thank you
Hi!
Please add the ability to set your icon for notified.
It is desirable that Ellipse be put.
Thx.
Dear Federerer,I have problem with custom notification.When I declare the viewmodel for notification to make custom notification,it does not show any button and preferences image.Most Probably it related with UserControl.Can you help me about this issue
Hi there,
Thanks for this nice and tiny library. It' will be really nice to have a feature that pauses the toast from being closed when mouse over. This is especially helpful while reading long error messages and the user need more time.
Hello,
Is there a way to close a shown notification ? from another button from example
thx
Hi all,
this kind of issue comes out by Name (x:Name) attributes usage, when you define an Area control in xaml.
By using some memory analyzer tool you can find retained static references also after the container control has been closed.
Regards,
Roberto.
Even after fixing the issue where the Notification Manager would run on a stand alone window, the process seems to not be killed once the notification has done its cycle, and as a result, even if you close the application by pressing 'X', there will be a task running in the background.
The solution has already been mentioned in another issue, I believe it was issue 12 or 13, but it has not been included in neither this or the updated version running on a fork that gets frequent updates.
I think the problem is when using "Application.Current.Dispatcher" instead of "Dispatcher.CurrentDispatcher"
Hi!, I'have application with MahApp Metro and when i show notification show like this:
the code is same of example
var notificationManager = new NotificationManager();
notificationManager.Show(new NotificationContent
{
Title = "Sample notification",
Message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
Type = NotificationType.Information
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.