Why those different string formats on TimeSpan on XAML?

前端 未结 1 1109
星月不相逢
星月不相逢 2021-01-18 02:19

I\'m going crazy. Can someone explain me why these string formats formatting the same thing are so different?



        
1条回答
  •  别那么骄傲
    2021-01-18 02:44

    I'm no expert in formatting TimeSpan so I can't tell you exactly why they produce the same result but you can read up about it here: Custom TimeSpan Format Strings

    Of course each one do not work on the other.

    They do work the same way, the thing is just that you should use one backslash within the double quotes. The following

    
    

    comes out to hh\\\\:mm\\\\:ss. So instead you should write

    
    

    The following two Bindings should produce the same result

    
    
        
            
        
    
    

    And so should the following two

    
    
        
            
        
    
    

    0 讨论(0)
提交回复
热议问题