Closed Deadpikle closed 6 years ago
Looks great. Couple of question though:
INotificationMessage
to eg. INotificationMessageAnimation
? We would then implement both interfaces in NotificationMessage
class to keep backward compatibility.AnimationIn
and AnimationOut
properties so that user can hook up other custom animations (slide for example), what do you think about that?I could do those changes ofc if you want, since I'm asking of additional features :D
@AleksandarDev Both of your points are excellent. How's it look now? I changed INotificationMessageAnimation
to INotificationAnimation
since it technically could be used (for whatever reason) by non-messages, plus it's a little less verbose. I also wasn't sure what to name the properties for the animation in/out DependencyProperty
items, so I went with AnimationInDependencyPropProperty
, which is better than PropertyProperty
or something 😁.
EDIT: Making one more change. One second.
Edit: Done. Added different durations for the in and out animation.
Yeah, this looks great.
Can you please add summary comments to the interface and methods you added.
Also, we're using this
for all class level methods, properties and fields when accessing (for example this.RemoveMessage(args.Message);
instead of RemoveMessage(args.Message);
) so if you could update that too?
I'll update the readme, changelog, version and nuspec once you do these changes and we're ready to publish.
@AleksandarDev Everything should be commented, and I added the missing this
accessors. The only other change I made was grabbing the animation before checking if it was null in case it's dynamically generated on get
like ours is so that it's not created twice.
Hello, please modify the project's framework from 4.6 to 4.5.
@ghost1372 This is not really related to the animation feature. Can we continue discussion here #12?
@Deadpikle Thank you for the contribution. The v1.3.0
was published 🥂
This PR adds a very basic animation to the
NotificationMessage
add/remove operations. I added options for making a message animate (defaults tofalse
) as well as the animation duration (defaults to0.25
).The one tricky thing here that I had to do was modify the
Generic.xaml
layout for the container such that the animations looked good on a dark background as well as a light background. Otherwise, on a light background, the background for the container would show up first while the message animated in, and that looked bad. I'm open to alternatives.This does adjust the
INotificationMessage
interface, so this should probably be considered a breaking change in case anyone out there is implementing that interface.Closes #7.