daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. public TimeSpan MyTime { get; set; }
  2.  
  3.     public Window2()
  4.     {
  5.         InitializeComponent();
  6.         MyTime = DateTime.Now.TimeOfDay;
  7.         DataContext = this;
  8.     }
  9.    
  10. <TextBlock Text="{Binding MyTime,StringFormat=HH:mm}"/>
  11.    
  12. <TextBlock>
  13.     <TextBlock.Text>
  14.         <MultiBinding StringFormat="{}{0}:{1}">
  15.             <Binding Path="MyTime.Hours"/>
  16.             <Binding Path="MyTime.Minutes"/>
  17.         </MultiBinding>
  18.     </TextBlock.Text>
  19. </TextBlock>
  20.    
  21. <TextBlock Text="{Binding MyTime,StringFormat=HH:mm}"/>
  22.    
  23. <TextBlock Text="{Binding MyTime,StringFormat=hh\:mm}"/>
  24.    
  25. <TextBlock Text="{Binding MyTime,StringFormat=`Time values are {0:hh\:mm}`}"/>
  26.    
  27. Binding="{Binding Time, Mode=TwoWay, StringFormat={0:h\:mm}}"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top