I am trying to use the Outlook Bar as an area to notify users about specific information. If a condition is met I would like to flash the main area of the Notification bar red to notify the user that they need to do something. I have been able to do this for individual group boxes within the outlook bar but I want to do this for the main area where it says Navigation Pane.
Here is the code I am trying to use. The target name (Storyboard.TargetName="MyNotificationBarName") is currently pointing to the entire Outlook bar which is incorrect but I’m not sure what the Target is actually called.
<Storyboard x:Name="Blink" x:Key="alertUser" AutoReverse="True">
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
Duration="0:0:1" RepeatBehavior="Forever"
Storyboard.TargetName="MyNotificationBarName">
<ObjectAnimationUsingKeyFrames.KeyFrames>
<DiscreteObjectKeyFrame KeyTime="0:0:0.35">
<DiscreteObjectKeyFrame.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#ff8b80" Offset="0.0" />
<GradientStop Color="#e52115" Offset="0.5" />
<GradientStop Color="#ff5736" Offset="1.0" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames.KeyFrames>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
And then in my code behind I call this
Storyboard alertUser = (Storyboard)FindResource("alertUser");
alertUser.Begin();
Thanks ...
Hi mbhydro,
I've attached a sample that does what I think you're looking for. The element you're storyboard needs to target is a ToggleButton called "PART_ButtonShowPopup". This element is located inside the SelectedGroupContent template. You can use the Infragistics.Windows.Utilities.GetDescendantFromName method to get this toggle button and set it as the target of your storyboard.
Storyboard sb = this.Resources["alertUser"] as Storyboard; StoryBoard.SetTarget(sb, Utilities.GetDescendantFromName(xamOutlookBar, "PART_ButtonShowPopup")); sb.Begin();
You can also retemplate the SelectedGroupContent control and add a VisualState that uses this storyboard and targets the button. I used this approach in my sample.
Let me know if you have any questions on this.