programming-examples/c-sharp/Others/Bind current time to Button.cs

14 lines
389 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
Bind current time to Button
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib">
<StackPanel Width="400">
<Button Content="{x:Static s:DateTime.Now}"
HorizontalAlignment="Center" />
</StackPanel>
</Page>