This is a migrated thread and some comments may be shown as answers.

Incorrect tick number displayed

5 Answers 74 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Wenrong
Top achievements
Rank 1
Wenrong asked on 28 Sep 2011, 08:50 AM
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" />

5 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 03 Oct 2011, 09:05 AM
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 >>

0
Wenrong
Top achievements
Rank 1
answered on 03 Oct 2011, 10:58 PM
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. :)
0
Donald
Top achievements
Rank 1
answered on 06 Oct 2011, 09:09 PM
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
0
Donald
Top achievements
Rank 1
answered on 06 Oct 2011, 09:39 PM
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
0
Valeri Hristov
Telerik team
answered on 12 Oct 2011, 10:56 AM
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 >>

Tags
Slider
Asked by
Wenrong
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Wenrong
Top achievements
Rank 1
Donald
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or