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

Catastrophic failure exception while using custom blackout state selector.

1 Answer 19 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
SJ87
Top achievements
Rank 1
SJ87 asked on 08 Nov 2016, 06:33 PM

Hi,

I'm using RadCalendar for UWP, I'm trying to blackout the future dates on it using CalendarCellStateSelector. while executing it throws an error as below:

SeverityCodeDescriptionProjectFileLineSuppression State Error Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

here is my code I used in calendar.xaml

        <tlControl:RadCalendar MonthViewHeaderFormat="{}{0:MMMM yyyy}" MonthViewCellFormat="{}{0:%d}" DayNameFormat="FullName"
                               Grid.Row="1" IsTapEnabled="True" GridLinesThickness="2" GridLinesVisibility="Both"
                               CurrentDateChanged="RadCalendar_CurrentDateChanged" SelectionMode="Single" 
                               x:Name="radCalendar" >

            <tlControl:RadCalendar.CellStateSelector>
                <state:CustomBlackoutStateSelector/>
            </tlControl:RadCalendar.CellStateSelector>
</tlControl:RadCalendar>

 

 

and  in calendar.xaml.cs

    public class CustomBlackoutStateSelector : CalendarCellStateSelector {
        protected override void SelectStateCore(CalendarCellStateContext context, RadCalendar container)
        {
            if (container.DisplayMode == CalendarDisplayMode.MonthView && context.Date > DateTime.Today) {
                context.IsBlackout = true;
            }
        }
    }

 

 

Could you please tell me how to fix this issues, I didn't see any errors in stack tracke.

Thank you,

SJ

 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 11 Nov 2016, 11:34 AM
Hello SJ,

We have tested your scenario locally and everything seems to work as expected. Please, find attached a small test app we have prepared and let us know if it works on your side as well. In case the problem persists it would be helpful for us if you could provide additional details and code for your specific scenario.

Regards,
Nikolay
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
SJ87
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or