Skip to content

Commit

Permalink
Dropdown improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Aug 4, 2018
1 parent b409c49 commit d02c27f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion InputKit.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<id>Xamarin.Forms.InputKit</id>

<!-- The package version number that is used when resolving dependencies -->
<version>2.2.0</version>
<version>2.2.1</version>

<!-- Authors contain text that appears directly on the gallery -->
<authors>Enis Necipoglu</authors>
Expand Down
Binary file modified InputKit/Resources/drawable-hdpi/arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified InputKit/Resources/drawable-xhdpi/arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified InputKit/Resources/drawable-xxhdpi/arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified InputKit/Resources/drawable-xxxhdpi/arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion InputKit/Resources/drawable/arrow_down.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"><path android:fillColor="#FF000000" android:pathData="M7,10l5,5 5,-5z" /></vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="36dp" android:height="36dp" android:viewportWidth="24.0" android:viewportHeight="24.0"><path android:fillColor="#FF000000" android:pathData="M7,10l5,5 5,-5z" /></vector>
11 changes: 9 additions & 2 deletions InputKit/Shared/Controls/Dropdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Dropdown()
pMenu.OnItemSelected += Menu_Item_Selected;
UpdateMainText();
}

public event EventHandler ValidationChanged;
#region SelectionRegion
private void Menu_Requested(object sender, EventArgs e)
{
Expand Down Expand Up @@ -128,8 +128,15 @@ public void DisplayValidation()
public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem), typeof(object), typeof(Dropdown), null, BindingMode.TwoWay, propertyChanged: (bo, ov, nv) => (bo as Dropdown).UpdateSelected());
public new static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(Dropdown), Color.White, propertyChanged: (bo, ov, nv) => (bo as Dropdown).BackgroundColor = (Color)nv);
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(Dropdown), GlobalSetting.TextColor, propertyChanged: (bo, ov, nv) => (bo as Dropdown).UpdateMainText());
public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(Dropdown), propertyChanged: (bo, ov, nv) => (bo as Dropdown).Title = (string)nv);
public static readonly BindableProperty IconImageProperty = BindableProperty.Create(nameof(IconImage), typeof(string), typeof(Dropdown), propertyChanged: (bo, ov, nv) => (bo as Dropdown).IconImage = (string)nv);
public static readonly BindableProperty AnnotationColorProperty = BindableProperty.Create(nameof(AnnotationColor), typeof(Color), typeof(Dropdown), GlobalSetting.Color, propertyChanged: (bo, ov, nv) => (bo as Dropdown).AnnotationColor = (Color)nv);
public static readonly BindableProperty TitleColorProperty = BindableProperty.Create(nameof(TitleColor), typeof(Color), typeof(Dropdown), GlobalSetting.TextColor, propertyChanged: (bo, ov, nv) => (bo as Dropdown).TitleColor = (Color)nv);
public static readonly BindableProperty BorderColorProperty = BindableProperty.Create(nameof(BorderColor), typeof(Color), typeof(Dropdown), GlobalSetting.BorderColor, propertyChanged: (bo, ov, nv) => (bo as Dropdown).BorderColor = (Color)nv);
public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(Dropdown), null, propertyChanged: (bo, ov, nv) => (bo as Dropdown).Placeholder = (string)nv);
public static readonly BindableProperty IsRequiredProperty = BindableProperty.Create(nameof(IsRequired), typeof(bool), typeof(Dropdown), false, propertyChanged: (bo, ov, nv) => (bo as Dropdown).IsRequired = (bool)nv);
public static readonly BindableProperty ValidationMessageProperty = BindableProperty.Create(nameof(ValidationMessage), typeof(string), typeof(Dropdown), false, propertyChanged: (bo, ov, nv) => (bo as Dropdown).ValidationMessage = (string)nv);
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
public event EventHandler ValidationChanged;
#endregion
}
}
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

[![Build status](https://ci.appveyor.com/api/projects/status/st6lcbts9bkhxqub?svg=true)](https://ci.appveyor.com/project/enisn/xamarin-forms-inputkit)
[![CodeFactor](https://www.codefactor.io/repository/github/enisn/xamarin.forms.inputkit/badge)](https://www.codefactor.io/repository/github/enisn/xamarin.forms.inputkit)
<a href="https://www.nuget.org/packages/Xamarin.Forms.InputKit/"><img src="https://img.shields.io/badge/Nuget-2.2s.0-blue.svg" /></a>
<a href="https://www.nuget.org/packages/Xamarin.Forms.InputKit/"><img src="https://img.shields.io/badge/Nuget-2.2.1-blue.svg" /></a>
<a href="https://github.com/enisn/Xamarin.Forms.InputKit/wiki"> <img src="https://img.shields.io/badge/Visit-WiKi-orange.svg"/></a>
<p>
<b>Nuget Package Available: </b> : <a href="https://www.nuget.org/packages/Xamarin.Forms.InputKit/"><img source="http://enisnecipoglu.com/Plugins/inputkit.png" height="15" />Xamarin.Forms.InputKit on NuGet</a>
Expand Down Expand Up @@ -69,7 +69,17 @@
</ContentPage>
```
<br />
<table>
<tr>
<td>
<img src="https://scontent-frx5-1.xx.fbcdn.net/v/t1.15752-9/37154277_2011557202188716_8748276176344055808_n.png?_nc_cat=0&oh=f180f20ac9e89598fbbbc5e255aea5a0&oe=5BE4FF53" alt="Xamarin Forms CheckBox Input Kit Enis Necipoglu" width="270" height="480" class="aligncenter size-medium wp-image-996" />
</td>
<td>
<img src="https://camo.githubusercontent.com/7aa6b380224413dc27770e8305d3d60856f17e1f/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f424c6a655a5574494442753764474d5270562f67697068792e676966" alt="Xamarin Forms CheckBox Input Kit Enis Necipoglu" width="270" height="480" class="aligncenter size-medium wp-image-996" />
</td>
</tr>
</table>

<h4>PROPERTIES:</h4>
<ul>
<li><strong>CheckChanged:</strong> <em>(Event)</em> Invokes when check changed.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,8 @@
<Name>Sample.InputKit</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable-xxxhdpi\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
8 changes: 8 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ If doesn't exits alert icon won't be displayed.



-------------------Dropdown-Arrow-Icon----------------------------------
((Only iOS))

Your **iOS Project** resources must contain 36pt arrow_down.png to display arrow down icon on Dropdown!
If doesn't exits arrow down icon won't be displayed.
------------------------------------------------------------------------------


--------------EASY--DESIGNING----------------

If you want to set all the controls in your app you can use GlobalSettings for this package.
Expand Down

0 comments on commit d02c27f

Please sign in to comment.