Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - MasterDetailsView - DetailsTemplate not working #111

Open
TopperDEL opened this issue Aug 24, 2020 · 1 comment
Open

Android - MasterDetailsView - DetailsTemplate not working #111

TopperDEL opened this issue Aug 24, 2020 · 1 comment

Comments

@TopperDEL
Copy link

Describe the bug

I have a MasterdetailsView bound to an ObservableCollection and set the ItemTemplate and DetailsTemplate with a DataTemplate set with x:DataType="ViewModel". The ItemTemplate works, but the DetailsTemplate is not rendered correctly. It only shows the string with the full qualified name of my ViewModel-class.

Steps to Reproduce

  1. Add a MasterDetailsView
  2. Bind it to a collection
  3. Add ItemTemplate and DetailsTemplate with x:DataType bound to your ViewModel
  4. Run the app - the DetailsTemplate is not rendered

Expected behavior

The DetailsTemplate gets rendered as it is on UWP.

Environment

NuGet Package(s): Uno.Microsoft.Toolkit.Uwp.UI-Controls v6.1.0-build.191.gc988bdd4ff

Package Version(s): 

Device form factor:
- [ ] Windows
- [ ] macOS
- [?] iOS
- [X] Android
- [ ] WebAssembly
- [ ] WebAssembly renderers for Xamarin.Forms

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [X] 2019 Preview (version: 16.7.0 Preview 5.0)

@TopperDEL
Copy link
Author

I found out that the error comes from a TextBox within the DataTemplate of the DetailsTemplate that has a HeaderTemplate set like this:

<TextBox Text="Test" >
     <TextBox.HeaderTemplate>
          <DataTemplate></DataTemplate>
     </TextBox.HeaderTemplate>
</TextBox>

A repro can be found here. Just uncomment lines 24 to 26 and Android will only render the Name of the Model within the DetailsTemplate.

@jeromelaban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant