Я получаю сообщение об ошибке при попытке преобразовать double в GridLength в звездных единицах. Сам преобразованный работает нормально, но я получаю ошибку во время выполнения
"System.ArgumentException: NaN не является допустимым значением для ширины \ n в Xamarin.Forms.Size..ctor (System.Double width, System.Double height) [0x00008] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Size.cs: 19 \ n в Xamarin.Forms.Grid.ContractColumnsIfNeeded (предикат System.Double width, System.Func`2 [T, TResult]) [0x00075] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 213 \ n в Xamarin.Forms.Grid.MeasureAndContractStarredColumns (System.Double width, System.Double height, System.Double totalStarsWidth) [0x000bb] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 397 \ n в Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0010e] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 509 \ n в Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] в D: \ a \ 1 \ s \ Xamarin. Forms.Core \ GridCalc.cs: 58 \ n в Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ а \
\ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 641 \ n в Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 523 \ n в Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 131 \ n в Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] в D: \ a \ 1 \ s \ Xamarin.Forms .Core \ VisualElement.cs: 581 \ n в Xamarin.Forms.Grid.MeasureStarredRows () [0x000c3] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 548 \ n в Xamarin.Forms .Grid.MeasureAndContractStarredRows (System.Double width, System.Double height, System.Double totalStarsHeight) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 403 \ n в Xamarin.Forms .Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0011
7] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 510 \ n в Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 58 \ n в Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 641 \ n в Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] в D: \ a \ 1 \ s \ Xamarin.Forms .Core \ VisualElement.cs: 523 \ n в Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout. cs: 131 \ n в Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 581 \ n в Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout + LayoutИнформационный макет, ориентация Xamarin.Forms.StackOrientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x000a8] в D: \ a \ 1 \ s \ Xamarin.Forms.Core\ StackLayout.cs: 163 \ n в Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout + LayoutИнформационный макет, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ StackLayout.cs: 123 \ n в Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] вD: \ a \ 1 \ s \ Xamarin.Forms.Core \ StackLayout.cs: 80 \ n в Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 641 \ n в Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] в D: \ a \ 1 \ s\ Xamarin.Forms.Core \ VisualElement.cs: 523 \ n в Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 131 \ n в Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 581 \ n в Xamarin.Forms.Grid.CalculateAutoCells (System.Double width, System.Double height) [0x000e5] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 131 \ n в Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x0000c] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 483 \ n в Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ GridCalc.cs: 58 \n в Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 641 \ n в Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 523 \ n в Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \Layout.cs: 131 \ n в Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 581 \ n в Xamarin.Forms.ScrollView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ ScrollView.cs: 233 \ n в Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 641 \ n вXamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 523 \ n в Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Двойное ограничение высоты) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 131 \ n в Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Флаги Forms.MeasureFlags) [0x00054] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 581 \ n в Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout + Layoutininformation, Layout, информация, макет.Forms.StackOrientation ориентация, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x000a8] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ StackLayout.cs: 163\ n в Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout + LayoutИнформационный макет, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean pro cessExpanders) [0x00058] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ StackLayout.cs: 123 \ n в Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Двойная ширина, System.Double height) [0x0005b] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ StackLayout.cs: 57 \ n в Xamarin.Forms.Layout.UpdateChildrenLayout () [0x0014b] в D:\ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 263 \ n в Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] в D: \ a \ 1 \s \ Xamarin.Forms.Core \ Layout.cs: 223 \ n в Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 679 \ n в Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 908 \ n в Xamarin.Forms.VisualElement.set_Bounds (значение Xamarin.Forms.Rectangle) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 186 \ n в Xamarin.Forms.VisualElement.L ayout (Xamarin.Forms.Rectangle bounds) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 565 \ n в Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (дочерний элемент Xamarin.Forms.VisualElement, Xamarin.Область Forms.Rectangle) [0x001da] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 177 \ n в Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y,System.Double width, System.Double height) [0x0010d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 187 \ n в Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] вD: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 259 \ n в Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] в D: \ a \1 \ s \ Xamarin.Forms.Core \ Page.cs: 240 \ n в Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 679 \ n в Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \VisualEleme nt.cs: 908 \ n на Xamarin.Forms.VisualElement.set_Bounds (значение Xamarin.Forms.Rectangle) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 186 \ n в Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 565 \ n в Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Область прямоугольника) [0x0005f] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 146 \ n в Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Двойная ширина, System.Double height) [0x0010d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 187 \ n в Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] в D:\ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 259 \ n в Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] в D: \ a \ 1 \s \ Xamarin.Forms.Core \ Page.cs: 240 \ n в Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] в D: \ a \1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 679 \ n в Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 908 \ n в Xamarin.Forms.VisualElement.set_Bounds (значение Xamarin.Forms.Rectangle) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 186 \ n в Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle Bounds) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 565 \ n в Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (дочерний элемент Xamarin.Forms.VisualElement, регион Xamarin.Forms.Rectangle) [0x0005f] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 146 \ n в Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0010d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 187 \ nв Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 259 \ n в Xamarin.Forms.Page.OnSizeAllocated (System.Double width,Си ствол. Двойной онight) [0x0000f] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 240 \ n в Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000]в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 679 \ n в Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] в D: \ a\ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 908 \ n в Xamarin.Forms.VisualElement.set_Bounds (значение Xamarin.Forms.Rectangle) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 186 \ n в Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 565\ n в Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (дочерний элемент Xamarin.Forms.VisualElement, область Xamarin.Forms.Rectangle) [0x0005f] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Layout.cs: 146 \n в Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00103] в D: \ a \ 1 \ s \ Xamarin.Forms.C ore \Page.cs: 185 \ n в Xamarin.Forms.Page.UpdateChildrenLayout () [0x000c6] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 259 \ n в Xamarin.Forms.Page.OnSizeAllocated (System.Double width, System. Двойная высота) [0x0000f] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ Page.cs: 240 \ n в Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 679 \ n в Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] в D:\ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 908 \ n в Xamarin.Forms.VisualElement.set_Bounds (значение Xamarin.Forms.Rectangle) [0x0005d] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 186 \ n в Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] в D: \ a \ 1 \ s \ Xamarin.Forms.Core \ VisualElement.cs: 565 \ n в Xamarin.Forms.Platform.iOS.NavigationRenderer.ViewDidLayoutSubviews () [0x00172] в D: \ a \ 1 \ s \ Xamarin.Forms.Platform.iOS \ Renderers \ NavigationRe nderer.cs: 182 \ n в(Обертка, управляемая на родной) UIKit.UIApplication.UIApplicationMain (int, string [], intptr, intptr) \ n в UIKit.UIApplication.Main (аргументы System.String [], субъект System.IntPtr, делегат System.IntPtr) [0x00005] в / Library /Frameworks / Xamarin.iOS.framework / Versions / 12.4.0.64 / src / Xamarin.iOS / UIKit / UIApplication.cs: 79 \ n в UIKit.UIApplication.Main (System.String [], args, System.String PrincipalClassName, System.Строка DelegateClassName) [0x0002c] в /Library/Frameworks/Xamarin.iOS.framework/Versions/12.4.0.64/src/Xamarin.iOS/UIKit/UIApplication.cs:63 \ n в PrenCare.iOS.Application.Main (система.Строка [] args) [0x00002] в C: \ Users \ ondre \ source \ repos \ PrenCare \ src \ Version02 \ PrenCare \ PrenCare.iOS \ Main.cs: 19 "
.Странно то, что конвертер отлично работает, когда я использую Абсолютный блок.