Error when adding EditAppointmentDialogStyle

2 posts, 0 answers
  1. sharp
    sharp avatar
    27 posts
    Member since:
    Feb 2011

    Posted 20 Feb 2012 Link to this post

    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
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Feb 2012 Link to this post

    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 >>
  3. DevCraft banner
Back to Top