Closed amkuchta closed 6 years ago
I'm reviewing the code, everything except one thing looks great.
It's strange to me that the ContentLocation.OverBadge
puts the content above the badge instead over the badge. Is that intended behavior?
@AleksandarDev yes, that was the intended behavior - would you like me to change the name to AboveBadge
to be clearer?
@amkuchta I can do it since I already have the project open and doing release prep. I just wanted to confirm this with you before. Thanks!
@AleksandarDev not a problem! I just realized that I need to add a DataTrigger
to the second RowDefinition
of the badgeGrid
to set the height to *
only if additionalContentOverBadge HasContent="True"
- otherwise the row will have an empty value but still push the badge down, throwing off the centering.
Give me one second and I will push that up!
Wait. Nevermind. I did things smarter than I realized. Ignore that last comment 😆 😆 😆
What's new?
This PR implements new
AdditionalContent
areas via the use of a new.WithAdditionalContent(...)
method. The new function accepts two parameters,ContentLocation
(which is a newenum
) and anobject
for the additional content (similar to.WithOverlay
). TheContentLocation
can be set with the following definitions:Top
Bottom
Left
Right
Main
(replaces originalOverlay
location)OverBadge
(this is placed over all otherAdditionalContent
areas with regards toZ-Index
; this will allow users to have both a badge and an icon as described in #18 if they want the icon above the badge instead of to its left)The
AdditionalContent
areas sit behind theBadge
,Message
, andHeader
, allowing all of the controls to be used in tandem (e.g. if a user wants to useContentLocation.Main
to set an image as the background of theirNotificationMessage
) - the only exception to this rule is theOverBadge
location, which is on the sameZ-Index
plane as the above mentioned controls.Finally, the
Overlay
control now encompasses the entireNotificationMessage
, including the newAdditionalContent
areas, and has the foremostZ-Index
, which allows it to continue to be used the way that it has been (basically, there is no change to this control).I have included a new, rudimentary example that shows the different
AdditionalContent
areas via the use of background coloring:Top
= RedBottom
= GreenLeft
= YellowRight
= VioletMain
= OrangeOverBadge
= IndigoI've also included all other features (
Header
,Message
,Button
, andOverlay
) to show how all of the pieces fit together - if everyone likes how the enhancements look so far, I will update the new example to be a bit more verbose as to what is exactly being shown (this was just a "proof of concept").Let me know what you think!
Closed Issues
17 - [Enhancement] Additional Content Area
18 - [Enhancement] Icon Image Area