My aim is to show time in a Label and update it in every second. I am using Storyboard and ObjectAnimationUsingKeyFrames. The Storyboard implementation is working but the DescreteObjectKeyFrame value that is bind to DateTime.Now is not getting refreshed. Can anybody please help to fix the issue. This approach is chosen to replace the existing implementation using Timer
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mscorlib="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Height="450"
Width="800">
<Grid>
<Label FontSize="40"
ContentStringFormat="hh:mm:ss">
<Label.Triggers>
<EventTrigger RoutedEvent="Label.Loaded">
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content"
Duration="0:0:3"
RepeatBehavior="Forever">
<ObjectAnimationUsingKeyFrames.KeyFrames>
<DiscreteObjectKeyFrame Value="."
KeyTime="0:0:1" />
<DiscreteObjectKeyFrame Value="{Binding Source={x:Static mscorlib:DateTime.Now}}"
KeyTime="0:0:2" />
</ObjectAnimationUsingKeyFrames.KeyFrames>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Label.Triggers>
</Label>
</Grid>
</Window>