Custom bindable property in Sfpicker

Hi,
I'm trying to use a bindable property in a custom SfPicker:

public class CustomTimePicker : SfPicker
{
        public static readonly BindableProperty DeviceTimeFormatProperty = BindableProperty.Create("DeviceTimeFormat", typeof(int), typeof(CustomTimePicker), 0);
        public int DeviceTimeFormat
        {
            get { return (int)GetValue(DeviceTimeFormatProperty); }
            set { SetValue(DeviceTimeFormatProperty, value); }
        }
        //...
}

Even if I set the property to 0 or 1, the output that I have derives only from the default value that is 0.

DeviceTimeFormat="0"
DeviceTimeFormat="1"

It's possible to bind a custom property for SfPicker?

Regards,
Vito

3 Replies 1 reply marked as answer

SP Sakthivel Palaniyappan Syncfusion Team September 22, 2020 01:17 PM UTC

Hi Vito,

Greetings from Syncfusion.

We have analyzed your query and checked the reported issue with custom bindable property, but we could not reproduce the issue.  Please find the sample from below that we are tried to reproduce the issue.

Sample link:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerSample-1865905528.zip

Could you please check the issue with the attached sample and let us know whether it is reproduced or not? If the issue was not reproduced in this sample, please update following details?

1. Please share more details about your requirement.
2. Modify the sample based on your application along with replication procedure or provide the sample.

This will be helpful for us to investigate further and provide you a better solution at the earliest.

Regards,
Sakthivel P.
 


Marked as answer

SS Seitron spa September 24, 2020 09:52 AM UTC

Hi,
I saw your example and it works. Probably my binding issue is due to the MvvmCross framework.
Anyway I found a work around which doesn't need the bindable property into the view control, so for the moment I don't think I will go further into the question.
Regards,
Vito


SP Sakthivel Palaniyappan Syncfusion Team September 25, 2020 04:22 AM UTC

Hi Vito,

Thanks for the update.

We are glad to know that you have been resolved the reported issue at your end. Please let us know if you need further assistance on this.

Regards,
Sakthivel P.
 


Loader.
Up arrow icon