Hi,
I would like to add a custom view to my xamDataPresenter in order to display images in a WrapPanel.
So, I think that I must implement my own View (from ViewBase), but can you help me to acheive this ?
I have try, but the Records are not wrapped !
My XAML :
<vov:WrapView x:Key="ThumbnailsView"> </vov:WrapView>
Here is the class I use :
public class WrapView : Infragistics.Windows.DataPresenter.ViewBase { protected override CellPresentation CellPresentation { get { return CellPresentation.CardView; } } protected override FieldLayoutTemplateGenerator GetFieldLayoutTemplateGenerator(FieldLayout fieldLayout) { return new CardViewFieldLayoutTemplateGenerator(fieldLayout); } protected override bool HasLogicalOrientation { get { return true; } } protected override Type ItemsPanelType { get { return typeof(WrapPanel); } } // protected override Type RecordPresenterContainerType //{ // get // { // return base.RecordPresenterContainerType; // } //} protected override bool IsNestedPanelsSupported { get { return true; } } protected override bool IsFixedRecordsSupported { get { return true; } } }
Ok, I will try... maybe I have a solution.
So, now I have "boxes" with the datas.... I would like to set a custom template for the content.
I would like an image and a text below, something like this
<Border StrokeThickness="2"> <Grid> <Image Source="{TemplateBinding Content.MyIcon}"/> <TextBlock Text="{TemplateBinding Content.MyIcon}" Grid.Row="1"/> </Grid></Border>How can I do ?
Thanks
I would like to completely redefine the look of the item, so...
I have decide to redefine the record presenter style :
So I have redefine the style like thi, but it remain the same ! I have try for the 3 followig styles :
<Style TargetType="{x:Type igDP:DataRecordPresenter}"> ... </>
<Style TargetType="{x:Type igDP:GroupByRecordPresenter}"> ... </>
<Style TargetType="{x:Type igDP:ExpandableFieldRecordPresenter }"> ... </>
I do this by calling the following code :
ResourceDictionary resourceDictionary = new ResourceDictionary(); resourceDictionary.Source = new Uri("/ui/view/parts/video/videolibrary/views/CustomDataRecordPresenter.xaml", UriKind.Relative); myXamDataPresenter.Resources.MergedDictionaries.Add(resourceDictionary);
Doing this way, it only modify the style when I use a GridView, then the while RecordPresenter is modified !
But it does not work when I use my custom WrapPanel ! [:'(]
Hi Joe,
Do you have an idea ? What is happening ?
Do you have any solution for this problem ?
Can someone help us ?
I does find any solution
It should be possible !
Please help....
I have try several combinations, but none work :-(
How can I access the DataRecord through binding, I have try {Binding Title} and some others, but no data is displayed !
You're right, thanks.
I have do what you say and it is better, but it sounds that having
<ContentPresenter x:Name="PART_RecordContentSite"/>
is mandatory, or it crash !
What I want :
- Display an image binded to a property of my datasource, say "CoverImage"
- a title binded to the "Title" property
- I must be able to double click on the title and rename it, like for GridView
Do you have an idea on how I can acheive this ?