Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Bnding SelectedTime property
posted

Hi,

i have a problem with the timeline.

in my modell i have a property:

        public DateTime SelectedTime
        {
            get
            {
                return _selectedTime;
            }
 
            set
            {
                if (_selectedTime != value)
                {
                    _selectedTime = value;
                    ParameterChanged = true;
                    NotifyPropertyChanged("SelectedTime");                    
                }
            }
        }

Now i wantto bind this to the timeline so i have the selected timeline DateTime in my modell.

<ig:DateTimeAxis Minimum="{Binding MinTime}" Maximum="{Binding MaxTime}" SelectedTime="{Binding SelectedTime}" 
                 ShowThumb="False" ShowMinorGridLines="False" ShowMinorTickMarks="True"  />

But i i select one timeline event nothink happens :( Regards Steffen

  • 27093
    posted

    Hello,       

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

    If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.

  • 27093
    posted

    Hello Steffen,

     

    I have been looking into your issue and it appears that the SelectedTime property’s value is being set internally to provide the selection functionality which overrides the TwoWay Binding. In order to overcome this a custom DateTimAxis can be created that would have a new property used only for binding. I have created a sample project for you that demonstrates all that (TimeLine_custom_proeprty.zip)

     

    Please let me know if I can be of any further assistance on the matter whatsoever.

    TimeLine_custom_proeprty.zip
  • 145
    posted

    EDIT:
    if i choose

    SelectedTime="{Binding SelectedTime, Mode=OneWayToSource}"

    the source refreshes but no selection is shown on timeline!
    With 2-Ways nothings happens.

    :(