How can I show an additional line of text on an appointment with a different style to the subject in a xamDayView.
Thanks
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style of the AppointmentPresenter and added a TextBlock to its Template. The TextBlock is added in a StackPanel called “EditPanel”. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Thanks, works great. The only change I made was to bind to the description and to add a ' - ' when displaying on a single line:
<TextBlock Text=" - "> <TextBlock.Style> <Style TargetType="TextBlock"> <Style.Triggers> <DataTrigger Binding="{Binding Path=IsSingleLineDisplay, RelativeSource={RelativeSource TemplatedParent}}" Value="False"> <Setter Property="Visibility" Value="Collapsed"/> </DataTrigger> <DataTrigger Binding="{Binding Description}" Value=""> <Setter Property="Visibility" Value="Collapsed"/> </DataTrigger> <DataTrigger Binding="{Binding Description}" Value="{x:Null}"> <Setter Property="Visibility" Value="Collapsed"/> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock> <TextBlock Text="{Binding Description}"/>
You can manually set the Orientation of the StackPanel that contains the TextBlocks to vertical. It's Name is EditPanel.
Hope this helps.
I would like to do something similar with the XamMonthView. The above solution seems to not work since IsSingleLineDisplay is set to true for the ActivityPresenter when using XamMonthView? Please advise, thanks.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.