This is a migrated thread and some comments may be shown as answers.

How to hide the date time stamp

2 Answers 83 Views
ConversationView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 04 Feb 2014, 06:09 AM
I am using the conversationview control but I do not wish to show the datetime stamp at the bottom of each conversation bubble.  Is there a way to hide this text? 

2 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 07 Feb 2014, 08:12 AM
Hi Michael,

You can hide the time stamp by creating different message templates. Below are the templates for the incoming and outgoing messages. You just have to remove the time stamp text block or hide it.

Incoming template:
<DataTemplate>
    <Grid Margin="12">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="3*"/>
        </Grid.ColumnDefinitions>
        <telerikPrimitivesPrimitives:RadPointerContentControl Background="{StaticResource PhoneAccentBrush}"
                                                              TargetPoint="160, 300"
                                                              Grid.Column="1"
                                                              Foreground="{StaticResource PhoneForegroundBrush}">
            <telerikPrimitivesPrimitives:RadPointerContentControl.PointerTemplate>
                <DataTemplate>
                    <Polygon Width="12"
                             Height="24"
                             Points="0,0 12,0 12,12 0,24"
                             StrokeThickness="0"
                             Fill="{StaticResource PhoneAccentBrush}"
                             RenderTransformOrigin="0.5, 0.5">
                        <Polygon.RenderTransform>
                            <ScaleTransform ScaleX="-1"/>
                        </Polygon.RenderTransform>
                    </Polygon>
                </DataTemplate>
            </telerikPrimitivesPrimitives:RadPointerContentControl.PointerTemplate>
 
            <StackPanel>
                <TextBlock Text="{Binding Path=Text}"
                           TextWrapping="Wrap"
                           Margin="12"/>
                <TextBlock Text="{Binding Path=TimeStamp}"
                           Margin="12, 0, 12, 12"
                           HorizontalAlignment="Right"/>
            </StackPanel>
            </telerikPrimitivesPrimitives:RadPointerContentControl>
    </Grid>
</DataTemplate>

Outgoing Template:
<DataTemplate>
    <Grid Margin="12">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
 
        <telerikPrimitivesPrimitives:RadPointerContentControl Background="{StaticResource PhoneAccentBrush}"
                                                              TargetPoint="-150,-300"
                                                              Foreground="{StaticResource PhoneForegroundBrush}">
            <telerikPrimitivesPrimitives:RadPointerContentControl.PointerTemplate>
                <DataTemplate>
                    <Polygon Width="12"
                             Height="24"
                             Points="0,0 12,0 12,12 0,24"
                             StrokeThickness="0"
                             Fill="{StaticResource PhoneAccentBrush}"
                             RenderTransformOrigin="0.5, 0.5">
                        <Polygon.RenderTransform>
                            <ScaleTransform ScaleX="-1"/>
                        </Polygon.RenderTransform>
                    </Polygon>
                </DataTemplate>
            </telerikPrimitivesPrimitives:RadPointerContentControl.PointerTemplate>
 
            <StackPanel>
                <TextBlock Text="{Binding Path=Text}"
                           TextWrapping="Wrap"
                           Margin="12"/>
                <TextBlock Text="{Binding Path=TimeStamp}"
                           Margin="12, 0, 12, 12"
                           HorizontalAlignment="Right"/>
            </StackPanel>
        </telerikPrimitivesPrimitives:RadPointerContentControl>
    </Grid>
</DataTemplate>

Regards,
Victor
Telerik
If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
0
Michael
Top achievements
Rank 1
answered on 07 Feb 2014, 08:56 AM
That worked like a charm.  Thanks!
Tags
ConversationView
Asked by
Michael
Top achievements
Rank 1
Answers by
Victor
Telerik team
Michael
Top achievements
Rank 1
Share this question
or