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

Content bigger than RadWindow

1 Answer 53 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dumitru
Top achievements
Rank 1
Dumitru asked on 15 Sep 2010, 09:08 PM
Hi,

I have a UserControl that uses a ScaleTransform:

<UserControl
    x:Class="Test.View.X"
    mc:Ignorable="d"
    d:DesignHeight="80"
    d:DesignWidth="100">
  
    <Canvas
        Width="100"
        Height="80" Background="Aqua">
        <Canvas.RenderTransform>
            <ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
        </Canvas.RenderTransform>
    </Canvas>
</UserControl>

When I use this control in a RadWindow the content is bigger than the window:

RadWindow window = new RadWindow();
window.Content = new XView();
window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
window.TopOffset = -40;
window.Show();

How should I fix this?

Thanks,
Dumi.

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 16 Sep 2010, 08:36 AM
Hi Dumitru,

 As the RenderTransform property doesn't affect the layout it is normal to observe this behavior - the window is not going larger when its content is scaled with a RenderTransform. What I would suggest you is either to set RenderTransform to the whole window or to put a LayoutTransformControl and move the transformation to its LayoutTransform property - this way the transformation will affect also the layout. The first one will scale the whole window and will make its header, borders and buttons bigger and second one will only make its content area bigger and will make enough space for your scaled content.

Hope this helps!

Sincerely yours,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Dumitru
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or