This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.
Binding Content Height to XCT-Tabview is not working [Bug] #1360
Open
Description
I am using XCT Tabview and trying to give it a Content Height by binding a double value(Application.Current.MainPage.Height / 1.42) from ViewModel. When I run the app it does not take up the height equal to the Binded height variable.
Steps to Reproduce
- Create a ContentPage and add a XCT Tabview into it.
- Create a viewModel for the ContentPage and make it the BindingContext.
- Add a property named ContentHeight which is something like this double ContentHeight { get { return Application.Current.MainPage.Height / 1.42; } }
- Now bind this property ContentHeight to the TabContentHeight of XCT Tabview place in the Content Page.
Expected Behavious => Suppose if we the property ContentHeight has a value 360, so the height of the XCT Tabview content must be 360.
Actual Behavior => The Content height is not equal to ContentHeight.
Basic Information
- Version with issue: Xamarin Community Toolkit 1.1.0
- Last known good version: Not Sure.
- IDE: Visual Studio Windows 16.10.0
- Platform Target Frameworks:
- iOS: 13.4
- Android: 10.0
- Android Support Library Version:
- Nuget Packages: Xamarin.Forms 5.0.0.2012
- Affected Devices: Realme 6, Nexus One (Emulator), iOS Simulator iPhone 12 Pro Max
Workaround
Put the XCT Tabview into a stacklayout and Bind the height property to it's HeightRequest.