This repository was archived by the owner on May 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +30
-31
lines changed Expand file tree Collapse file tree 5 files changed +30
-31
lines changed Original file line number Diff line number Diff line change 5
5
6
6
namespace Xamarin . CommunityToolkit . Extensions
7
7
{
8
- [ ContentProperty ( nameof ( Text ) ) ]
9
- public class TranslateExtension : IMarkupExtension < BindingBase >
10
- {
11
- public string Text { get ; set ; }
12
- public string StringFormat { get ; set ; }
13
- object IMarkupExtension . ProvideValue ( IServiceProvider serviceProvider ) => ProvideValue ( serviceProvider ) ;
8
+ [ ContentProperty ( nameof ( Text ) ) ]
9
+ public class TranslateExtension : IMarkupExtension < BindingBase >
10
+ {
11
+ public string Text { get ; set ; }
12
+ public string StringFormat { get ; set ; }
13
+ object IMarkupExtension . ProvideValue ( IServiceProvider serviceProvider ) => ProvideValue ( serviceProvider ) ;
14
14
15
- public BindingBase ProvideValue ( IServiceProvider serviceProvider )
16
- {
17
- #if ! NETSTANDARD1_0
15
+ public BindingBase ProvideValue ( IServiceProvider serviceProvider )
16
+ {
17
+ #if ! NETSTANDARD1_0
18
18
var binding = new Binding
19
19
{
20
20
Mode = BindingMode . OneWay ,
@@ -23,9 +23,9 @@ public BindingBase ProvideValue(IServiceProvider serviceProvider)
23
23
StringFormat = StringFormat
24
24
} ;
25
25
return binding ;
26
- #else
27
- throw new NotSupportedException ( ) ;
28
- #endif
29
- }
30
- }
31
- }
26
+ #else
27
+ throw new NotSupportedException ( ) ;
28
+ #endif
29
+ }
30
+ }
31
+ }
Original file line number Diff line number Diff line change @@ -37,4 +37,4 @@ public void Invalidate()
37
37
}
38
38
}
39
39
#endif
40
- }
40
+ }
Original file line number Diff line number Diff line change 1
1
namespace Xamarin . CommunityToolkit . Sample . Models
2
2
{
3
- public readonly struct Language
4
- {
5
- public Language ( string name , string ci )
6
- {
7
- Name = name ;
8
- CI = ci ;
9
- }
10
- public string Name { get ; }
11
- public string CI { get ; }
12
- }
13
- }
14
-
3
+ public readonly struct Language
4
+ {
5
+ public Language ( string name , string ci )
6
+ {
7
+ Name = name ;
8
+ CI = ci ;
9
+ }
10
+ public string Name { get ; }
11
+ public string CI { get ; }
12
+ }
13
+ }
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ public SettingPage()
12
12
async void OnCloseClicked ( object sender , EventArgs e )
13
13
=> await Navigation . PopModalAsync ( ) ;
14
14
}
15
- }
15
+ }
Original file line number Diff line number Diff line change @@ -44,5 +44,5 @@ void LoadLanguages()
44
44
} ;
45
45
SelectedLanguage = SupportedLanguages . FirstOrDefault ( pro => pro . CI == LocalizationResourceManager . Current . CurrentCulture . TwoLetterISOLanguageName ) ;
46
46
}
47
- }
48
- }
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments