Simple horizontal LinearScale

4 posts, 0 answers
  1. Bill Sivill
    Bill Sivill avatar
    4 posts
    Member since:
    May 2009

    Posted 01 Jun 2010 Link to this post

    Greetings,  I am attempting to use the LinearScale to show a simple horizontal gauge with a Custom TickList that I am attempting to databind the ItemsSource to a POCO.  I do not want any other tick marks to show on the gauge. Is this possible?  I keep getting an error about the ticks collection not being empty.

            <telerik:RadGauge Height="50" HorizontalAlignment="Left" Margin="10,20,0,0" Name="radGauge1" VerticalAlignment="Top" Width="300">  
                <telerik:LinearScale Name="linearScale" Orientation="Horizontal" Width="300" Height="40" Left="0.02" Top="0.06" MajorTicks="0" 
                                         Min="0" Max="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToMaxRangeConverter}}"   
                                         StartWidth="0.02" EndWidth="0.02" StrokeThickness="0.5">  
                    <telerik:TickList ItemsSource="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToTicksConverter}}">  
                    </telerik:TickList> 
                    <telerik:RangeList ItemsSource="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToRangeConverter}}"/>  
                    <telerik:IndicatorList> 
                        <telerik:LinearBar Width="10" Name="linearBar" TooltipFormat="Daily Minutes: {0:F1}" 
                                            Value="50" 
                                            Location="CenterInside" SnapType="None"/>  
                    </telerik:IndicatorList> 
                </telerik:LinearScale> 
     
            </telerik:RadGauge> 
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 02 Jun 2010 Link to this post

    Hi Bill,

    We're sorry, because of a specific of TickList functionality it doesn't support databinding. Please, accept our apologies for the inconvenience caused.

    All the best,
    Andrey Murzov
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WPF is Visual Studio 2017 Ready
  4. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 09 Aug 2010 Link to this post

    Is this still the case with the Q2 release? In our application, the scale is different based on various pieces of data. If there is no databinding support, what is the recommended method of dynamically setting up the tick marks?
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 10 Aug 2010 Link to this post

    Hi kilhoffer,

    The Q2 release supports binding to the ItemsSource property of TickList.
    Note that you should set the MajorTicks to "-1" to avoid adding standard tick marks to the list.
    I've attached a small solution with data binding example.

    Sincerely yours,
    Andrey Murzov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top