TimeRuler | time scale that can be
kandi X-RAY | TimeRuler Summary
kandi X-RAY | TimeRuler Summary
The time scale that can be scaled and translated is convenient for customizing UI requirements. Imitation fluorite cloud historical video timeline
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get end tick draw
- Get the position of the cursor
- Gets the value of the cursor property
- Get the pixel pixel value
- Draws cursor
- Draw cursor
- Get the baseline position
- Helper method to draw the ticker
- Draw the tickmark value
- Convert the dip value topx
- Format the given scale value
- Set range
- Sets the measured dimensions
- On scroll
- Convert px pixel value to sp
- Convert sp value to pixels
- On scale
- Set the cursor value
- Initializes the scale properties
- Set the scale factor
- On scroll event
- Initialize the tickmark
- Compute the scroll offset
- On touch event
- This method is used to calculate the height of the bottom sheet content
- View scrolling
TimeRuler Key Features
TimeRuler Examples and Code Snippets
val calendar = Calendar.getInstance()
// 00:00:00 000
calendar[Calendar.HOUR_OF_DAY] = 0
calendar[Calendar.MINUTE] = 0
calendar[Calendar.SECOND] = 0
calendar[Calendar.MILLISECOND] = 0
var startTi
timeBar.setOnCursorListener(object : BaseScaleBar.OnCursorListener {
override fun onStartTrackingTouch(cursorValue: Long) {
//开滑动
}
override fun onProgressChanged(cursorValue: Long,fromeUser:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.Liberations:TimeRuler:{latest version}'
}
Community Discussions
Trending Discussions on TimeRuler
QUESTION
Problem (happens on switching list bound to ItemsSource - when rows with SharedSizeGroup disappear for a moment):
So I have a Grid
with IsSharedSizeScope="True"
. The control that I'm building is a calendar/scheduler control.
I have a TimeRuler
control that I need to align to the headers (orange rectangle in the screenshot below). I use SharedSizeGroup for that. The problem is SharedSizeGroup
is inside generated items of ItemsControl
and that is causing some weird delay as you can see in the gif.
Is there anyway to make it re-render after ItemsContainerGenerator renders the first item or finishes loading?
Snippet that is causing the problem:
...ANSWER
Answered 2019-Jun-05 at 13:57Replacing collection bound to ItemsSource
was never as fast as I wanted it to be. Neither was clearing and adding items. It was causing everything to re-render and it was painfully slow.
Because I couldn't find a better solution I just add(populate) day items once and then just replace them using items[i]
syntax. This way UI won't have to be re-rendered completely each time you want to display a different range of dates.
QUESTION
I'm having some problems with the telerik:RadGanttView control. I believe this to be a problem specific to the Telerik toolkit UI for WPF, but I'll explain the issue as detailed as possible so others might be able to suggest a workaround if they can think of one.
TLDR;
The GanttView has the possibility to display recurring tasks by placing each recurrence as a child inside a single parent event. Now my project requires me to nest this recurring task series into another parent event container.
When selecting a recurring task event that is part of a nested hierarchy (of at least 2 levels deep), the application will throw a System.NullReferenceException
and crash.
More specifically, this error occurs only when all parent nodes are collapsed. If only the top node is collapsed and the other child-nodes are still expanded, the problem does not occur.
This is the StackTrace of the System.NullReferenceException
:
System.NullReferenceException was caught
at System.Collections.Generic.Dictionary'2.Add(TKey key, TValue value)
at Telerik.Windows.Rendering.VirtualizedGridPanel.Handler.SetArrangeRect(Int32 column, Int32 row, Rect rect) at Telerik.Windows.Rendering.Internal.GridRenderingHelper.MeasureItemsCore(Rect viewport, IGridContainersHandler handler)
at Telerik.Windows.Rendering.Internal.GridRenderingHelper.MeasureItems(Rect viewport, IGridContainersHandler handler)
at Telerik.Windows.Rendering.VirtualizedGridPanel.MeasureContainers(IContainerRecycler recycler, Size availableSize)
at Telerik.Windows.Rendering.Virtualization.VirtualizedPanel.MeasureOverrideCore(Size availableSize)
at Telerik.Windows.Rendering.ScrollablePanel.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at Telerik.Windows.Controls.GanttPresenterPanel.MeasureContainer(UIElement container, Size measureSize)
at Telerik.Windows.Controls.GanttPresenterPanel.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
Detailed description:
I've based my code on the RecurringTask_WPF example project.
I was able to get my desired visual result but I've stumbled upon an action that causes my application to crash.
This makes it pretty much unusable, so I need to find a solution or at least a way to catch the exception and prevent it from crashing.
I've been able to pinpoint the cause of my problem, but have been unable to solve this by myself.
Let me start by describing my current situation/environment.
In the default RecurringTask_WPF example project, if you collapse the "Recurrence Series" (the parent tree node) then you can see all the child recurring tasks next to each other.
When you click on one of the events, so for example: "Recurrence 1" block (in the TimeRuler Part of the RadGanttView), then this specific recurring task gets selected. This causes the tree node to be expanded automatically and the selected task/event becomes highlighted.
This behaviour works perfectly as intended and I wish to keep it like that exactly.
However once you nest recurring tasks into one extra level of hierarchy, which is on my requirements, an exception is thrown and the program stops working.
First I'll give you the code that changes the example project in order to recreate the problem. (This should also help with explaining the exact problem further)
You should replace the GetTasks()
method of the ViewModel.cs with the code below:
ANSWER
Answered 2018-Mar-16 at 10:16I've reported this issue on the official Telerik forum and received the following response:
I checked your description and I can confirm that there are two separate issues that can be reproduced with the provided steps. I logged two issues in our feedback portal and updated your Telerik points.
- GanttView: ArgumentNullException thrown when select an item in a scenario with nested items
- GanttView: NullReferenceException thrown when hover an item in a scenario with nested items
I am afraid currently, I cannot suggest a workaround for resolving this. That's why I would recommend you to follow the items in the portal.
Regards,
Martin Ivanov
Progress Telerik
I know answering your own question is frowned upon. However, I'll follow the development and will update this answer if anything changes.
If anyone else finds a workaround before this gets fixed, please do share.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TimeRuler
You can use TimeRuler like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the TimeRuler component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page