Constraints not working on SfComboBox

Hi,

I am trying to programmatically add constraints to SfCombox. Top, leading and height constraints seems to be working fine. But, the training constraint is not at all working.


I have tried adding the same constraints on a textbox and it worked fine.
Please help me out with this.

3 Replies

PA Paul Anderson S Syncfusion Team September 21, 2018 12:18 PM UTC

Hi Deepa, 
 
Greetings from Syncfusion. 
 
With the given code snippet, we prepared a sample using SfComboBox control and we are unable to reproduce the reported issue from our side. Please find the sample from the below link. 
 
 
Please check our sample and let us know if you have any concerns. If the issue persists in your side, please modify our sample to replicate the issue. So that we can give appropriate solution for this reported issue. 
 
Regards, 
Paul Anderson 



DE Deepa September 25, 2018 12:35 PM UTC

Hi,

Thanks for the reply.

Basically my requirement is that i want the sfcombobox to be at the center of the screen irrespective of the device size.

I tried your sample. It works fine the portrait mode:

but in landscape it looks like :


I want the combobox to be at the center in landscape mode also.

Please help.



MS Mugundhan Saravanan Syncfusion Team September 26, 2018 12:53 PM UTC

Hi Deepa,

We have prepared a sample and tried to meet your requirement. In the sample, we have updated the Frame of SfComboBox based on device size when it is rotated and rotation is notified by an observer registered to the NSNotificationCenter. Please find code snippet and sample given below:

void DeviceRotated(NSNotification notification)
        {
            
if(UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.Portrait)
            {
                combobox.Frame = 
new CoreGraphics.CGRect(25100this.View.Frame.Width - 5040);
            }
            
else if(UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeLeft || UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeRight)
            {
                combobox.Frame = 
new CoreGraphics.CGRect(25100this.View.Frame.Width - 5040);
            }
        }
 
 
We have modified the sample for the same. please download it from the link given below.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBoxSample637726011

Please let us know if you have any concern about this.

Regards,
Mugundhan S.

Loader.
Up arrow icon