Hello,
I've two questions to DataCards:
1. I want to show only one card. What's the best way to do this?Is it possible to use a DataCard-Item without a XamDataCards-Form-Object or had I use a XamDataCards-Object and fill this with only one Item?
2. I want to place my own Button with new functionality in the header of each card. Is it possible? How? ;o)
Greets and many, many thanks...
Marco
OK I will try this.
Another thing is that when the datacards area changes (the datacards area is located in a grid with gridsplitter), the cards location changes and it results in cards overlapping (probably the buttons on the headers) and the button header content is not right (not consistant to the actual content of the card). How can i fix that?
Hello michaelgr12345,
I have been looking into the description that you have provided and I suppose that you want to change the content of the Button when the value of the “equipment” cell changes. If this is correct you can create a Binding object in the Loaded event for the Card, which will bound the Value property of the cell that you want to the Content property of the Button in the header of the Card. I have created a sample application for you that follow the above approach.
Please let me know if this is what you are looking for of I have misunderstood you in any way.
Looking forward to hearing from you.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
My XamDataCards are bound to a datatable datasource.
I use the cardHeader_Loaded event to create a button on each dataCard header.
I have 2 issues:
1. When i am scrolling in xamdataCards area, the cards content is changed but the header (the button content is not changed). How can i load the CardHeader_Loaded event with the right parameters each time i scroll in dataCards.
2. When my dataSource is changed i need to update the button Conent in each XamDataCards with the right data . Probably using the CardHeader_Loaded event. But i don't know how to call this event with the right parameters (how do i loop throught datacards and convert each dataCard to cardHeaderPresenter).
BTW,
The code for creating the button is:
Border border = Utilities.GetDescendantFromName((sender as Infragistics.Windows.DataPresenter.CardHeaderPresenter), "Bd") as Border;
Grid container = border.Child as Grid;
Infragistics.Windows.DataPresenter.CardViewCard card = Utilities.GetAncestorFromType(sender as Infragistics.Windows.DataPresenter.CardHeaderPresenter, typeof(Infragistics.Windows.DataPresenter.CardViewCard), true) as Infragistics.Windows.DataPresenter.CardViewCard;
string name = ((card.Content as Infragistics.Windows.DataPresenter.RecordPresenter).Record as Infragistics.Windows.DataPresenter.DataRecord).Cells["equipment"].Value.ToString();
Button btn = new Button { Content = name };
You can modify the content of the card’s header by creating a style for the CardHeaderPresenter and set the Template property.
In order to identify if the user clicks on the card header you can use a style for the CardHeaderPresenter with EventSetter for the MouseLeftButtonDown event and in its event handler you can make the card to do something.
Hi,
I have the same thing. How do i modifiy the content of the header?
Also is there an event for header mouse click? so when the user clicks on the header of the card it will do something