human readable

6 posts, 0 answers
  1. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 13 Apr 2013 Link to this post

    is there any way to turn the human readable off.

    thanks
    dco
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 17 Apr 2013 Link to this post

    Hi,

    You can add an implicit style to barcode's resources to hide the ViewBox controls that hold the text:
    Copy Code
    <telerik:RadBarcodeEAN13 Height="120" Width="425" Text="123456789012">
    <telerik:RadBarcodeEAN13.Resources>
    <Style TargetType="Viewbox">
    <Setter Property="Visibility" Value="Collapsed" />
    </Style>
    </telerik:RadBarcodeEAN13.Resources>
    </telerik:RadBarcodeEAN13>

    All the best,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Kevin
    Kevin avatar
    3 posts
    Member since:
    Jan 2014

    Posted 12 Mar 2014 in reply to Yavor Link to this post

    How can I do this programmatically?

    I tried:
    1.System.Windows.Style style = new Style(typeof(Viewbox));
    2.style.Setters.Add(new Setter(Viewbox.VisibilityProperty, "Collapsed"));
    3. 
    4.bar.Resources.Add(typeof(Viewbox), style);


    but this does not seem to work.
  5. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 17 Mar 2014 Link to this post

    Hello Kevin,

    You could create a new ImplicitStyle for all of your RadBarcodeEAN13 and bind the visibility of the ViewBoxes in the Template to an attached property which you can control from code behind.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  6. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 18 Aug 2014 in reply to Yavor Link to this post

    Finally came to around to implementing what you recommended.
    But it is not working for me .
    What am I doing wrong.

    <telerik:RadBarcode39 Grid.Row="0"
           Text="{Binding Z_No,Converter={StaticResource UpperConverter}}" 
           ShowChecksum="False" RenderChecksum="False" >
        <telerik:RadBarcode39.Resources>
            <Style TargetType="Viewbox">
                <Setter Property="Visibility" Value="Collapsed" />
            </Style>
        </telerik:RadBarcode39.Resources>
    </telerik:RadBarcode39>

  7. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 20 Aug 2014 Link to this post

    Hello David ,

    I have attached a sample project demonstrating how you can bind the Visibility of the Viewbox elements used to display the human readable display. In the project you will find a custom Implicit style targeting the RadBarcodeEAN13 in which ControlTemplate I have bound the Visibility of the Viewbox elements to an attached property.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner