Delete appointment dialog style

2 posts, 0 answers
  1. Josh
    Josh avatar
    17 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2013 Link to this post

    Hi I am trying to use a custom style for deleting appointments. I am using the following for my template
        <SolidColorBrush x:Key="RadScheduleForeground" Color="#FF000000" />
        <!-- DeleteAppointmentConfirmStyle-->
        <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
                    <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                    <TextBlock Margin="85 15 15 15" TextWrapping="Wrap" VerticalAlignment="Center" Text="Are you sure you want to delete the selected cue?" />
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok"
                        Command="{x:Static telerik:WindowCommands.Confirm}"
                        telerik:RadWindow.ResponseButton="Accept" />
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel"
                             IsCancel="true" Command="{x:Static telerik:WindowCommands.Cancel}"
        <Style x:Key="DeleteEventConfirmDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
            <Setter Property="Width" Value="300" />
            <Setter Property="HeaderTemplate">
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
            <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />

     If I comment out the delete icon image the code works fine. What is the proper reference for accessing that image?
  2. Vladi
    Vladi avatar
    744 posts

    Posted 29 Mar 2013 Link to this post


    In order to customize the DeleteAppointmentConfirmTemplate you will need to set the DeleteAppointmentConfirmDialogStyle through the ScheduleView Style.

    The easiest way of customizing this Template is with the use of Implicit Styles.

    I created and attached a sample project for you showing how to customize the DeleteAppointmentConfirmTemplate using Implicit Styles.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top