Appointment with Icon

3 posts, 0 answers
  1. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 04 Jul 2012 Link to this post

    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. Masha
    Admin
    Masha avatar
    355 posts

    Posted 05 Jul 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 09 Jul 2012 Link to this post

    Hi Maria,

    It works. Thank you.

    Kang.
Back to Top