TickTemplate no longer lining up after May 26th patch

14 posts, 0 answers
  1. Reuben
    Reuben avatar
    17 posts
    Member since:
    Apr 2009

    Posted 05 Jun 2009 Link to this post

    Hello,

    We were running the april 13th Telerik SL dlls, we recently upgraded to the May 26th Telerik SL dlls, and our RadSlider.TickTemplate no longer centers the ellipse and text correctly below it.

    The ellipse used to be right under the slider tick snap value, and the text was centered underneath that....

    <telerikControls:RadSlider.TickTemplate> 
                        <DataTemplate> 
                            <StackPanel> 
                                <Ellipse Width="5" Height="5" Fill="Black" HorizontalAlignment="Center" /> 
     
                                <TextBlock   
                                    Text="{Binding Converter={StaticResource ScaleConverter}}"   
                                    FontWeight="{Binding Converter={StaticResource FontWeightConverter}}" 
                                    Foreground="{Binding Converter={StaticResource ForegroundConverter}}" 
                                    FontSize="14" 
                                /> 
                            </StackPanel> 
                        </DataTemplate> 
                    </telerikControls:RadSlider.TickTemplate> 

    This is nearly exactly the same example as the Telerik documentation gives on TickTemplate with a link to thsi blog post:
    http://blogs.telerik.com/KirilStanoev/Posts/08-07-24/Using_ValueConverter_to_edit_Slider_s_TickTemplate.aspx?ReturnURL=%2fKirilStanoev%2fPosts.aspx

    Any ideas?

    I've tried using different layout controls other than stack panel, no luck.  it appears the text is forcing the ellipse (within the stack panel) to move away from the tick point..nothing lines up anymore.

    Here's what it looks like, you can see how the text is playing a role in how the stack panel lines up now:
    Image of new RadSlider.TickTemplate

    Thanks,
    Reuben
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 10 Jun 2009 Link to this post

    Hi Reuben,

    You are right that there is an issue with the ticks when using a custom TickTemplate. A fix will be available for Q2.
    Please let us know if you need it earlier.

    Sincerely yours,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Reuben
    Reuben avatar
    17 posts
    Member since:
    Apr 2009

    Posted 10 Jun 2009 Link to this post

    If you can pass on any temporary fix in the mean time I would be much obliged.  We have a production releasein a couple of months, so the sooner we can get that the better...

    Thanks!
    Reuben
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 11 Jun 2009 Link to this post

    Hello Reuben,

    Our next official release is after 2 weeks - in your case is better to wait until then.

    All the best,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Reuben
    Reuben avatar
    17 posts
    Member since:
    Apr 2009

    Posted 19 Aug 2009 Link to this post

    We're using the July 1st Dev release, and the spacing between ticks seems to still be a problem with a few of the tick marks (not all of them).

    Is this still a known issue?  If so, any idea on a quick fix?

    We have a hack fix that doesn't look that great, basically we have a valueconverter that's seeing if the value is the 4th or 5th value and modifying its padding.

    Thanks for any information.
  7. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 20 Aug 2009 Link to this post

    Hello Reuben,

    The issue with the ticks has been fixed. I have posted an answer to your support ticket. Give it a try and let us know if you experience any problems.

    Best wishes,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. joe castle
    joe castle avatar
    39 posts
    Member since:
    Jan 2005

    Posted 10 Jun 2010 Link to this post

    Hi,

    It seems that this issue re-appeared in the last version. The template is basic:

    <telerik:RadSlider Height="30" HorizontalAlignment="Stretch" VerticalAlignment="Top" HandlesVisibility="Visible" SmallChange="1" IsMoveToPointEnabled="True" IsMouseWheelEnabled="True" TickFrequency="1" IsSnapToTickEnabled="True" TickPlacement="BottomRight" Minimum="1" > 
                        <telerik:RadSlider.TickTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock x:Name="tickBox" Text="{Binding}" FontSize="9" Foreground="Gray" /> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadSlider.TickTemplate> 
                    </telerik:RadSlider> 

    See attached image.

    Thanks
  9. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 15 Jun 2010 Link to this post

    Hi Joe,

    Unfortunately I was not able to reproduce the issue. Which version of our controls are you using? I'm attaching a sample project using 0603 version of our control and if you run it you can see that the ticks line up properly. Have a look at and let me know if I am missing something.

    Sincerely yours,
    Kiril Stanoev
    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.
  10. joe castle
    joe castle avatar
    39 posts
    Member since:
    Jan 2005

    Posted 15 Jun 2010 Link to this post

    Hi Kiril,

    With your project it worked as expected. I'm using the 0603 version but for SL4, not SL3 as your attached project - switching the target and the telerik to SL4 reproduces the issue with your project.

    Thanks
  11. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 16 Jun 2010 Link to this post

    Hello Joe,

    Thank you for clarifying. Indeed 0603 for Silverlight 4 produces this issue. Try updating to 0609 from Q2 2010 Beta and let me know if you still experience the same issue. I'd be glad to further assist you.



    All the best,
    Kiril Stanoev
    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.
  12. Matt Brewington
    Matt Brewington avatar
    5 posts
    Member since:
    Jun 2010

    Posted 03 Sep 2010 Link to this post

    I am having this issue and I am using the Silverlight 4 2010.2.812.1040 build.  Anything I can do to fix this?
  13. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 07 Sep 2010 Link to this post

    Hi Matt,

    Have you edited the Style of RadSlider? If so, try finding the following piece of code in RadSlider's style

    <!--TickBar-->
    <ControlTemplate x:Key="TickBarTemplate" TargetType="telerik:RadTickBar">
         
    </ControlTemplate>

    The way the TickBarTemplate should look like is:

    <!--TickBar-->
    <ControlTemplate x:Key="TickBarTemplate" TargetType="telerik:RadTickBar">
        <Canvas x:Name="LayoutRoot" Background="Transparent" />
    </ControlTemplate>

    I assume in your case it looks like:

    <!--TickBar-->
    <ControlTemplate x:Key="TickBarTemplate" TargetType="telerik:RadTickBar">
        <Grid x:Name="LayoutRoot" Background="Transparent" />
    </ControlTemplate>

    If this does not help, could you please send me a project reproducing the issue. This way I will be better able to assist you.

    Regards,
    Kiril Stanoev
    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
  14. Matt Brewington
    Matt Brewington avatar
    5 posts
    Member since:
    Jun 2010

    Posted 07 Sep 2010 Link to this post

    Hi Kiril,

    I am not styling the RadSlider at all.  I have attached a screenshot and here is the code in my .xaml file:

        <telerik:GridViewColumn x:Name="gridApprovedBy" MinWidth="220" Header="Approved By" HeaderTextAlignment="Center">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <telerik:RadSlider Minimum="1" Maximum="5" TickFrequency="1" TickPlacement="BottomRight" Margin="3"
    IsSnapToTickEnabled="True" Width="180" VerticalAlignment="Center" IsEnabled="True"
    Value="{Binding TRAVEL_STATUS.spinner_value, Mode=TwoWay}">
                        <telerik:RadSlider.TickTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Converter={StaticResource TravelStatusConverter}}" FontSize="9"/>
                            </DataTemplate>
                        </telerik:RadSlider.TickTemplate>
                    </telerik:RadSlider>
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewColumn>


    Here is the code from the converter:
    public class TravelStatusConverter : IValueConverter
    {
     
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            List<string> numbers = new List<string>() {"", "Dis", "Pend", "Div", "RB", "COS"};
     
            return numbers[(int)(double)value];
        }
     
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
  15. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 07 Sep 2010 Link to this post

    Hi Matt,

    Try wrapping the TextBlock with a Grid as shown bellow:

    <telerik:RadSlider.TickTemplate>
        <DataTemplate>
            <Grid>
                <TextBlock Text="{Binding Converter={StaticResource TravelStatusConverter}}"
                        FontSize="9" />
            </Grid>
        </DataTemplate>
    </telerik:RadSlider.TickTemplate>

    Let me know if this helps.

    Best wishes,
    Kiril Stanoev
    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
DevCraft banner