<
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="ProductImage">
<Setter Property="Template"><Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
<Image Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"/></Grid>
</ControlTemplate></Setter.Value> </Setter></Style>
</Window.Resources>
<Grid Name="MyLayout">
<igDP:XamDataGrid DataSource="{Binding Source={StaticResource MyData}}" Margin="12" Name="xamDataGrid1"><igDP:XamDataGrid.FieldLayoutSettings><igDP:FieldLayoutSettings AutoGenerateFields="False" /></igDP:XamDataGrid.FieldLayoutSettings><igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout><igDP:FieldLayout.Fields><igDP:Field Name="Name" Label="Name" >
<igDP:Field.Settings><igDP:FieldSettings CellMinWidth="200" CellWidth="200" />
</igDP:Field.Settings></igDP:Field><igDP:Field Name="Photo" Label="My Photo">
<igDP:Field.Settings><igDP:FieldSettings CellMinWidth="200" CellWidth="200" CellValuePresenterStyle="{StaticResource ProductImage}" /></igDP:Field.Settings></igDP:Field></igDP:FieldLayout.Fields></igDP:FieldLayout>
Below is My XAML Code Where in I want to Display Name in First Columnfield and Image In another column. i have used Cellvaluepresenter as specified in Infragistic DOcuments..But I am getting exception ""Error 2 Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'."
Kindly Help Me to solve above Exception ..Please reply
->>>>>>>>>>>>>>>Here is my XAML Code -->>>>>>>>>>
Vijay,
I am not sure why this is only in design time. I sounds like it is specific to your scenario. I think it is best to contact developer support here and provide a small sample so that we can debug it and/or ask the development team why this happens. I would guess that as you are using a provider, the data cannot be retrieved properly in design time only.
If you want to display multiple elements inside a cell, you have to create a custom control template for the CellValuePresenter. The CVP is the visual representation of the cell. You can find its default Template in the DefaultStyles directory in the Infragistics folder on your computer and use it as a base for your own custom style.
Let me know if you have questions on that.
Well Thank you Alex for your prompt friendly reply and expect the same in future too.
About the problem which i posted above i found it is just showing desing time error but when i run the application it is working fine. So in a way the code is orkign pretty fine. But in desin time it continues to show error underlines telling the above error when i build applicaton though itz runing fine.
One more thing i wanted to ask you is that
Is It possible to add multiplle Wpf control in one field setting??
As i have to show image and Name in the same single column field of DataGrid.?? Please reply me how can i achieve that with XamDatagrud.?
This is for your knowledge i have downloaded trial suti of WPF Controls to check how can these controls help us in our application? Later we may be thiking to Purchase them from Infragistic..? so i expect a Co-operation from you for the same.
Kindly Reply to My above query
Thank you
Regards
Vijay Gaur
Senior Software Developer
Xployt Solution
Hello,
As far as I can see from your xaml, everything looks normal. Looking at the exception, I am not sure that this is a problem on our end. If you can give us a sample project, we can look into it.