Telerik Forums
UI for WPF Forum
0 answers
17 views
Hello,

I am occasionally receiving an ArgumentOutOfRangeException with the message 'The added or subtracted value results in an un-representable DateTime.' while scrolling on mouse.


Stack Trace:

   at System.DateTime.Subtract(TimeSpan value)
   at Telerik.Windows.Controls.TimeBarBase.ZoomOut(Double centerOffsetPercentage)
   at Telerik.Windows.Controls.TimeBarBase.OnMouseWheel(MouseWheelEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at -.dje_zAQG4QXAUTAXTGKYLAMESW_ejd.Main()

Thanks in advance.
bilge
Top achievements
Rank 1
 asked on 08 Dec 2023
0 answers
50 views

Tried to adapt the ScheduleView and TimeBar (MiniMap) example. from the WPF Example Controls App.

As in the example the ScheduleView and TimeBar lie in the same column. As in the example TimeBars VisiblePeriodStart is bound to CurrentDate of MiniMapScheduleView. Visible Days of MiniMapScheduler are calculated by a Converter from TimeBar VisiblePeriod..

The problem is that the underlying ScheduleView is only updating its view when clicking on the TimbeBar (even on startup/when itemsource is new bound)).

When scrolling or zooming in the TimeBar all shown MiniMap appointments vanish except the ones which are in the area "selected" by the TimeBer Selector. 

Only when clicking again in the TImeBar (Selection) all MIniMap appointment appear again.

in the mentioned example the underlying ScheduleView updates instant and accordingly to the timebars zoom level.

Tried already:

Manually Update Scheduler (UpdateLayout() etc. in VisiblePeriodChanged- no effect.

Copied the bound Appointments observable collection from the MasterScheduleView to an own MiniMapAppointmentsCollection (thought had maybe something to do with virtuilaziation) - no effect.

Automatically updating the view when changing the underlying parameters (ItemsSource,VisiblePeriod, VisibleDays etc. etc) should be something very essential, am i missing something?

 

 

 

Technik
Top achievements
Rank 1
 asked on 20 Jul 2022
1 answer
93 views

Does the RadTimeBar support when Windows has a non-Gregorian calendar set? Specifically this one: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.umalquracalendar?view=net-5.0. I get an exception that says this when I change my Windows settings to get that calendar:

Exception Stack Trace: System.Windows.Markup.XamlParseException: Specified time is not supported in this calendar. It should be between 04/30/1900 00:00:00 (Gregorian date) and 11/16/2077 23:59:59 (Gregorian date), inclusive.

I can reproduce it with XAML as simple as this:

		<telerik:RadTimeBar x:Name="TimeBar"
                            PeriodStart="1-Jan-2019 12:00:00 AM"
                            PeriodEnd="31-Dec-2019 11:59:59 PM"
                            VisiblePeriodStart="14-March-2019 12:00:00 AM"
                            VisiblePeriodEnd="11-Nov-2019 11:59:59 PM">
			<telerik:RadTimeBar.Intervals>
				<telerik:YearInterval />
				<telerik:MonthInterval />
				<telerik:WeekInterval />
				<telerik:DayInterval />
			</telerik:RadTimeBar.Intervals>
		</telerik:RadTimeBar>


Stenly
Telerik team
 answered on 20 Aug 2021
2 answers
94 views

Hello 

 

I have a TimeBar which Connet is a Cartesian chart. The Period Start and End are the Min and Max dates in the source of the Cartesian chart items. For some reason, the start and the end of the cartesian chart does not align with the boundaries of the TimeBar. As if the chart has has some margin/padding that prohibits it to align with the TiemBar boundaries. (see atteched graphs).

Here is the xaml of the Timebar + cartesian chart:

<telerik:RadTimeBar Height="150" VerticalAlignment="Top"
                            PeriodStart="{Binding PeriodStart, Mode=TwoWay}"
                            PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}"
                            VisiblePeriodStart="{Binding VisiblePeriodStart, Mode=TwoWay}"
                            VisiblePeriodEnd="{Binding VisiblePeriodEnd, Mode=TwoWay}"
                            SelectionStart="{Binding SelectionPeriodStart, Mode=TwoWay}"
                            SelectionEnd="{Binding SelectionPeriodEnd, Mode=TwoWay}">
            

        <telerik:RadTimeBar.Intervals>
            <telerik:YearInterval />
                <telerik:QuarterInterval/>
                <telerik:MonthInterval />
            <telerik:WeekInterval />
            <telerik:DayInterval />
        </telerik:RadTimeBar.Intervals>

            <telerik:RadTimeBar.Content>

                <telerik:RadCartesianChart Height="90" VerticalAlignment="Top">
                    <telerik:RadCartesianChart.Behaviors>
                        <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" />
                        <telerik:ChartTooltipBehavior/>
                    </telerik:RadCartesianChart.Behaviors>
                    <telerik:RadCartesianChart.HorizontalAxis>
                        <telerik:DateTimeContinuousAxis Visibility="Collapsed" ShowLabels="False" TickThickness="0"/>
                    </telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:RadCartesianChart.VerticalAxis>
                        <telerik:LinearAxis Visibility="Collapsed" ShowLabels="False" TickThickness="0" SmartLabelsMode="None"/>
                    </telerik:RadCartesianChart.VerticalAxis>

                    <telerik:RadCartesianChart.Series>
                        <telerik:BarSeries CategoryBinding="EffectiveDate" ValueBinding="PerformanceYTD" ItemsSource="{Binding PortfolioPerformanceHistoryChartItemPositive}">
                            <telerik:BarSeries.TooltipTemplate>
                                <ItemContainerTemplate>
                                    <TextBlock Text="{Binding DataItem.PerformanceYTD, StringFormat=P2}" Background="Bisque" Padding="1"/>
                                </ItemContainerTemplate>
                            </telerik:BarSeries.TooltipTemplate>
                            <telerik:BarSeries.PointTemplate>
                                <DataTemplate>
                                    <Rectangle Width="10" Fill="Blue" />
                                </DataTemplate>
                            </telerik:BarSeries.PointTemplate>
                        </telerik:BarSeries>
                        <telerik:BarSeries CategoryBinding="EffectiveDate" ValueBinding="PerformanceYTD" ItemsSource="{Binding PortfolioPerformanceHistoryChartItemNegative}">
                            <telerik:BarSeries.TooltipTemplate>
                                <ItemContainerTemplate>
                                    <TextBlock Text="{Binding DataItem.PerformanceYTD, StringFormat=P2}" Background="Bisque" Padding="1"/>
                                </ItemContainerTemplate>
                            </telerik:BarSeries.TooltipTemplate>
                            <telerik:BarSeries.PointTemplate>
                                <DataTemplate>
                                    <Rectangle Width="10" Fill="Red" />
                                </DataTemplate>
                            </telerik:BarSeries.PointTemplate>
                        </telerik:BarSeries>
                    </telerik:RadCartesianChart.Series>

                </telerik:RadCartesianChart>
            </telerik:RadTimeBar.Content>
            
        </telerik:RadTimeBar>

 

 

Thanks

Herald

Herald
Top achievements
Rank 1
Veteran
Iron
 answered on 07 Oct 2020
1 answer
29 views

Hello,

I use the property Selection & Periodstart to change values in background.
Now I want to find out, what the user selected, but I cant find the difference.

I also tried to change ActualSelectionChanged it also gets triggered by user & background.

Is there any event which only triggers by user?

Regards

Dilyan Traykov
Telerik team
 answered on 20 Aug 2020
1 answer
73 views

Hello Telerik Team,

How can I resize both thumbs in the slider?
I added a picture, where you an see it better.

I tried with changing width of ThumbStyle, which causes troubles. I cant move the bar completely to the left or right.

Thanks.

Vicky
Telerik team
 answered on 22 May 2020
3 answers
68 views

Fairly new, and I hope this isn't a dumb question, but...

When I create a RadTimeBar by its lonesome, and bind values to the PeriodStart/End, SelectionStart/End everything works as expected. If I use it in a ItemTemplate in a RadListBox, intervals no longer show.

Any ideas?

 

 

 

 

Bryan
Top achievements
Rank 1
 answered on 16 Mar 2020
1 answer
35 views

Hello,

Please tell me how to hide resizable scrollbar or disabled? I don't want to change the time span of the TimeBar.

Thanks.

Martin Ivanov
Telerik team
 answered on 19 Feb 2020
2 answers
92 views

Hey,

I have a TimeBar which displays data within a visible time range of several hours and has a max selection range of 30 minutes. Thus I want to change the Date displayed in the Selection Range Title from "MM/dd/yyyy" to "dd.MM.yyyy HH:mm:ss". How can this be achieved?

Example code:

<telerik:RadTimeBar IsSnapToIntervalEnabled="False"
                                            PeriodStart="{Binding AnalysisDetailPeriodStart, Mode=TwoWay}" PeriodEnd="{Binding AnalysisDetailPeriodEnd, Mode=TwoWay}" VisiblePeriodStart="{Binding AnalysisDetailVisiblePeriodStart, Mode=TwoWay}" VisiblePeriodEnd="{Binding AnalysisDetailVisiblePeriodEnd, Mode=TwoWay}"
                                            SelectionStart="{Binding AnalysisDetailSelectedStart, Mode=TwoWay}" SelectionEnd="{Binding AnalysisDetailSelectedEnd, Mode=TwoWay}" MaxSelectionRange="{Binding AnalysisDetailMaxSelectionRange, Mode=OneWay}">

                        <telerik:RadTimeBar.Resources>
                            <utils:HourFormatterProvider x:Key="HourFormatterProvider"/>
                        </telerik:RadTimeBar.Resources>

                        <telerik:RadTimeBar.Intervals>
                            <telerik:MinuteInterval  />
                            <telerik:HourInterval FormatterProvider="{StaticResource HourFormatterProvider}" />
                            <telerik:DayInterval />
                        </telerik:RadTimeBar.Intervals>

                        <telerik:RadLinearSparkline ItemsSource="{Binding ObservableData}" XValuePath="Date" YValuePath="Occurrences" />
                    </telerik:RadTimeBar>

Andy
Top achievements
Rank 1
 answered on 16 Jan 2020
4 answers
53 views

Hello,

I have RadTimeBar

            <telerik:RadTimeBar x:Name="radTimeBar"
                            PeriodStart="{Binding StartDate}" 
                            PeriodEnd="{Binding EndDate}" 
                            VisiblePeriodStart="{Binding VisibleStartDate}" 
                            VisiblePeriodEnd="{Binding VisibleEndDate}"                            
                            SelectionStart="{Binding CurrentTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            SelectionChanged="radTimeBar_SelectionChanged"                            
                            ScrollMode="ScrollAndZoom">
                <telerik:RadTimeBar.Intervals>
                    <telerik:MinuteInterval />
                </telerik:RadTimeBar.Intervals>
            </telerik:RadTimeBar>

When I slide the slider thumb to the end the aplication is broken

I don't know how to catch the exception before the crashed

I attached a print screen of the exception

Thanks

David
Top achievements
Rank 1
 answered on 27 Jan 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?