tag:blogger.com,1999:blog-13459850.post5163941504374614918..comments2023-10-15T08:07:08.589+00:00Comments on Forwards: Playing with Constraints - FluentConstraints and FluentLayouts for Xamarin.iOSUnknownnoreply@blogger.comBlogger15125tag:blogger.com,1999:blog-13459850.post-89880407665033548742016-11-11T18:17:39.618+00:002016-11-11T18:17:39.618+00:00hello, I got a question, I have something like thi...hello, I got a question, I have something like this:<br /><br />an image centered and below it, and small image of 30 x30 and a textfield,<br />I can center the elements in a scrollview and works great, but i can't manage to resize the textfield when rotation occurs i want 30 pixels to the right and 30 pixels to the small image<br /><br />my constrains are as follow:<br /><br /><br />centeredimage.WithSameCenterX(_scrollView),<br /> centeredimage.AtTopOf(_scrollView, UIApplication.SharedApplication.StatusBarFrame.Height),<br /> centeredimage.Width().EqualTo(100),<br /> centeredimage.Height().EqualTo(100),<br /><br /> imageLogin.Below(centeredimage, padding),<br /> imageLogin.AtLeftOf(_scrollView,50),<br /> imageLogin.Height().EqualTo(30),<br /> imageLogin.Width().EqualTo(30)<br /><br /> inputLogin ????<br /><br />any idea on what contrains are needed?? <br /><br /><br />Anonymoushttps://www.blogger.com/profile/01399788018838083758noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-1342316026891830342016-05-12T10:48:27.587+00:002016-05-12T10:48:27.587+00:00phew... sorry.. had been meaning to reply... in ad...phew... sorry.. had been meaning to reply... in addition to WithMultiplier, I think some of the fluent methods also used to take optional multiplier weight parameters... but they may have since disappeared (Greg and others are doing a fab job keeping this project fluidly moving forwards)Slodgehttps://www.blogger.com/profile/17827379022934338119noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-58129199386869723292016-05-12T10:30:32.961+00:002016-05-12T10:30:32.961+00:00correction to previous comment, it should have sai...correction to previous comment, it should have said LessThanOrEqualTo:<br /><br />view.Width().LessThanOrEqualTo(0).WidthOf(view.Superview).WithMultiplier(75 / 100).SetPriority(1000)Anonymoushttps://www.blogger.com/profile/15219919679442053818noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-58654583485028141852016-05-12T10:28:48.645+00:002016-05-12T10:28:48.645+00:00I managed this Stuart, I wasn't aware of the W...I managed this Stuart, I wasn't aware of the WithMultiplier method. I wrote this to achieve it:<br /><br />view.Width().GreaterThanOrEqualTo(0).WidthOf(view.Superview).WithMultiplier(75 / 100).SetPriority(1000)<br />Anonymoushttps://www.blogger.com/profile/15219919679442053818noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-72945309614127987142016-05-10T16:16:43.381+00:002016-05-10T16:16:43.381+00:00Stuart, been using this library for a few years no...Stuart, been using this library for a few years now, thanks. But recently ive needed to specify multiplier values. Can multiplier values be specified somehow? <br /><br />im trying to set a view to have a width of less than or equal to 75% of its parent view. e.g. an equal width constraint to its parent but with a multiplier of 0.75.Anonymoushttps://www.blogger.com/profile/15219919679442053818noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-23005978682449968822016-02-21T18:25:03.418+00:002016-02-21T18:25:03.418+00:00This is wonderful and definitely the quickest way ...This is wonderful and definitely the quickest way of writing layouts. Thank you!Unknownhttps://www.blogger.com/profile/09959839434730337412noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-73217836009235804082015-07-20T15:48:29.735+00:002015-07-20T15:48:29.735+00:00Were you ever able to remove a constraint?Were you ever able to remove a constraint?Anonymoushttps://www.blogger.com/profile/06607854903067960342noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-57633768629945743902015-05-05T15:46:40.209+00:002015-05-05T15:46:40.209+00:00Microsoft's Windows 10 Relative Panels for xam...Microsoft's Windows 10 Relative Panels for xaml look verrrry similar to what you have written here http://channel9.msdn.com/Series/Developers-Guide-to-Windows-10-Preview/08<br />Anonymoushttps://www.blogger.com/profile/15219919679442053818noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-89785036025740713962014-02-26T14:53:26.802+00:002014-02-26T14:53:26.802+00:00Really great Job, thank you.
But Is there a way to...Really great Job, thank you.<br />But Is there a way to remove a constraint by using the fluentlayout-library?<br /><br />I have already tried it with this code, but it doesn't work:<br /><br />this.View.Superview.AddConstraints(this.View.AtLeftOf(this.View.Superview).ToLayoutConstraints().ToArray());<br /><br />this.View.Superview.RemoveConstraints(this.View.AtLeftOf(this.View.Superview).ToLayoutConstraints().ToArray());<br />Anonymoushttps://www.blogger.com/profile/04396808881518041796noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-1771288654927681232013-08-09T16:31:30.110+00:002013-08-09T16:31:30.110+00:00Just finished migrating my code-only layouts from ...Just finished migrating my code-only layouts from XibFree to AutoLayout using your FluentLayout extension. Around 50% less LoC and much more readability!<br /><br />And finally got rid of XibFree NativeView subclasses.Redenthttps://www.blogger.com/profile/01145080936492347675noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-74101789718217259002013-08-06T12:31:19.916+00:002013-08-06T12:31:19.916+00:00The holy grail is a cross-platform tool. I'm s...The holy grail is a cross-platform tool. I'm sure we agree. It should offer layouts syncing imperative (C#), declarative (XAML), and visual. For Visual Studio devs, I can't see anything but a WPF based tool that emits cross-platform.<br /><br />Closest I've found is Appcelerator's Alloy. http://www.appcelerator.com/platform/alloy/BSalitahttps://www.blogger.com/profile/13621676310005481845noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-18725870227665996552013-07-30T23:39:02.811+00:002013-07-30T23:39:02.811+00:00Thanks DavidWould be interested in submitting this...Thanks David<br><br>Would be interested in submitting this after mvvmcross - but can't see any store support for portable code currently :/ is this likely soon? Do you think it can even done now?<br><br>StuartSlodgehttps://www.blogger.com/profile/17827379022934338119noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-78545452069025727932013-07-30T22:07:19.336+00:002013-07-30T22:07:19.336+00:00Please submit this to the Xamarin Component Store!...Please submit this to the Xamarin Component Store!Anonymoushttps://www.blogger.com/profile/17207466343840352332noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-12865107106430644122013-07-22T14:39:06.874+00:002013-07-22T14:39:06.874+00:00Yes - thanks - I've also mentioned it before t...Yes - thanks - I've also mentioned it before too - e.g. in my NDC talk. Very happy to see more and more happening in this area - I've got to stop laying my iOS UIs out by hand :)Slodgehttps://www.blogger.com/profile/17827379022934338119noreply@blogger.comtag:blogger.com,1999:blog-13459850.post-61714800787853844762013-07-22T14:33:04.875+00:002013-07-22T14:33:04.875+00:00Stuart, I am sure you have seen XibFree - http://w...Stuart, I am sure you have seen XibFree - http://www.toptensoftware.com/XibFree/<br /><br />For simple layouts it works great.Anonymoushttps://www.blogger.com/profile/09789134337595042951noreply@blogger.com