System.Windows.Data Error: 26 when using CustomTickMark

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    2 posts
    Member since:
    Jan 2012

    Posted 17 May 2012 Link to this post

    Hi,

    When I use CustomTickMark in a RadGauge, I always have this runtime error:

    System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='CustomTickMark'


    Here a sample of code that I use. My Gauge is more complex but I striped the code just to show the tick mark:
    You can see the error in the Output Panel of Visual Studio.

    I can still see the mark but I want to be sure I do things properly.

    Thanks.

    <Grid>
        <telerik:RadGauge Height="50" HorizontalAlignment="Left" Margin="131,146,0,0" Name="radGauge1" VerticalAlignment="Top" Width="100">
            <telerik:RadialScale x:Name="radialScale" IsEnabled="False" IsHitTestVisible="False" Min="0" Max="75" MinorTicks="1" MiddleTicks="2" MajorTicks="3">
                <telerik:TickList>
                    <telerik:CustomTickMark Value="10" Location="Inside" Offset="-0.02" Format="{}{0:N0}%" Length="1.3" TickWidth="0.02" Foreground="White" />
                </telerik:TickList>
            </telerik:RadialScale>
        </telerik:RadGauge>
    </Grid>
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 22 May 2012 Link to this post

    Hi Pierre,

    The XAML code you use for CustomTickMark is correct. I think you can just ignore this message.

    Also for additional information.
    In your application you use the gauge control from a release before 2011.Q3. In the 2011.Q3 release we introduced new gauge control within the DataVisualization assembly. It is almost new control redesigned from scratch. Some of its features are similar to the old control’s features but they are implemented in absolutely different way (using different set of properties), while others are completely new.
    Our demo application now references the new gauge control and demonstrates its features.
    We recommend using the new gauge control in the new applications. We would also recommend replacing the old control with new one in existing applications if there is a timeframe for this task.

    Regards,
    Andrey Murzov
    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
Back to Top