gruan01 / xfcontrols Goto Github PK
View Code? Open in Web Editor NEWXamarin.Forms Custom Control
License: GNU General Public License v3.0
Xamarin.Forms Custom Control
License: GNU General Public License v3.0
Why the Label is made private read only ?
I need to resize the text of the checkbox. Is there another solution other change Label to public because it breaks the library code. Thanks.
Hi,
The following will not work'with a MVVM binding.
RadioSize="{Binding rdSize}"
Please update/resolve.
when i used this plugin namespace is not found inside the main activity class
error CS0246: The type or namespace name 'AsNum' could not be found (are you missing a using directive or an assembly reference?)
Hi @gruan01 . When i rotate phone, tapping checkbox gives no response. Is there a fix for this? or did i do something wrong? Also can i changed the color when checked?
Thank you and appreciate the work
Hi @gruan01 . Do you think to create a nuget package?
how to get selected data from radiogroup?
Sample code :
public class WithoutXAML : ContentPage {
public WithoutXAML() {
var RadioGroupSource = new List<RadioItem>() {
new RadioItem() {ID = 0, Name = "Hi" },
new RadioItem() {ID = 1, Name="123" },
new RadioItem() {ID = 2, Name = "Hello" }};
var radioButton = new RadioGroup() {
ItemsSource = RadioGroupSource,
DisplayPath = "Name",
Orientation = StackOrientation.Vertical
};
this.Content = new StackLayout {
Children = {
radioButton
}
};
}
}
Reason :
Because when ItemsSource bind, DisplayPath is null, so Label text use XXX.ToString() to instead.
protected virtual Radio GetRadio(object data) {
Radio item = null;
if (data is Radio) {
item = (Radio)data;
} else {
item = new Radio();
item.Value = data;
if (!string.IsNullOrWhiteSpace(this.DisplayPath)) {
item.SetBinding(Radio.TextProperty, new Binding(this.DisplayPath, source: data));
} else
item.Text = data.ToString();
}
...
...
It's a bug.
If you want use it now, you can simple move DisplayPath assign before ItemsSource assign
var radioButton = new RadioGroup() {
DisplayPath = "Name", //<----- assign value before ItemsSource
ItemsSource = RadioGroupSource,
//DisplayPath = "Name",
Orientation = StackOrientation.Vertical
};
Any chance of a version happy with .NET Standard?
I added XFControl Radio Button in my project. And after that, I seem to have issues with the frame corner radius in all the iOS devices for my Xamarin Forms project.
There is no change in Corner Radius even when I set values to it. It stays the same.
Are you doing any frame renderers? I think it's affecting all frames. Please do the fix.
Hi @gruan01 great work.
Now with flip demo you should add 1.jpg... to Android solution (files are only on iOS) and rename them in i1.jpg...
Hi @gruan01 Can you check my changes and update the nuspec please? I tried to do that but I dont know if is ok.
Using the following code randomly a checkbox is not visible.
CheckBox myCheckBox = new CheckBox
{
WidthRequest = 35,
Margin = new Thickness(2, 2, 2, 2),
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.StartAndExpand,
HeightRequest = 35,
Checked = isChecked
};
ctrls:Border.CornerRadius
</OnPlatform>
</ctrls:Border.CornerRadius>
</ctrls:Border.CornerRadius>
But its not working. What should i do
Hi,
Please provide a Bindable property as TextColor for the XFControls like RadioGroup, CheckBox and others.
The XAML does not support them at this moment.
( I Extended the Radio and RadioGroup classes for the same property, however I can not make them work with the DynamicResource binding properties e.g. "{DynamicResource ThemeForeGroundColor}" )
N Baua
The example always crash with Xamarin.Forms version 2.3.3.168
Here is the crash log:
System.MissingMethodException: Method 'Xamarin.Forms.Xaml.Internals.SimpleValueTargetProvider..ctor' not found.
[Error] at Xamarin.Forms.ElementTemplate.CreateContent () [0x0002c] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.TemplateUtilities.OnControlTemplateChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x000c5] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x0010e] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindableObject.SetBinding (Xamarin.Forms.BindableProperty targetProperty, Xamarin.Forms.BindingBase binding, System.Boolean fromStyle) [0x000af] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindableObject.SetBinding (Xamarin.Forms.BindableProperty targetProperty, Xamarin.Forms.BindingBase binding) [0x00000] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at AsNum.XFControls.TabView.GetTab (System.Object data, System.Int32 idx) [0x0014b] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.TabView.Add (System.Object d, System.Int32 i) [0x00000] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.TabView.Reset () [0x0003f] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.TabView.<WrapItemsSource>b__91_2 () [0x00000] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.NotifyCollectionWrapper..ctor (System.Object source, System.Action`2[T1,T2] add, System.Action`2[T1,T2] remove, System.Action reset, System.Action finished, System.Action begin) [0x00064] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.TabView.WrapItemsSource () [0x00006] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at AsNum.XFControls.TabView.ItemsSourceChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00007] in <3570d10bb57f44599b511ef50935fac9>:0
[Error] at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x0010e] in <f9095492ed2b43559d0236ac22ab7223>:0
[Error] at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in <f9095492ed2b43559d0236ac22ab7223>:0
I used Flip view it works fine in android but in ios images doesn't displayed in any indicators only the last one if it has more than one image
xamarin forms version 3.1.0.96
HI
How can I modify RadioGroup text font size? Is it possible?
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.