Coder Social home page Coder Social logo

enisn / xamarin.forms.inputkit Goto Github PK

View Code? Open in Web Editor NEW
574.0 26.0 98.0 24.32 MB

CheckBox, Radio Button, Labeled Slider, Dropdowns etc.

License: MIT License

C# 100.00%
xamarin xamarin-forms radio-buttons checkbox slide nuget validation annotation

xamarin.forms.inputkit's Introduction

InputKit

CheckBox, RadioButton, Advanced Entry, Advanced Slider etc.


Build status CodeFactor Nuget Nuget
Sparkline



Getting Started with InputKit on MAUI

  • Install InputKit.Maui package from NuGet.

  • Go to your MauiProgram.cs file and add following line:

    builder
    .UseMauiApp<App>()
    .ConfigureMauiHandlers(handlers =>
    {
        // Add following line:
        handlers.AddInputKitHandlers(); // πŸ‘ˆ
    })
                            
  • Read the documentation for further information.


Getting Started with InputKit on Xamarin Forms


CheckBox

A checkbox control that is useful, customizable, full-featured, fully-bindable and easy to use.


Xamarin Forms CheckBox Input Kit Enis Necipoglu Xamarin Forms CheckBox Input Kit Enis Necipoglu Xamarin Forms CheckBox Input Kit Enis Necipoglu

RadioButton

A radio button control that is useful, customizable, full-featured, fully-bindable and easy to use.

Xamarin Forms MAUI RadioButton Input Kit Enis Necipoglu Xamarin Forms CheckBox Input Kit Enis Necipoglu Xamarin Forms Radio Button Input Kit Enis Necipoğlu

Advanced Entry

This entry has many features to develop your applications quickly. When this entry is completed, it finds the next entry in the Parent layout and focuses it. AdvancedEntry contains a validation system inside it. You can set some properties to validate it and you can handle whether all your entries are validated or not with FormView. You can set validation message and AnnotatinColor. Entry will automatically display your message when it's not validated.

Xamarin Forms Slider Sticky Label

PROPERTIES:

  • Text: (string) Text of user typed
  • Title: (string) Title will be shown top of this control
  • IconImage: (string) Icons of this Entry. Icon will be shown left of this control
  • IconColor: (Color) Color of Icon Image. IconImage must be a PNG and have Alpha channels. This fills all not-Alpha channels one color. Default is Accent
  • Placeholder: (string) Entry's placeholder.
  • MaxLength: (int) Text's Maximum length can user type.
  • MinLength: (int) Text's Minimum length to be validated.
  • AnnotationMessage: (string) This will be shown below title. This automaticly updating. If you set this manually you must set true IgnoreValidationMessage !!! .
  • AnnotationColor: (Color) AnnotationMessage's color..
  • Annotation: (Enum) There is some annotation types inside in kit.
  • IsDisabled: (bool) Sets this control disabled or not.
  • IsAnnotated: (bool) Gets this control annotated or not. Depends on Annotation
  • IsRequired: (bool) IValidation implementation. Same with IsAnnotated
  • ValidationMessage: (string) This is message automaticly displayed when this is not validated. **Use this one instead of annotationmessage**
  • IgnoreValidationMessage: (bool) Ignores automaticly shown ValidationMessage and you can use AnnotationMessage as custom.
  • CompletedCommand: (ICommand) Executed when completed.

SelectionView

Presents options to user to choose. This view didn't created to static usage. You should Bind a model List as ItemSource, or if you don't use MVVM you can set in page's cs file like below. (You can override ToString method to fix display value or I'll add displayMember property soon.)

SAMPLE:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Sample.InputKit"
             xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
             x:Class="Sample.InputKit.MainPage">

    <StackLayout Spacing="12" Padding="10,0" VerticalOptions="CenterAndExpand">

        <input:SelectionView x:Name="selectionView" />

    </StackLayout>
</ContentPage>
public partial class MainPage : ContentPage
	{
		public MainPage()
		{
			InitializeComponent();
            selectionView.ItemSource = new[]
            {
                "Option 1","Option 2","Option 3","Option 4","Option 5","Option 6","Option 7","Option 8"
            };
		}
	}

Xamarin Forms SelectionView Enis Necipoglu

You may use a object list as ItemSource, You can make this. Don't forget override ToString() method in your object.

sample object:

  public class SampleClass
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public override string ToString() => Name;
    }

Usage:

public partial class MainPage : ContentPage
	{
		public MainPage()
		{
			InitializeComponent();
           selectionView.ItemSource = new[]
            {
                new SampleClass{ Name = "Option 1", Id = 1 },
                new SampleClass{ Name = "Option 2", Id = 2 },
                new SampleClass{ Name = "Option 3", Id = 3 },
                new SampleClass{ Name = "Option 4", Id = 4 },
                new SampleClass{ Name = "Option 5", Id = 5 },
                new SampleClass{ Name = "Option 6", Id = 6 },
                new SampleClass{ Name = "Option 7", Id = 7 },
                new SampleClass{ Name = "Option 8", Id = 8 },
            };
		}
	}

PROPERTIES:

  • ItemSource: (IList) List of options
  • SelectedItem: (object) Selected Item from ItemSource
  • ColumnNumber: (int) Number of columng of this view

AutoCompleteEntry

Alternative picker with dropdown menu. ( Xamarin Forms only )

 <input:AutoCompleteEntry Title="Type something below:"
                          ItemsSource="{Binding MyList}" 
                          SelectedItem="{Binding SelectedItem}" />
Xamarin Forms Slider Sticky Label Xamarin Forms Slider Sticky Label

PROPERTIES:

  • Placeholder: (string) Placehodler Text
  • Title: (string) Title will be shown top of this control
  • IconImage: (string) Icons of this Entry. Icon will be shown left of this control
  • Color: (Color) Color of Icon Image. IconImage must be a PNG and have Alpha channels. This fills all not-Alpha channels one color. Default is Accent
  • ValidationMessage: (string) This is message automaticly displayed when this is not validated. **Use this one instead of annotationmessage**
  • AnnotationColor: (Color) AnnotationMessage's color..
  • IsRequired: (bool) IValidation implementation. Same with IsAnnotated
  • ItemsSource: (IList) Suggestions items

To be added...


Dropdown ( Experimental )

Alternative picker with dropdown menu. _(Xamarin Forms only)_

SAMPLE:

 <input:Dropdown Title="Chosse an option below:"
                            TitleColor="Black"
                            ValidationMessage="This field is required" 
                            AnnotationColor="Accent" 
                            IsRequired="True" 
                            BorderColor="Black" 
                            Color="BlueViolet"
                            Placeholder="Choose one" 
                            ItemsSource="{Binding MyList}" 
                            SelectedItem="{Binding SelectedItem}" />

Xamarin Forms Slider Sticky Label

PROPERTIES:

  • Placeholder: (string) Placehodler Text
  • Title: (string) Title will be shown top of this control
  • IconImage: (string) Icons of this Entry. Icon will be shown left of this control
  • Color: (Color) Color of Icon Image. IconImage must be a PNG and have Alpha channels. This fills all not-Alpha channels one color. Default is Accent
  • ValidationMessage: (string) This is message automaticly displayed when this is not validated. **Use this one instead of annotationmessage**
  • AnnotationColor: (Color) AnnotationMessage's color..
  • IsRequired: (bool) IValidation implementation. Same with IsAnnotated

Advanced Slider

Xamarin Forms Slider works a Sticky label on it. Wonderful experience for your users.

SAMPLE:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Sample.InputKit"
             xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
             x:Class="Sample.InputKit.MainPage">

    <StackLayout Spacing="12" Padding="10,0" VerticalOptions="CenterAndExpand">

        <input:AdvancedSlider MaxValue="5000" MinValue="50" StepValue="50" ValuePrefix="Price:" ValueSuffix="€" Title="Choose Budget:"/>

    </StackLayout>

</ContentPage>

Xamarin Forms Slider Sticky Label

PROPERTIES:

  • Value: (double) Current Selected Value, (this can be used TwoWayBinding)
  • Title: (string) Title of slider
  • ValueSuffix: (string) Suffix to be displayed near Value on Floating Label
  • ValuePrefix: (string) Prefix to be displayed near Value on Floating Label
  • MinValue: (double) Sliders' minimum value
  • MaxValue: (double) Sliders' maximum value
  • MaxValue: (double) Sliders' increment value
  • TextColor: (Color) Color of Texts
  • DisplayMinMaxValue: (bool) Visibility of Minimum and Maximum value

Did you like ?

Buy Me A Coffee

Your coffee keeps me awake while developing projects like this. πŸ‘β˜•


xamarin.forms.inputkit's People

Contributors

acuntex avatar anderslm avatar antosubash avatar bassam8642 avatar crobibero avatar damiansikora85 avatar devinzhou102 avatar enisn avatar hongyue avatar james-aidoo avatar juanoxt890 avatar kilimnik avatar maxkoshevoi avatar mikebaumannch avatar mphill avatar pikausp avatar pmahend1 avatar scarlettcode avatar vchelaru avatar vnwonah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin.forms.inputkit's Issues

UWP Dropdown Implement not working

I have recently tried out the latest release 2.3.4 and used the Dropdown control on UWP without success. The control does not render or error in any manner
The same control as seen on Android works as expected.

UWP CheckBox needs tap on text to toggle

Using nuget package Xamarin.Forms.InputKit Version 2.3.4, you need to tap on the text of a combobox to make it togle.
tapping on the box does nothing.
works fine on iOS/Droid.

New Controls on V3

I need some feedback to generate new control on V3.

Which type of data you need to get from users?
or
Which controls can be added into this package on newer versions?

Version 2.3.1 throwing exception: Android.Views.InflateException

New version 2.3.1 is throwing exception:

Android.Views.InflateException: Binary XML file line #14: Failed to resolve attribute at index 1: TypedValue{t=0x2/d=0x7f0100a0 a=-1}

Having rolled back to version 2.3.0 issue went away.

Latest Xamarin.Forms 3.2.0.839982.

Target android Version 9.0 (28)
Min Android Version 5.0 (21)
Compile using Android Version 9.0 (28)

Device API is 7.1.1

Value each time I slide

How do I get the value each time I slide the slider?

Value = "{Binding Path = Status, Mode = TwoWay}" // XAML

public double Status {get; set; }
public MainPage ()
{// CODEBH
var x = this.Status;
}

Greetings.

Unable to Add Nuget package to my project

I am using VS 2015 and nuget successfully install on Android and iOS but getting issue on PCL

Getting issue: Could not install package 'Xamarin.Forms.InputKit 0.9.8'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

RadioButton Property "Value" bind Xamarin.Forms.Binding.

My Question Here?

How to bind some value to RadioButton property Value.

Also I tried that:

Whenever I bind something to value property it will always bind Xamarin.Forms.Binding object.
On Clicked or ClickCommand in Value property always get Xamarin.Forms.Binding object

   <input:RadioButton Text="{Binding Name}" Value="{Binding Hobby}" />

Color property not being honored for dropdown option.

Color property not being honored for dropdown option.

When setting the color to something like Green, I keep getting the red color it defaults with. Doesn't seem to honor the Color property.

<input:Dropdown Title="Chosse an option below:" AnnotationColor="Accent" BorderColor="Black" IconImage="icon.png" IsEditable="False" IsRequired="True" ItemsSource="{Binding MyList}" Placeholder="Choose one" SelectedItem="{Binding SelectedItem}" TitleColor="Black" ValidationMessage="This field is required" Color="Green" />

This is the xaml and should override the red color being displayed. Ignore the actual image I am using the sample and set the IconImage as icon.png for simplicity but would still expect image color to change to black.

device-2018-09-28-114950

how to implement flow direction RTL in placeholder in AdvancedEntry ?

My Question Here ?

I want to implment Flow direction RTL in placeholder in AdvancedEntry control , It doesn't work if i used it's property

Also I tried that:

                                        <input:AdvancedEntry IconImage="message.png" FlowDirection="{Binding Flow,Mode=TwoWay}" Padding="0" IconColor="Black" x:Name="Email" Margin="0" BorderColor="White" TextColor="Black" Text="{Binding Email, Mode=TwoWay}" PlaceholderColor="Black" CornerRadius="0" Placeholder=" Enter Your Mail" HorizontalOptions="Fill"/>

AdvancedEntry cannot be changed from AnnotationType.Password to a different value

Setting AnnotationType on AdvancedEntry to 'Password' will effectively hide the contents of the entry with black dots but if you change the AnnotationType at runtime to a different value, the entry contents remain as black dots.

Envision a scenario where the AdvancedEntry is used to enter a password and the AnnotationType property is data-bound with a default value of Password. The user taps an 'eye' icon to toggle the display of the password value. The toggle operation should be able to simply change the AnnotationType value but this fails.

The problem is identified in the UpdateKeyboard() method. This works fine when first setting the AnnotationType to password and txtInput.IsPassword is set to true . But from that point on txtInput will always have its IsPassword property set to true. It is never set to false for the other annotation types and so the entry will always display black dots.

Dropdown not working iOS: Could not initialize an instance of the type 'UIKit.UIImage'

Hi there the Dropdown is throwing the exception when trying to display the Dropdown on iOS

System.Exception: Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.

2018-10-05 12:36:04.920 XeniaGuestAppii.iOS[408:62118] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/9 Unhandled Exception:
System.Exception: Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
at Foundation.NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) [0x000a8] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:504
at UIKit.UIImage..ctor (System.String filename) [0x00023] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIImage.g.cs:103
at Plugin.InputKit.Platforms.iOS.IconViewRenderer.SetImage (Plugin.InputKit.Shared.Controls.IconView previous) [0x00023] in :0
at Plugin.InputKit.Platforms.iOS.IconViewRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.Elem
entChangedEventArgs1[TElement] e) [0x0003f] in <e65f6656247d426eb1caf6d6764e20a9>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x0012a] in <02d849b2e21741169c7b5bbc798a23d0>:0

Dropdown needs binding for AnnotationColor

These are really nice controls and I appreciate the on-going maintenance. I've noticed the AdvancedEntry control has a binding for AnnotationColor but the Dropdown does not. Can this be added? Thanks!

Add a label to RadioButtonGroupView

How to add a label to RadioButtonGroupView?

input:RadioButtonGroupView

<Grid.ColumnDefinitions>


</Grid.ColumnDefinitions>
<input:RadioButton Text="Option 1" CircleColor="#55B778" Grid.Column="0" Grid.Row="0"/>
Price

</input:RadioButtonGroupView>

I've tried adding radio buttons and labels to a grid and then adding the grid to RadioButtonGroupView, but it allows all the radio buttons to be checked in the group.

Any suggestion would be appreciated.

Dropdown occurs ArgumentOutOfRangeException

I want to use Dropdown, but I got ArgumentOutOfRangeException when choose item from dropdown list. Tap Dropdown control, shown dropdown list, tap item in that list, occurs exception.
I cannot find my bugs. Please tell me solution.

I tried Xamarin.Forms.Picker using same ItemsSource and SelectedItem binding. I succeeded.
I set two items in dropdown list, which item, I got same result.
I tried change type of PickerSelected property ReactiveProperty<PickerItem> to normal PickerItem, or PickerData property ObservableCollection<PickerItem> to List<PickerItem>, same result.
What did I mistake?

XAML:

        <ContentPage x:Name="pag_SettingsView" Title="SettingsView" Padding="0, 40, 0, 0">
            <StackLayout>
                <input:Dropdown BorderColor="Green" HorizontalOptions="EndAndExpand" ItemsSource="{Binding PickerData}" SelectedItem="{Binding PickerSelected.Value}"/>
            </StackLayout>
        </ContentPage>

C#:

        public ReactiveProperty<PickerItem> PickerSelected { get; } = new ReactiveProperty<PickerItem>();
        public ObservableCollection<PickerItem> PickerData { get; } = new ObservableCollection<PickerItem>();`

            PickerData.Add(new PickerItem { Title = "abc", Value = 1 });
            PickerData.Add(new PickerItem { Title = "def", Value = 2 });

        public class PickerItem
        {
            public string Title { get; set; }
            public int Value { get; set; }

            public override string ToString()
            {
                return Title;
            }
        }

stacktrace:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List1[T].get_Item (System.Int32 index) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:181 at System.Collections.ObjectModel.Collection1[T].System.Collections.IList.get_Item (System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:234
at Plugin.InputKit.Platforms.iOS.MenuEffect+<>c__DisplayClass8_0.b__0 (UIKit.UIAlertAction action) [0x00025] in :0
at ObjCRuntime.Trampolines+SDActionArity1V175.Invoke (System.IntPtr block, System.IntPtr obj) [0x00016] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/ObjCRuntime/Trampolines.g.cs:23059
at at (wrapper native-to-managed) ObjCRuntime.Trampolines+SDActionArity1V175.Invoke(intptr,intptr)
at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:63
at XamarinStudy.iOS.Application.Main (System.String[] args) [0x00001] in /Users/ryu/OneDrive - hk sar baomin inc/Dev/XamarinStudy/XamarinStudy.iOS/Main.cs:17

Change Icon view to support using Images.xassets

Is your feature request related to a problem? Please describe.
When I used an image that is in the Resources/Images.xassets, it threw an error that it was not found.

Describe the solution you'd like
The reason for this is that it is using a fileimageSource when the image is instantiated with this on line 70 of IconViewRenderer.cs:

var uiImage = new UIImage(Element.Source)

To allow the use of the assets file, I changed it to:

UIImage uiImage = UIImage.FromBundle(Element.Source);

This fix seems to work for both files in the Resources folder, as well as the Images.xassets.

I didn't do a pull request with the fix because I had to manually add the controls and classes to my PCL project since Nuget package was for netstandard20.

PlaceholderTextColor - Dropdown

Drop-down component to add ability to change/customize placeholder text color beyond the light gray color it currently defaults with.

Filled Checkbox when selected?

Hey there, thank you for this great library.
I see on the main page that you have a filled checkbox?

checkbox

How do I achieve the same effect?
I want this filled box when selected.

Radio Button Checked Value bahaves differently across the Platforms.

Bug: The value of the Radion Button Checked is different for iOS and Android.
When one attempts to Check a Radio Button using MVVM, the value in Android is true
and the value in iOS is false.
E.g
<controls:RadioButton x:Name="RadioButton"
Color="Black"
CircleColor="Orange"
HorizontalOptions="EndAndExpand"
IsEnabled="{Binding RadioButtonIsEnabled}"
Text=""
IsChecked="{Binding RadioButtonChecked, Mode=TwoWay}"
ClickCommand="{Binding TranslateCommand}">

In the View Model: Android RadioButtonChecked is true
and in iOS RadioButtonChecked is false.

I think they need to both return true, when the user checks the Radio Button.

Radio Button group not working properly inside Scrollview

When I using Radiobuttongroup working correctly in generally but when I using inside scrollview it is not showing selection always keep unselected state only.Please find my structure using below.

The below strucure working fine

< SelectionView SelectionType = "RadioButton" />

Not working inside Scrollview


< SelectionView SelectionType = "RadioButton" />

Issue: Always Kept unselected State.

Dropdown Title - Text size

Hi not sure if its possible but couldnt find a property on the label for the drop down to change the title text size... Can consider exposing this property on the label?

CheckBox Check Changed Event

A feature to do something whenever a checkbox is unchecked or checked would be really nice. I see you have a CheckChangedCommand, but I don't think it's what I'm looking for. Correct me if I'm wrong.

I'm thinking it'd be something like this:
In the Xaml:
<CheckBox x:Name="MyCheckBox" CheckChanged="MyFunction"/>

In the code:
...
public void MyFunction(object sender, EventsArgs e)
{
print("CheckBox checked = ",MyCheckBox.IsChecked)
}
...

Checkbox have unwanted shadow on iOS

Bug : Checkbox shows unwanted shadows around them

To Reproduce : Happens everytime on iOS

Expected behavior : There should be no shadow or an option to toggle shadow

Smartphone (please complete the following information):

  • Device: iPhone 5c
  • OS: iOS 10.3.3
  • InputKit Version : 2.2.1

Screenshot
shadow issue

can't install 2.3.4 to PCL project

Hi,
I tried to install the package to my PCL project, but got issue: Could not install package 'Xamarin.Forms.InputKit 2.3.4'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

It seems the package doesn't support .net framework 4.5. Can the issue be fixed?
Thank you very much.

Change Border Color and remove Border Corner from SelectionView

Hi

Is there a way to remove the border Corner, have a rectangle box for Selection View.
I also want to set the text alignment to Left justification and set the default border color to gray. If the user selects one of the views the color should change to another color.
Please advise.

Thank You

Dropdown cause crash in android5.0

Dropdown cause crash in android5.0
In Android5.0 Dropdown cause crash, the exeption is

Java.Lang.NoSuchMethodError: no non-static method "Landroid/widget/PopupMenu;.setGravity(I)V"

Samples

Can you make a sample of SelectableRadioButton, FormView, IconView and AdvancedEntry ?

        <input:RadioButtonGroupView x:Name="rbgv">
            <input:RadioButton Text="What" Value="What" IsChecked="False"/>
            <input:RadioButton Text="Where" Value="Where" IsChecked="False"/>
            <input:RadioButton Text="When" Value="When" IsChecked="True"/>
            <input:RadioButton Text="Who" Value="Who" IsChecked="False"/>
        </input:RadioButtonGroupView>

        <Label Text="{Binding Source={x:Reference rbgv}, Path=SelectedItem, Mode=TwoWay}" />

In code above, the label doesn't change the item or value(using Path=SelectedItem) when check other RadioButton in same group.

MVVM

I've tried using this with MVVM, using EventToCommand functionality but... to no avail. How?

Horizontal RadioButton

When I try to make RadioButton displayed horizontally, it work like CheckButton..
Small reproduction
RadioButton Broken :

<inputKit:RadioButtonGroupView>
  <Grid>
     <inputKit:RadioButton Text="Choice 1" Grid.Column=0/>
     <inputKit:RadioButton Text="Choice 2" Grid.Column=1/>
     <inputKit:RadioButton Text="Choice 3" Grid.Column=2/>
  </Grid>
</inputKit:RadioButtonGroupView>

Working normally but stay vertical :

<Grid>
  <inputKit:RadioButtonGroupView>
     <inputKit:RadioButton Text="Choice 1" Grid.Column=0/>
     <inputKit:RadioButton Text="Choice 2" Grid.Column=1/>
     <inputKit:RadioButton Text="Choice 3" Grid.Column=2/>
  </inputKit:RadioButtonGroupView>
</Grid>

Dropdown cause crash in iOS

Dropdown cause crash in iOS
After making a selection in dropdown, it cause the exception :

System.InvalidOperationException: Enumeration has either not started or has already finished.

No property, bindable property, or event found for 'ClickCommand', or mismatching type between value and property.

I got an error while trying to bind a command in a radio button:

No property, bindable property, or event found for 'ClickCommand', or mismatching type between value and property.

This is my code:

I import the plugin:
xmlns:controls="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"

I wire my viewmodel:
BindingContext="{Binding FiltersViewModel, Source={StaticResource Locator}}

This is the element which i am trying to add the command:

<controls:RadioButton 
                        Text="1"  
                        Value="{Binding DataAggregation1}" 
                        ClickCommand="{Binding ChangeDataAggregationCommand}"/>

The line where the error occours:
ClickCommand="{Binding ChangeDataAggregationCommand}"/>

The command is an ICommand in my ViewModel:
public ICommand ChangeDataAggregationCommand { get; set; }

The others bindings works fine

Dropdown selection not working on a modal page in iOS

When the page that the dropdown is on a page that is modal, an error is thrown when selecting an item. The reason is that it is not finding the topmost view controller.

I fixed this by changing line 35 in MenuEffect.cs:

RootController = UIApplication.SharedApplication.KeyWindow.RootViewController;

to:

RootViewController = GetVisibleViewController();

And added this function:

UIViewController GetVisibleViewController()
       {
           var rootController = UIApplication.SharedApplication.KeyWindow.RootViewController;

           if (rootController.PresentedViewController == null)
               return rootController;

           if (rootController.PresentedViewController is UINavigationController)
           {
               return ((UINavigationController)rootController.PresentedViewController).VisibleViewController;
           }

           if (rootController.PresentedViewController is UITabBarController)
           {
               return ((UITabBarController)rootController.PresentedViewController).SelectedViewController;
           }

           return rootController.PresentedViewController;
       }

Additional context
Should be easily reproducible by putting on a page and calling it with PushModalAsync()

I didn't do a pull request because I had to manually put the controls into my project since it is using a PCL and not NetStandard2.0.

RadioButtonGroupView IsChecked/Value Bindable Property not working

I'm using version 1.1.1

Here is my XAML code

  <input:RadioButtonGroupView SelectedItem="">
    <input:RadioButton
      IsChecked="{Binding RbCradle, Mode=TwoWay}"
      Text="Cradle"
      TextColor="Black" />
    <input:RadioButton
      IsChecked="{Binding RbWireless, Mode=TwoWay}"
      Text="Wireless"
      TextColor="Black" />
  </input:RadioButtonGroupView>

AND MVVM Backend (Prism.Forms)

private bool _rbCradle;
public bool RbCradle
{
get => _rbCradle;
set => SetProperty(ref _rbCradle, value);
}

private bool _rbWireless;
public bool RbWireless
{
  get => _rbWireless;
  set => SetProperty(ref _rbWireless, value);
}

But value or is selected return always false.
image
image

Android Token is null

in my android app token is always null i write these lines in my start page CrossFirebasePushNotification.Current.RegisterForPushNotifications();
string token = CrossFirebasePushNotification.Current.Token;
but always token is null

'Editable' Drop Down

Describe the solution you'd like
A drop-down which has a property 'Editable' which when set to true would allow the user to enter their own text value. Essentially this would make the component a hybrid between a drop-down / picker and an entry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.