Bind current time to Button : Bind to Button « Windows Presentation Foundation « C# / CSharp Tutorial






<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="200">

        <Button Content="{x:Static s:DateTime.Now}"
                HorizontalAlignment="Center" />

    </StackPanel>
</Page>
WPF Bind Current Time To Button








24.133.Bind to Button
24.133.1.Bind current time to ButtonBind current time to Button