RadCardView - Nothing is displaying

1 Answer 45 Views
CardView
HemoSonics
Top achievements
Rank 1
Iron
Iron
HemoSonics asked on 27 Nov 2023, 06:43 PM

I am using a RadCardView for the first time, and nothing is displaying.  I have followed the online sample code, and even replaced the Rad Card View with a list box to make sure the bindings are working, and still nothing appears to be displaying in the area where the CardView (previously a list box) should display.  Here is part of my code: 

    <telerik:RadCardView x:Name="cardView" Margin="5" 
                                     ItemsSource="{Binding Instruments}"
                                     MinorLength="140" AutoGenerateDataFieldDescriptors="False" 
                                     Grid.Row="1" >
                <telerik:RadCardView.CardHeaderTemplate>
                    <DataTemplate>
                        <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <telerik:RadRadioButton VerticalAlignment="Center" BorderThickness="0" IsHitTestVisible="False" Width="15" Height="15" Margin="10,0" Background="{Binding ConnectivityColor}" CornerRadius="30" Grid.Row="0" Grid.Column="0"></telerik:RadRadioButton>

                                <Grid DataContext="{Binding }" Grid.Row="0" Grid.Column="1">
                                    <Grid.ToolTip>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding Name}" Margin="0,0,10,0"></TextBlock>
                                            <TextBlock Text="{Binding Host}" Margin="0,0,10,0"></TextBlock>
                                            <TextBlock Text="{Binding SerialNumber}"></TextBlock>
                                        </StackPanel>
                                    </Grid.ToolTip>
                                    <TextBlock Margin="0,0,10,0" Text="{Binding Name}" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" Width="250" TextWrapping="NoWrap"/>
                                </Grid>
                            </Grid>
                        </DataTemplate>
                </telerik:RadCardView.CardHeaderTemplate>
                <telerik:RadCardView.DataFieldDescriptors>
                    <telerik:CardDataFieldDescriptor Header="Name" DataMemberBinding="{Binding Name}" />
                    <telerik:CardDataFieldDescriptor Header="IP Address" DataMemberBinding="{Binding Host}" />
                    <telerik:CardDataFieldDescriptor Header="Serial Number" DataMemberBinding="{Binding SerialNumber}" IsReadOnly="True" />
                </telerik:RadCardView.DataFieldDescriptors>
                </telerik:RadCardView>
HemoSonics
Top achievements
Rank 1
Iron
Iron
commented on 27 Nov 2023, 07:53 PM | edited

By the way, I am using the following version of the Telerik Controls for WPF:  2021.1.325  Is it possible that I don't have the correct Theme installed, and that is why I am not seeing this particular control?  I think that is the answer to my question.  I will go ahead and upgrade and see what I can do then.
HemoSonics
Top achievements
Rank 1
Iron
Iron
commented on 28 Nov 2023, 06:31 PM

This works now.  I upgraded to the latest version, and that was my problem.  I was using a widget that was not available in the older version.

1 Answer, 1 is accepted

Sort by
0
HemoSonics
Top achievements
Rank 1
Iron
Iron
answered on 28 Nov 2023, 06:31 PM
I answered my own question in the comments.
Tags
CardView
Asked by
HemoSonics
Top achievements
Rank 1
Iron
Iron
Answers by
HemoSonics
Top achievements
Rank 1
Iron
Iron
Share this question
or