File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed 
sample/MauiSample/Features/Main 
src/ShieldMVVM/ExtensionMethods Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 4040
4141            <Button 
4242                x : Name =" CounterBtn" 
43-                 Text =" {Binding ButtonText}" 
44-                 SemanticProperties.Hint=" Counts the number of times you click" 
4543                HorizontalOptions =" Center" 
4644                />
4745
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ protected override void SetupBindings()
1212    { 
1313        Binder . WithControl ( CounterBtn ) 
1414            . For ( c =>  c . BindText ( ) ,  vm =>  vm . ButtonText ) 
15-             . Once ( c =>  c . BindClick ( ) ,  vm =>  vm . ClickCommand ) ; 
15+             . Once ( c =>  c . BindClick ( ) ,  vm =>  vm . ClickCommand ) 
16+             . Once ( c =>  c . BindSemanticHint ( ) ,  vm =>  "Counts the number of times you click" ) ; 
1617
1718        Binder . WithControl ( NumberCounter ) 
19+             . Once ( c =>  c . BindSemanticHeadingLevel ( ) ,  vm =>  SemanticHeadingLevel . Level7 ) 
1820            . For ( c =>  c . BindText ( ) ,  vm =>  vm . Counter ,  c =>  c . ConvertToString ( ) ) ; 
1921
2022        Binder . WithControl ( SecondaryLabel ) 
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ public static partial class ControlBindExtensionMethods
2525    /// <returns>Generic BindableProperty of type ItemsView.</returns> 
2626    public  static Bindings . BindableProperty < IEnumerable < T > >  BindItemsSource < T > ( this  ItemsView  _ )  =>  Bindings . BindableProperty < IEnumerable < T > > . Create ( ItemsView . ItemsSourceProperty ) ; 
2727
28+     // ***** SemanticProperties Bindings ***** 
29+ 
30+     public  static Bindings . BindableProperty < SemanticHeadingLevel >  BindSemanticHeadingLevel ( this  BindableObject  _ )  =>  Bindings . BindableProperty < SemanticHeadingLevel > . Create ( SemanticProperties . HeadingLevelProperty ) ; 
31+     public  static Bindings . BindableProperty < String >  BindSemanticDescription ( this  BindableObject  _ )  =>  Bindings . BindableProperty < String > . Create ( SemanticProperties . DescriptionProperty ) ; 
32+     public  static Bindings . BindableProperty < String >  BindSemanticHint ( this  BindableObject  _ )  =>  Bindings . BindableProperty < String > . Create ( SemanticProperties . HintProperty ) ; 
33+ 
34+ 
2835    // ***** ClickableControl Bindings ***** 
2936
3037    /// <summary> 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments