Skip to content

EmptyViewTemplate Does Not Apply HeightRequest and WidthRequest, Causing Header and Footer to Be Invisible in CV2 #28605

@NafeelaNazhir

Description

@NafeelaNazhir

Description

When the EmptyViewTemplate is active in the CollectionView, the Header and Footer are not visible. Initially, this issue appeared when setting HeightRequest and WidthRequest in the EmptyViewTemplate, as the values were not applied, preventing proper resizing. Additionally, even without setting HeightRequest and WidthRequest, the Header and Footer remain invisible.

However, the EmptyView itself respects these properties and resizes correctly. When HeightRequest and WidthRequest are explicitly set in the EmptyView, the Header and Footer become visible. But without explicitly setting these values, the Header and Footer do not appear.

Screen.Recording.2025-03-25.at.5.38.34.PM.mov

Steps to Reproduce

  1. Launch the Application EmptyViewSample.zip
  2. Select EmptyViewTemplate(View with size), Header/header template and Footer/Footer template.
  3. Observe that header and footer is not visible.
  4. Select EmptyViewTemplate (View) , Header/header template and Footer/Footer template. Observe that header and footer is not visible.
  5. Select EmptyView(view) , Header/header template and Footer/Footer template. Observe that header and footer is not visible.

Expected Behavior:

  • The Header and Footer should always be visible, regardless of whether HeightRequest and WidthRequest are explicitly set for the EmptyView and EmptyViewTemplate.
  • The EmptyViewTemplate should adjust its size based height and width values.

Actual Behavior:

  • When EmptyViewTemplate with and without explicitly setting HeightRequest and WidthRequest, the Header and Footer are not visible.
  • The EmptyViewTemplate should not adjust its size based on HeightRequest and WidthRequest values.
  • When EmptyView without explicitly setting HeightRequest and WidthRequest, the Header and Footer are not visible.

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions