Incorrect tick number displayed

6 posts, 1 answers
  1. Wenrong
    Wenrong avatar
    14 posts
    Member since:
    Sep 2011

    Posted 28 Sep 2011 Link to this post

    The XAML below resulted in a slider with ticks ranged 0 - 8 instead of 1 - 9. Why is it?


    <ResourceDictionary>
        <DataTemplate x:Key="TickTemplate">
            <Grid>
                <TextBlock Text="{Binding}" />
            </Grid>
        </DataTemplate>
    </ResourceDictionary>
     
            <telerik:RadSlider x:Name="normalSlider" VerticalAlignment="Center" Maximum="9" Minimum="1"
                    Value="5" TickTemplate="{StaticResource TickTemplate}"
                    Margin="20 0" TickPlacement="TopLeft" />
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 03 Oct 2011 Link to this post

    Hi Wenrong,

    I wasn't able to reproduce this issue with the latest official release of the control. I attached the sample project I created to test this scenario. Please have a look at it and let me know if it works for you.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Wenrong
    Wenrong avatar
    14 posts
    Member since:
    Sep 2011

    Posted 03 Oct 2011 Link to this post

    Thanks for your reply. The version you have attached does fixed the problem. I compared the DLL you attached with the one I downloaded, there is a version difference: 2011.2.920.40 vs 2011.2.712.40

    My DLL was downloaded with the ultimate collection from the free trials area:
    http://www.telerik.com/downloads/productfiles/bbgtm/Ultimate_Collection_2011_2_913_Trial.zip

    I checked again, the WPF download is new v920, but the ultimate collection is old. Maybe it's time to update your download. :)
  5. Donald
    Donald avatar
    4 posts
    Member since:
    Oct 2011

    Posted 06 Oct 2011 Link to this post

    I was having the same issue. After updating, Im now having  a problem with the DependencyObjectExtensions class. Previously, 'GetVisualParent<T>(DependencyObject)' was supported...but it looks like it's not supported in this new version. The documentation on this site doesn't seem to be updated if that method was indeed taken out.

    Any help telerik?


    DRA
  6. Donald
    Donald avatar
    4 posts
    Member since:
    Oct 2011

    Posted 06 Oct 2011 Link to this post

    Looks like I've narrowed down my problem. The DependencyObjectExtensions class only has 'IsLocalValueSet' as its only method. Previously, 'FindChildByType' and 'GetVisualParent' were also public methods in that class. The did have suppress message tags on them though. Were they taken out for a reason? Is this functionality possible through some other means?

    DRA
  7. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 12 Oct 2011 Link to this post

    Hi Donald,

    The extension methods in DependencyObjectExtensions were moved in other class. If you use them as extension methods you should not experience problems. For example:
    // this generates an error
    var firstElement = DependencyObjectExtensions.FindChildByType<FrameworkElement>(parent);
    // this compiles fine
    var firstElement = parent.FindChildByType<FrameworkElement>();

    Regards,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready