Shape does not meet the true size in px

2 posts, 0 answers
  1. Carlos Andres
    Carlos Andres avatar
    5 posts
    Member since:
    May 2009

    Posted 04 Sep 2013 Link to this post



    Hi everyone, I´m working with the WPF controls, but I've encontered a problem using shapes with the RadDiagram, my problem is when I create a New Shape I would like to know its true size because the Diagram show me a Tooltip with the Width and Heigth but when I rectified this Sizes it no seems rigth... I tried to copy and paste a picture of every shape that I test however none of them give me the rigth Width

    this is how I have my diagram in XAML

     <telerik:RadDiagram x:Name="diagram" Zoom="1.2" SnapX="10" SnapY="10" KeyboardNavigation.DirectionalNavigation="None" MouseDoubleClick="diagram_MouseDoubleClick" BorderBrush="Black" IsSnapToGridEnabled="True" Loaded="diagram_Loaded" PreviewSelectionChanged="diagram_PreviewSelectionChanged" SelectionChanged="diagram_SelectionChanged" IsSnapToItemsEnabled="True" Margin="5"
                                                    ActiveTool="PointerTool"  
                                                    IsConnectorsManipulationEnabled="False"
                                                    KeyUp="diagram_KeyUp"
                                                    IsRotationEnabled="False"
                                                    IsZoomEnabled="False"
                                                    IsPanEnabled="False"                                                           
                                                    AllowCopy="True"
                                                    AllowPaste="True"                                                 
                                                    AllowDrop="True"/>

    Please Help Me...

     
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 09 Sep 2013 Link to this post

    Hi Carlos,

    Thank you for providing us with information about your implementation. I can see that you have set the Zoom property of the RadDiagram to 1.2. Please note that with such setting it is expected that the shapes will be visualized bigger. Actually their Height and Width will be 20% larger.

    The reason for this behavior is the fact that the size of the shapes is depending on the Zoom. If you need to visualize the shapes with correct size you need to set the Zoom property of the RadDiagram to 1 (which is the default value).

    Please try this approach out and let us know if you have any other questions.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top