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
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView,Version=2012.3.1129.40,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
                        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        >
        <SolidColorBrush x:Key="RadScheduleForeground" Color="#FF000000" />
         
        <!-- DeleteAppointmentConfirmStyle-->
        <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <Grid>
                    <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?" />
                </Grid>
                <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"
                                        
                            telerik:RadWindow.ResponseButton="Cancel"
                             IsCancel="true" Command="{x:Static telerik:WindowCommands.Cancel}"
                             />
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
        <Style x:Key="DeleteEventConfirmDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
            <Setter Property="Width" Value="300" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />
        </Style>
    </ResourceDictionary>

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

    Posted 29 Mar 2013 Link to this post

    Hello,

    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.

    Greetings,
    Vladi
    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