Skip to content

Commit

Permalink
Fixed sample, added image
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandarDev committed Jun 9, 2018
1 parent 2ecbaad commit 27046b2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 41 deletions.
31 changes: 0 additions & 31 deletions Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,34 +101,3 @@
</WrapPanel>
</Grid>
</mahapps:MetroWindow>































35 changes: 25 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,36 @@ The `WithOverlay` allows you to set custom overlay content. In this example a pr

### Custom additional content for notification

![Notification message with additional content - checkbox at the bottom](docs/images/CaptureNotificationMessageAdditionalContent.PNG)

```c#
manager.CreateMessage()
.Accent("#F15B19")
.Background("#F15B19")
.HasHeader("Lost connection to server")
.HasMessage("Reconnecting...")
.WithAdditionalContent(ContentLocation.Main, new CheckBox
{
Margin = new Thickness(16),
HorizontalAlignment = HorizontalAlignment.Right,
Content = "Don't show again"
})
.Accent("#1751C3")
.Background("#333")
.HasBadge("Info")
.HasHeader("Update available")
.HasMessage("Update will be installed on next application restart.")
.Dismiss().WithButton("Update now", button => { })
.Dismiss().WithButton("Later", button => { })
.WithAdditionalContent(ContentLocation.Bottom,
new Border
{
BorderThickness = new Thickness(0,1,0,0),
BorderBrush = new SolidColorBrush(Color.FromArgb(128, 28, 28, 28)),
Child = new CheckBox
{
Margin = new Thickness(12, 8, 12, 8),
HorizontalAlignment = HorizontalAlignment.Left,
Content = "Don't show again"
}
})
.Queue();
```

In this example a custom "Don't show again" checkbox is located at the bottom of the message.

You can add additional content to following locations: `Top, Bottom, Left, Right, Main, AboveBadge`.

### Multiple notification

The `NotificationMessageContainer` has build-in support for showing multiple notifications at the same time. New notifications will show at the bottom of the message stack.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 27046b2

Please sign in to comment.