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

[Solved] Resize control inside RadTabControl

1 Answer 185 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Parthiv
Top achievements
Rank 1
Parthiv asked on 30 Oct 2010, 06:39 AM
Hi ,

Senario / Problem:
My RadTabControl are  declared in xaml but thru code-behind i used to add RadTabItem added to the UI on demand, like so:
now i hav controls inside RadTabItem that are also dynamic .... and these are added at runtime

now problem is i want resize my Radwindow and on size change i want all my controls automatically shrink and large as per size change of my rad window........

in my xaml i added

  <telerikNavigation:RadTabControl.RenderTransform>
                <ScaleTransform x:Name="CanvasScale"  ScaleX="1"   ScaleY="1" />
   </telerikNavigation:RadTabControl.RenderTransform>
   </telerikNavigation:RadTabControl>

and in code behind i used


void Layout_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            double aspectRatio = e.NewSize.Width / e.NewSize.Height;
            if (aspectRatio < (ShowTab.Width / ShowTab.Height))

                CanvasScale.ScaleX =CanvasScale.ScaleY = e.NewSize.Width / (ShowTab.Width);
            else

                CanvasScale.ScaleX = CanvasScale.ScaleY = e.NewSize.Height / (ShowTab.Height);

        }


then also its not working properly Pls help me, PLEASE



1 Answer, 1 is accepted

Sort by
0
Parthiv
Top achievements
Rank 1
answered on 03 Nov 2010, 07:35 AM
HI ALL,

I got my solution actually i added RadTabControl inside Scrollviewer thats y it was not working....

Tags
General Discussions
Asked by
Parthiv
Top achievements
Rank 1
Answers by
Parthiv
Top achievements
Rank 1
Share this question
or