aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml13
2 files changed, 25 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
index 2f74024f3..1fdf0c729 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs
@@ -14,6 +14,19 @@ namespace Tango.PPC.Common.Notifications
/// </summary>
public abstract class NotificationItem : ItemBase
{
+ private bool _isExpanded;
+ /// <summary>
+ /// Gets or sets a value indicating whether the notification panel is expanded.
+ /// </summary>
+ public bool IsExpanded
+ {
+ get { return _isExpanded; }
+ set { _isExpanded = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Called when the item has been pressed.
+ /// </summary>
protected override void OnPreesed()
{
base.OnPreesed();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
index b049dc108..fa26bce83 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
@@ -49,7 +49,18 @@
</Style>
</touch:TouchIcon.Style>
</touch:TouchIcon>
- <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Text="{Binding Message}"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Text="{Binding Message}" TextTrimming="CharacterEllipsis">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="TextWrapping" Value="NoWrap"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsExpanded}" Value="True">
+ <Setter Property="TextWrapping" Value="Wrap"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
</DockPanel>
</ContentControl>
</UserControl>