-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to customize the SelectionView #94
Comments
@ronakshethia SelectionView is not a real control. just generates RadioButtons, CheckBoxes or buttons at runtime. It uses Control's default settings. If your SelectionType is CheckBox you can try change -- if you have that: <input:SelectionView ItemsSource="{Binding SampleList}" SelectionType="CheckBox" /> go to your App.cs public App()
{
InitializeComponent();
//also this will changes default values of all checkboxes in your app
Plugin.InputKit.Shared.Controls.CheckBox.GlobalSetting.BorderColor = Color.Blue;
MainPage = new NavigationPage(new Sample.InputKit.MainPage());
} If you havethat: <input:SelectionView ItemsSource="{Binding SampleList}" SelectionType="RadioButton" /> go to your App.cs public App()
{
InitializeComponent();
//also this will changes default values of all radiobuttons in your app
Plugin.InputKit.Shared.Controls.RadioButton.GlobalSetting.BorderColor = Color.Blue;
MainPage = new NavigationPage(new Sample.InputKit.MainPage());
} |
I'm labeling this issue as Enchantment and customizing feature will be added to selectionview |
Thanks it worked for me :) |
@enisn Your solution form above is working, but when I select any RadioButton from SelectionView - style of selected button is going back to default "pink-gray". I have tested it in SelectionView and RadioButtonGroupView with radio buttons, with the same results in both. |
I couldn't get the GlobalSetting to work for me, I need to set it in a Theme Detection class to set colors for Dark mode vs light mode. |
I'm in the same boat as @HelenMamalaki on this. Any work around? |
Me too |
Also, overriding SelectionView is a workaround for now: using Plugin.InputKit.Shared.Abstraction;
using Plugin.InputKit.Shared.Controls;
namespace App3
{
public class MySelectionView : SelectionView
{
public override ISelection GetInstance(object obj)
{
var instance = base.GetInstance(obj);
if (instance is Plugin.InputKit.Shared.Controls.CheckBox checkBox)
{
checkBox.BoxSizeRequest = 18;
checkBox.TextFontSize = 22;
checkBox.SetDynamicResource(Plugin.InputKit.Shared.Controls.CheckBox.IconColorProperty, "SecondaryColor");
}
return instance;
}
}
} |
i am not able to change the color of radio circle and also not able to resize the font of the radio button could u please provide that functionality
The text was updated successfully, but these errors were encountered: