Simple Binding Example
[
{
"TimeOfDay": "2025-11-28 12:34:24",
"Random": 0.74654231,
"RaceName": "Test Race Marathon 2",
"StartTime": "09:50",
"IsStarted": true
}
]
Last updated
[
{
"TimeOfDay": "2025-11-28 12:34:24",
"Random": 0.74654231,
"RaceName": "Test Race Marathon 2",
"StartTime": "09:50",
"IsStarted": true
}
]
Last updated
<UserControl x:Class="AdvancedProject_400x300.RaceBindingLayout"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:AdvancedProject_400x300"
mc:Ignorable="d"
xmlns:controls="clr-namespace:Screens.Controls;assembly=Screens.Controls"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary Source="Styles.xaml"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<controls:TextElement Foreground="{DynamicResource DefaultForeground}" Text="Current Race: " Grid.Row="0"></controls:TextElement>
<controls:TextElement Foreground="{DynamicResource DefaultForeground}" Text="{Binding Sources.RaceResult.Value[0].RaceName}" Grid.Row="1" FontSize="20"></controls:TextElement>
<controls:TextElement Foreground="{DynamicResource DefaultForeground}" Text="Rae Time: " Grid.Row="2"></controls:TextElement>
<controls:Stopwatch2Element Foreground="{DynamicResource DefaultForeground}" IsPaused="False" StartTime="{Binding Sources.RaceResult.Value[0].StartTime}" RunningFormat="hh:mm:sS.f" StoppedFormat="hh:mm:sS.ff" Grid.Row="3" FontSize="20"></controls:Stopwatch2Element>
</Grid>
</UserControl>