Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

How can I MVVM-Compliant modify dynamically the contenttype of a custom control?

$
0
0

Hi,

I am trying to make an own control with a headerline and a contentarea. The Problem: The Content is not always a String which I can use with a label. It could be quite every possible contenttype. For example a List or a boolean, in this cases my control should use instead of a label for example a listview or a checkbox or some aquivalent stuff.

Furthermore, I made it work with a simple Class, which I called BindableContentView : ContentView, where I made the content bindable. But then I need to Bind this Content in my ViewModel and for this I need to implemnt an UI-Element in my ViewModel... This is not MVVM-Compliant, isn't it?

Any suggestions so far?

Thanks for your help! :)


Viewing all articles
Browse latest Browse all 75885

Trending Articles