messier16 / forms.controls_deprecated Goto Github PK
View Code? Open in Web Editor NEWHome of all Messier16 Xamarin.Forms controls :grin:
Home of all Messier16 Xamarin.Forms controls :grin:
Hi,
This plugin is very very helpful.
But somehow I am unable to retrieve rating value after clicking on star.
I tried PropertyChanged event. But it's not hitting when I click on star image.
I downloaded git sample and checked. It's not changing it's value there when rating value is changed
Could anyone help me with this?
=====update====================
I just checked that it's working for IOS. But in droid project, I noticed that in RatingBarRenderer OnElementPropertyChanged function is commented.
May be that's why it's not working of droid.
Also in Messier16RatingBar class Rating is not public.
EDStarRating is only present in IOS. What about Droid?
Im having a RatingBar inside every ViewCell for my ListView with CachingStategy set to RecycleElement. Im binding to Rating property and initially everything is fine, but after scrolling my list a few times ratings are messed up.
Any warkaround?
I think I have found two bugs with the visualization of the checkbox on UWP.
Here is the XAML:
<messier16:Checkbox Checked="{Binding Complete}" TickColor="Yellow" CheckboxBackgroundColor="Green" BackgroundColor="Transparent" WidthRequest="30" HeightRequest="30" />
And here is how it looks like:
As you can see the colors are not respected. (They work fine on iOS and Android)
The second problem is that checkboxes that are checked at startup have a checkmark (Subtask 0) but when you toggle one at runtime it just fills with color (Subtask 1). If I toggle Subtask 0 off and on, the checkmark disappears.
Let me know if I'm missing something or if you need further info to debug this!
P.S. Thanks for the nice component :)
The author of M13Checkbox has recently rewritten the control in Swift.
I won't hurt to take a look to the new implementation
On Android, seems like the RatingBar control needs to be inside a container (like Grid) to show the right amount of stars.
This wrong behavior appears on the test app.
I setup this example for check box successfully in my project for android in cross plate forms but given an error:
"System.IO.FileNotFoundException: Could not load file or assembly 'Messier16.Forms.Controls' or one of its dependencies"
what should to do ?
Thanks:
You can't interact (check or uncheck) the checkox if it wasn't visible on screen at page load.
This behavior can be reproduced in the sample app.
Hey,
First of all great package ๐ I want to add that on Android when trying to set the checkboxbackgroundcolor or the tickcolor it does not change at all.
It does change to my accent color which is set inside my XML but still I hope you can take a look into this issue :)
Cheers,
Luuk
Hi!
I would like to use the checkbox control in an MVVM app but I couldn't find a Command binding on the control. Is there a way to fire a command when the check status changes passing relavant parameters with it?
Thanks.
Let the user provide an image to set as the "star" for the rating bar.
I got this error when building the Android project after adding the reference 0.2.2:
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1410,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Messier16.Forms.Android.Controls, Version=0.2.2.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1410,2): error : File name: 'Messier16.Forms.Android.Controls.dll'
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1410,2): error : at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1410,2): error : at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1410,2): error : at Xamarin.Android.Tasks.ResolveAssemblies.Execute()
I noticed that the reference file Messier16.Forms.Droid.Controls.dll was marked yellow icon, so I had to remove it and manually added it back using the browser. I used this command in the Package Manager Console: "Install-Package Messier16.Forms.Controls" to add the reference. Do you know why this issue happened?
I'm using listview with checkbox and would like to know if there is anyway to achieve this. Thanks in advance.
I have found an issue with the UWP checkbox where a null exception is being thrown when the page is being closed. The problem is that the OnElementChanged method unconditionally creates a new CheckBox native control if the Coltrol property is null. When the page is being closed and the OnElementChanged method is called, the Control is null but SetNativeControl will fail and throw an exception. I have a proposed fix:
protected override void OnElementChanged(ElementChangedEventArgs<Checkbox> e)
{
base.OnElementChanged(e);
if (e.OldElement != null)
{
// Unsubscribe from event handlers and cleanup any resources
if (Control != null)
{
Control.Checked -= CheckBoxChecked;
Control.Unchecked -= CheckBoxUnchecked;
}
}
if (e.NewElement != null)
{
// Configure the control and subscribe to event handlers
if (Control == null)
{
var checkBox = new CheckBox();
checkBox.IsThreeState = false;
SetNativeControl(checkBox);
}
// You should only create the control once (if Control is null),
// and then you should apply the values of NewElement to that control every time that NewElement is not null. Something like this:
// from: https://forums.xamarin.com/discussion/comment/107477/#Comment_107477
SetSize(e.NewElement.WidthRequest);
Control.IsChecked = e.NewElement.Checked;
Control.IsEnabled = e.NewElement.IsEnabled;
Control.Checked += CheckBoxChecked;
Control.Unchecked += CheckBoxUnchecked;
}
}
If the oldElement is not null but the Control is null, we don't attempt to deregister the event handers. If newElement is not null, but Coltrol is null, we create the native control and set it active. This appears to be similar to the way it is handeled with your iOS implementation.
I'm unable to set rating through binding and through code.
Is this not supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.