Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Horizontal the zoom icon (Read 1578 times)
kelum
Full Member
***
Offline


I Love MindFusion!

Posts: 100
Joined: Mar 25th, 2017
Horizontal the zoom icon
Apr 4th, 2017 at 8:59am
Print Post  
I have following zoom icon, I want to make it horizontal , currently its on vertical mode

Code
Select All
            <mfc:ZoomControl
			x:Name="zoomControl"
            Target="{Binding ElementName=flowchart}"
			ScrollStep="40"
			MinZoomFactor="10"
			Width="57"
			Panel.ZIndex="1"
			Margin="17,-402,341,249" RenderTransformOrigin="3.198,0.538" HorizontalAlignment="Center" Grid.Column="1">
                <mfc:ZoomControl.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-90.202"/>
                        <TranslateTransform X="0.083" Y="-1.129"/>
                    </TransformGroup>
                </mfc:ZoomControl.RenderTransform>
            </mfc:ZoomControl> 

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3447
Joined: Oct 19th, 2005
Re: Horizontal the zoom icon
Reply #1 - Apr 5th, 2017 at 5:52am
Print Post  
The rotate-transform makes the zoom control horizontal but problem is it also rotates the - sign and zoom label, right?. You can rotate them back like this, and use the custom control on your page -

Code
Select All
class HorizontalZoomControl : MindFusion.UI.Wpf.ZoomControl
{
	public override void OnApplyTemplate()
	{
		base.OnApplyTemplate();

		RenderTransform = new RotateTransform(-90);

		var label = (FrameworkElement)GetTemplateChild("part_ZoomFactorTextBlock");
		label.LayoutTransform = new RotateTransform(90);

		var downBtn = (FrameworkElement)GetTemplateChild("part_DownButton");
		downBtn.LayoutTransform = new RotateTransform(90);

		var thumb = (FrameworkElement)GetTemplateChild("part_Delta");
		thumb.Cursor = Cursors.SizeWE;
	}
} 



We'll try to add a built-in property for this for upcoming release.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint