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

Error when adding EditAppointmentDialogStyle

1 Answer 97 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.
Artem
Top achievements
Rank 1
Artem asked on 20 Feb 2012, 10:21 AM
Hi.
I have this
<ControlTemplate x:Key="EditAppointmentTemplate" TargetType="telerik:SchedulerDialog">
        <Grid  >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
 
            <TextBlock Text="asdasdasdasdasdasd"/>
 
            <StackPanel Grid.Row="7" Margin="13 6" HorizontalAlignment="Right" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" Command="telerik:WindowCommands.Confirm" telerik:LocalizationManager.ResourceKey="Ok" telerik:RadWindow.ResponseButton="Accept" >
                    <ToolTipService.ToolTip>
                        <TextBlock telerik:LocalizationManager.ResourceKey="SaveAndClose" />
                    </ToolTipService.ToolTip>
                </telerik:RadButton>
                <telerik:RadButton Margin="2" MinWidth="84"  Command="telerik:WindowCommands.Cancel" telerik:LocalizationManager.ResourceKey="Cancel" telerik:RadWindow.ResponseButton="Cancel"  />
            </StackPanel>
        </Grid>
    </ControlTemplate>
 
 
    <Style x:Key="EditAppointmentDialogStyle" TargetType="telerik:SchedulerDialog">
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Width" Value="560" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}" />
         
    </Style>
 
<telerik:RadScheduleView Name="sv"  EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}" />

But when I add ViewDefinitions

sv.ViewDefinitions.Add(new DayViewDefinition());

VS tell me
Ambiguous reference:
Telerik.Windows.Controls.DayViewDefinition
Telerik.Windows.Controls.DayViewDefinition
match

When I remove from code

EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}"

All work.
What I do wrong?

Update
Sorry for wrong topic name
it must bee

Error when adding EditAppointmentDialogStyle

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 22 Feb 2012, 03:50 PM
Hi,

I tried your code in an empty project and it works fine with the latest version of RadControls for Silverlight. Could you please prepare a sample project that reproduces the problem and share it with us?

I updated the title of the thread as you suggested.

Kind regards,
Miroslav Nedyalkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ScheduleView
Asked by
Artem
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or