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

Delete appointment dialog style

1 Answer 133 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 27 Mar 2013, 09:55 PM
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?

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 29 Mar 2013, 01:09 PM
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.

Tags
ScheduleView
Asked by
Josh
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or