Adding a Materialdesigninxamltoolkit controller with C# in XAML

Asked

Viewed 75 times

0

I’m using Materialdesigninxamltoolkit to design my program in WPF, I’m new in WPF and wanted to know how I can add the Card controller by C#, as I do with Button or any other native WPF controller

Materialdesigninxamltoolkit
Cards.xaml.Cs
Card.Cs ( Object source/API ) Can’t place more than 2 links

  • You want to add a Card to code Behind or in the shaman?

  • In the xaml for c# in a dynamic mode, like I’m going to receive data from the database and add it to the card and then put it into the xaml for the User to view

  • Cards is a Contentcontrol. You must use it as you use any other, and you can add to it any control.

  • How do I add the image ? i can do it and add the text but the image I don’t know how do var card = new Card(); card.Content = "text"; help

  • A Contentcontrol can only have one control. If you want Card to display more than one, you should add a Panel(Grid, Stackpanel, etc) that contains the Controls you want, in which case a Textblock and an Image

  • Thank you so much !!! now I understand how it works, how can I positively this comment? was exactly what I was looking for !

Show 1 more comment

1 answer

4


Cards is a Contentcontrol. You must use it as you use any other, adding to it any control.

However, a Contentcontrol can only have one control.
If you want Card to display more than one, you should add one control of the kind Panel(Grid, Stackpanel, etc) containing Controls who intends.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.