diff --git a/packages/core/ui/image/image-common.ts b/packages/core/ui/image/image-common.ts index 7ef7ddf9de..f15db7f85a 100644 --- a/packages/core/ui/image/image-common.ts +++ b/packages/core/ui/image/image-common.ts @@ -182,6 +182,7 @@ tintColorProperty.register(Style); export const decodeHeightProperty = new Property({ name: 'decodeHeight', defaultValue: { value: 0, unit: 'dip' }, + equalityComparer: Length.equals, valueConverter: Length.parse, }); decodeHeightProperty.register(ImageBase); @@ -189,6 +190,7 @@ decodeHeightProperty.register(ImageBase); export const decodeWidthProperty = new Property({ name: 'decodeWidth', defaultValue: { value: 0, unit: 'dip' }, + equalityComparer: Length.equals, valueConverter: Length.parse, }); decodeWidthProperty.register(ImageBase); diff --git a/packages/core/ui/layouts/absolute-layout/absolute-layout-common.ts b/packages/core/ui/layouts/absolute-layout/absolute-layout-common.ts index 50eedc1a9c..eabc13c5ea 100644 --- a/packages/core/ui/layouts/absolute-layout/absolute-layout-common.ts +++ b/packages/core/ui/layouts/absolute-layout/absolute-layout-common.ts @@ -61,7 +61,8 @@ export const leftProperty = new Property({ layout.onLeftChanged(target, oldValue, newValue); } }, - valueConverter: (v) => Length.parse(v), + equalityComparer: Length.equals, + valueConverter: Length.parse, }); leftProperty.register(View); @@ -75,6 +76,7 @@ export const topProperty = new Property({ layout.onTopChanged(target, oldValue, newValue); } }, - valueConverter: (v) => Length.parse(v), + equalityComparer: Length.equals, + valueConverter: Length.parse, }); topProperty.register(View); diff --git a/packages/core/ui/layouts/wrap-layout/wrap-layout-common.ts b/packages/core/ui/layouts/wrap-layout/wrap-layout-common.ts index 071052beaf..6aeda1ebcd 100644 --- a/packages/core/ui/layouts/wrap-layout/wrap-layout-common.ts +++ b/packages/core/ui/layouts/wrap-layout/wrap-layout-common.ts @@ -22,7 +22,8 @@ export const itemWidthProperty = new Property Length.parse(v), + equalityComparer: Length.equals, + valueConverter: Length.parse, valueChanged: (target, oldValue, newValue) => (target.effectiveItemWidth = Length.toDevicePixels(newValue, -1)), }); itemWidthProperty.register(WrapLayoutBase); @@ -31,7 +32,8 @@ export const itemHeightProperty = new Property Length.parse(v), + equalityComparer: Length.equals, + valueConverter: Length.parse, valueChanged: (target, oldValue, newValue) => (target.effectiveItemHeight = Length.toDevicePixels(newValue, -1)), }); itemHeightProperty.register(WrapLayoutBase); diff --git a/packages/core/ui/list-view/index.ios.ts b/packages/core/ui/list-view/index.ios.ts index e9f6f1a799..eff89c4165 100644 --- a/packages/core/ui/list-view/index.ios.ts +++ b/packages/core/ui/list-view/index.ios.ts @@ -527,7 +527,7 @@ export class ListView extends ListViewBase { } [iosEstimatedRowHeightProperty.setNative](value: CoreTypes.LengthType) { const nativeView = this.nativeViewProtected; - const estimatedHeight = Length.toDevicePixels(value, 0); + const estimatedHeight = layout.toDeviceIndependentPixels(Length.toDevicePixels(value, 0)); nativeView.estimatedRowHeight = estimatedHeight < 0 ? DEFAULT_HEIGHT : estimatedHeight; } } diff --git a/packages/core/ui/list-view/list-view-common.ts b/packages/core/ui/list-view/list-view-common.ts index 04f1bbddbe..dac45642ed 100644 --- a/packages/core/ui/list-view/list-view-common.ts +++ b/packages/core/ui/list-view/list-view-common.ts @@ -237,7 +237,8 @@ rowHeightProperty.register(ListViewBase); export const iosEstimatedRowHeightProperty = new Property({ name: 'iosEstimatedRowHeight', - valueConverter: (v) => Length.parse(v), + equalityComparer: Length.equals, + valueConverter: Length.parse, }); iosEstimatedRowHeightProperty.register(ListViewBase);