This repository has been archived by the owner on May 1, 2024. It is now read-only.
[iOS] Implemented SelectedTintColor and UnselectedTintColor for iOS #3519
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
065ea56
Merge pull request #2 from xamarin/master
jfversluis ebfce28
Merge pull request #3 from xamarin/master
jfversluis 9aba72a
Merge pull request #4 from xamarin/master
jfversluis 33b9a88
Merge pull request #5 from xamarin/master
jfversluis e0014f2
Merge pull request #6 from xamarin/master
jfversluis 195f788
Implemented SelectedTintColor and UnselectedTintColor for iOS
jfversluis a58adcc
UnselectedTintColor only for iOS 10 and up
jfversluis File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/TabbedPage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific | ||
{ | ||
using FormsElement = Forms.TabbedPage; | ||
|
||
public static class TabbedPage | ||
{ | ||
public static readonly BindableProperty UnselectedTintColorProperty = | ||
BindableProperty.Create("UnselectedTintColor", typeof(Color), | ||
typeof(TabbedPage), Color.Default); | ||
|
||
public static Color GetUnselectedTintColor(BindableObject element) | ||
{ | ||
return (Color)element.GetValue(UnselectedTintColorProperty); | ||
} | ||
|
||
public static void SetUnselectedTintColor(BindableObject element, Color value) | ||
{ | ||
element.SetValue(UnselectedTintColorProperty, value); | ||
} | ||
|
||
public static IPlatformElementConfiguration<iOS, FormsElement> SetUnselectedTintColor(this IPlatformElementConfiguration<iOS, FormsElement> config, Color value) | ||
{ | ||
SetUnselectedTintColor(config.Element, value); | ||
return config; | ||
} | ||
|
||
public static Color GetUnselectedTintColor(this IPlatformElementConfiguration<iOS, FormsElement> config) | ||
{ | ||
return GetUnselectedTintColor(config.Element); | ||
} | ||
|
||
public static readonly BindableProperty SelectedTintColorProperty = | ||
BindableProperty.Create("SelectedTintColor", typeof(Color), | ||
typeof(TabbedPage), Color.Default); | ||
|
||
public static Color GetSelectedTintColor(BindableObject element) | ||
{ | ||
return (Color)element.GetValue(SelectedTintColorProperty); | ||
} | ||
|
||
public static void SetSelectedTintColor(BindableObject element, Color value) | ||
{ | ||
element.SetValue(SelectedTintColorProperty, value); | ||
} | ||
|
||
public static IPlatformElementConfiguration<iOS, FormsElement> SetSelectedTintColor(this IPlatformElementConfiguration<iOS, FormsElement> config, Color value) | ||
{ | ||
SetSelectedTintColor(config.Element, value); | ||
return config; | ||
} | ||
|
||
public static Color GetSelectedTintColor(this IPlatformElementConfiguration<iOS, FormsElement> config) | ||
{ | ||
return GetSelectedTintColor(config.Element); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if you want to return to the default color? you will need to save the default color of the platform and use it when the Color is set to Default. and had change before.