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

Appointment with Icon

2 Answers 64 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 04 Jul 2012, 08:32 PM
Hi telerik;

I'd like to add an icon in appointment saying this is newly added since last read,
so I used simple DataTemplate of appointment with which has a image and text as subject such as followings.
<DataTemplate x:Key="AppointmentTemplate">
              <Grid>
                  <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="Auto"/>
                      <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <Image Source="/Images/General/LightBulb.png" Width="15" Height="15" Visibility="{Binding IsNew,Converter={StaticResource appointConverter}}"/>
                  <TextBlock Grid.Column="1" Text="{Binding Subject}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10" Foreground="White" />
              </Grid>
          </DataTemplate>

The icon image shows up fine ,however, can't control visibility of the image binded with my viewmodel.
I read much threads related ,many example says use AppointmentStyleSelector and most of them are
for background color,which I already use,but don't know how to approach to add image icon.
Could you let me have a simple example ? Pls advice.

TIA
Kang


2 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 05 Jul 2012, 03:07 PM
Hi Yong-Gu Kang,

Please, try binding to your IsNew property using the AppointmentProxy. For example :
 
<Image Source="/Images/General/LightBulb.png" Width="15" Height="15" Visibility="{Binding Appointment.IsNew, Converter={StaticResource appointConverter}}" />

I hope this helps.

Kind regards,
Maria
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 09 Jul 2012, 12:20 PM
Hi Maria,

It works. Thank you.

Kang.
Tags
ScheduleView
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Masha
Telerik team
Yonggu Kang
Top achievements
Rank 1
Iron
Share this question
or