WinForms TouchToolkit
WinForms TouchToolkit
Trademarks
The ComponentOne product name is a trademark and ComponentOne is a registered trademark of GrapeCity, Inc. All
other trademarks used herein are the properties of their respective owners.
Warranty
ComponentOne warrants that the media on which the software is delivered is free from defects in material and
workmanship, assuming normal use, for a period of 90 days from the date of purchase. If a defect occurs during this
time, you may return the defective media to ComponentOne, along with a dated proof of purchase, and
ComponentOne will replace it at no charge. After 90 days, you can obtain a replacement for the defective media by
sending it and a check for $2 5 (to cover postage and handling) to ComponentOne.
Except for the express warranty of the original media on which the software is delivered is set forth here,
ComponentOne makes no other warranties, express or implied. Every attempt has been made to ensure that the
information contained in this manual is correct as of the time it was written. ComponentOne is not responsible for any
errors or omissions. ComponentOne’s liability is limited to the amount you paid for the product. ComponentOne is
not liable for any special, consequential, or other damages for any reason.
While you are welcome to make backup copies of the software for your own use and protection, you are not
permitted to make copies for the use of anyone else. We put a lot of time and effort into creating this product, and we
appreciate your support in seeing that it is used by licensed users only.
TouchToolkit for WinForms 1
Table of Contents
TouchToolKit for WinForms Overview 6
Help with WinForms Edition 6
Key Features 7
System Requirements 8
Key Components 9
TouchToolKit For WinForms Sample 10-12
TouchToolKit for WinForms Quick Start 13-14
C1Zoom Overview 15
C1Zoom Appearance Properties 15
Zoom Appearance Zoom Preview 15
Alternative Content 15-17
C1Zoom Behavior Properties 17
C1Zoom DoubleTap 17-18
C1Zoom Behavior Snap Points 18-19
Adding Snap Points at Design Time 19
C1ApplicationZoom Overview 49
C1ApplicationZoom Supported Forms 49
Getting the Associated Zoom 49-50
Excluding a Form 50-51
Setting Max Zoom Factor 51
C1ApplicationZoom Limitations 52
C1TouchEventProvider Overview 53
TouchEventProvider Events 53-54
Routing Policy 54-55
Routed Direction 55-56
Routed Event Information 56-57
DisablingPenFlicks 64
Detecting Maximum Touch Count 64-66
C1TouchEventProviderLimitations 66
C1Magnify Overview 67
Enabling Magnify Window 67-68
Hiding Mouse Cursor Inside the Magnifier Window 68
Magnifier Duration 69
Magnifier Scrolling 69
Magnifier Appearance Properties 69-70
Magnifier Shape 70
Magnifier Size 70
Magnifier Border Width 70-71
Magnifier Border Background 71
Magnify Events 71
Using a Different Magnifier Window in Different Controls 72-73
Posting a Message when the Magnifier is Closed 73-74
Posting a Message when Magnifier Window Moves 74
Magnifier Limitations 75
C1MultiScaleImage Overview 76
PropertyGridZoomPolicy 83-84
SplitContainerZoomPolicy 84
TableLayoutPanelZoomPolicy 84
ToolStripZoomPolicy 84
TreeViewZoomPolicy 84-85
ZoomPolicy 85
C1ChartZoomPolicy 85
C1DockingTabZoomPolicy 90
Setting the C1DockingTabZoomPolicy for ComponentOne Studio 90-91
C1NavBarZoomPolicy 91-92
Setting the C1NavBarZoomPolicy for ComponentOne Studio 92
C1OutBarZoomPolicy 92-93
Setting the C1OutBarZoomPolicy for ComponentOne Studio 93-94
C1FlexGridZoomPolicy 94
C1SplitContainerZoomPolicy 105
TabControlZoomPolicy 105-106
C1GanttViewZoomPolicy 106
C1ApplicationZoom
C1Magnify
C1MultiScaleImage
C1TouchEventProvider
C1Zoom
C1ZoomPanel
C1ZoomCommandsProvider
Once you add the C1Zoom component to the Form, end-users can zoom the Form's content by 2 finger gesture,
called pinch-out or stretch in mobile devices, to make a comfortable size for touch. This enables users to continue
their work on the optimized Form using the mouse/keyboard while using TouchToolKit. As a result you can continue
supporting both Mouse users and Touch screen users without trade-offs.
Key Features
The TouchToolKit for WinForms product includes the following key features.
Enable Touch Support in any WinForms Application—no matter what controls you are using. TouchToolKit
for WinForms lets you touch-enable any WinForms application, even if you are using standard Microsoft or
other 3rd-party controls.
Add Gesture Support to your applications. With touch devices so prevalent these days, standard touch and
multitouch gestures are second nature to most technology adopters. Let users seamlessly transition to using
touch in your WinForms applications with support for 17 event types and 9 different gestures.
Improve touch experience by adding a C1Zoom component to the Form to increase the size of small buttons,
labels, and any unfriendly UI elements. You can zoom-in/zoom-out of the Form by multi-touch after you add a
C1Zoom component to the Form. The original Form layout does not need to be rewritten to support touch.
You can save end-user learning cost and document update cost by keeping current workflow on the Windows
Forms Application.
Zoom, Magnification, and Pan Support make your apps truly interactive. TouchToolkit for WinForms includes
5 controls to make adding zoom and magnification a breeze. Give your users the freedom to zoom with touch..
The Touch Friendly Control Bar makes navigation simple. The included control bar lets you implement
zooming in, zooming out, scrolling, and more as touch-enabled command buttons to give your users a fully
touch-centric experience.
System Requirements
Minimum System requirements for full touch support in TouchToolkit include the following:
Key Components
TouchToolKit for Windows Forms contains the following components.
C1ApplicationZoom Make all Forms in the application support gesture zoom. For
more information see C1ApplicationZoom Overview.
Sample Description
C1Zoom Basic Zoom and Scroll This page demonstrates how to use C1Zoom’s features and its
following properties: ZoomPreviewMode, BoundaryFeedbackMode,
AllowDoubleTapZoom, ScrollIndicatorMode, IsHorizontalRailEnabled,
IsVerticalRailEnabled, and KeepAspectRation. Select the settings for
these properties on the page and click the Show Form button to see
how these settings effect the zooming.
C1Zoom Show Control Demonstrates the behavior of the AutoShowControl property when it is
enabled.
C1Zoom Pan Window Shows how to use different methods to show the Pan Window.
C1Zoom Zoom Policy Demonstrates how each zoom policy effects the control when
zooming.
C1Zoom Misc This page showcases a few of C1Zoom's appearance and layout
properties. The following properties are used in this sample to illustrate
the various appearance and layout settings for C1Zoom: Backcolor,
BackgroundImage, BackgroundImageLayout FullScreenMode,
InnerPanelLayoutMode, and KeepAspectRatio.
C1ZoomPanel Basic (Zoom and Scroll) This page demonstrates how to use C1ZoomPanel’s features and its
following properties: ZoomPreviewMode, BoundaryFeedbackMode,
AllowDoubleTapZoom, ScrollIndicatorMode, IsHorizontalRailEnabled,
IsVerticalRailEnabled, and KeepAspectRation. Select the settings for
these properties on the page and click the Show Form button to see
how these settings effect the zooming. When you zoom in by touch the
percentage of the ZoomFactor appears in the Event logs.
Touch Events List This sample page showcases the three types of user interaction events:
pointer, tap, and manipulation.
Drawing Board for Pen Shows how to use the pen or your finger to draw on the screen.
C# Samples
Sample Description
C1Zoom Basic Zoom and Scroll This page demonstrates how to use C1Zoom’s features and its
following properties: ZoomPreviewMode, BoundaryFeedbackMode,
AllowDoubleTapZoom, ScrollIndicatorMode, IsHorizontalRailEnabled,
IsVerticalRailEnabled, and KeepAspectRation. Select the settings for
these properties on the page and click the Show Form button to see
how these settings effect the zooming.
C1Zoom Show Control Demonstrates the behavior of the AutoShowControl property when it is
enabled.
C1Zoom Pan Window Shows how to use different methods to show the Pan Window.
C1Zoom Zoom Policy Demonstrates how each zoom policy effects the control when
zooming.
C1Zoom Misc This page showcases a few of C1Zoom's appearance and layout
properties. The following properties are used in this sample to illustrate
the various appearance and layout settings for C1Zoom: Backcolor,
BackgroundImage, BackgroundImageLayout FullScreenMode,
InnerPanelLayoutMode, and KeepAspectRatio.
C1ZoomPanel Basic (Zoom and Scroll) This page demonstrates how to use C1ZoomPanel’s features and its
following properties: ZoomPreviewMode, BoundaryFeedbackMode,
AllowDoubleTapZoom, ScrollIndicatorMode, IsHorizontalRailEnabled,
IsVerticalRailEnabled, and KeepAspectRation. Select the settings for
these properties on the page and click the Show Form button to see
how these settings effect the zooming. When you zoom in by touch the
percentage of the ZoomFactor appears in the Event logs.
Touch Events List This sample page showcases the three types of user interaction events:
pointer, tap, and manipulation.
Drawing Board for Pen Shows how to use the pen or your finger to draw on the screen.
1. Open the ClickOnceDemo sample from TouchToolKit for WinForms. Please refer to the pre-installed product
samples through the following path:
Documents\ComponentOne Samples\WinForms
If you do not have that installed open Visual Studio, and create a new Windows Forms Application project.
2. Double-click the C1Zoom component from the Toolbox to add it to the Form’s component tray. If there is no
C1Zoom component in the Toolbox, see "Adding component to the project" page.
3. Run the project.
4. Touch the screen by 2 fingers, and make a stretch motion with your thumb. Then, the Form is zoomed based
on the space of thumbs.
5. Stop the motion and release finger from the screen when you get best scale for touch. This gesture is called
"Pinch-out" or "Stretch".
6. To scroll the Form by touch, put your finger on the screen and keep contact as you move it around. This
gesture is called "Pan".
C1Zoom Overview
The C1Zoom component allows users to zoom controls of the Form by multi-touch gesture, called Pinch-out or
Stretch. You can keep your existing design on the form, and users can zoom it on demand.
You can zoom the Form when the C1Zoom component is added to the Form. This function is enabled if
the C1Zoom.AllowPinchZoom property is True.
The following section introduces some of the common appearance behavior properties used for the C1Zoom control.
C1Zoom includes the following appearance properties:
C1Zoom.AlternativeContentSettings
C1Zoom.BackColor
C1Zoom.BackgroundImage
C1Zoom.BackgroundImageLayout
C1Zoom.ZoomPreviewMode
Zoom Preview
A preview image is available for touch zoom. Users can select a preview mode before they use the zoomfactor to
operate the Form by touch.
If you would like to disable the preview set the C1Zoom.ZoomPreviewMode property to NoPreview. Also, you can
use a message instead of the preview when the C1Zoom.ZoomPreviewMode property is set to AlternativeContent.
To programatically set the C1Zoom.ZoomPreviewMode property to AlternativeContent, use the following code:
C#
using C1.Win.TouchToolKit;
c1Zoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent;
Visual Basic
Imports C1.Win.TouchToolKit
C1Zoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent
Alternative Content
You can show a text message to notify "the Form is zooming" to users when the C1Zoom.ZoomPreviewMode
property is set to AlternativeContent. Once the C1Zoom.ZoomPreviewMode property is set to AlternativeContent
you can then modify the content’s Font, ForeColor and Text. If you use "{Percentage}" in the
C1ZoomAlternativeContent.Format property, the string is replaced to the current zoom factor percentage.
To programatically set the format to the "{ZoomFactor}" string for the C1Zoom.AlternativeContentSettings property,
use the following code:
using C1.Win.TouchToolKit;
c1Zoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent;
c1Zoom1.AlternativeContentSettings.Font = new Font("Arial", 20.0f);
c1Zoom1.AlternativeContentSettings.ForeColor = Color.Blue;
c1Zoom1.AlternativeContentSettings.Format = "Zooming x{ZoomFactor}";
[Visual Basic]
Imports C1.Win.TouchToolKit
C1Zoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent
C1Zoom1.AlternativeContentSettings.Font = New Font("Arial", 20.0F)
C1Zoom1.AlternativeContentSettings.ForeColor = Color.Blue
C1Zoom1.AlternativeContentSettings.Format = "Zooming x{ZoomFactor}"
The following image illustrates the modified content’s Font, ForeColor, and Format settings for the AlternativeContent:
C1Zoom.AlowDoubleTapZoom
C1Zoom.AllowMouseWheelScroll
C1Zoom.MouseWheelZoom
C1Zoom.AllowPanScroll
C1Zoom.AllowPinchZoom
C1Zoom.AllowResizeByZoom
C1Zoom.AllowZoomByResize
C1Zoom.BoundaryFeedbackMode
C1Zoom.IsHorizontalRailedEnabled
C1Zoom.IsVerticalRailEnabled
C1Zoom.ZoomPolicies
C1Zoom.ZoomSnapDistance
C1Zoom.ZoomSnapPoin
C1Zoom DoubleTap
Visual Basic
C1Zoom1.AllowDoubleTapZoom = False
C#
c1Zoom1.AllowDoubleTapZoom = false;
C#
using C1.Win.C1TouchToolKit;
c1Zoom1.MaxZoomFactor = 4.0f;
c1Zoom1.ZoomSnapDistance = 0.05f;
c1Zoom1.ZoomSnapPoints.Add(2.0f);
c1Zoom1.ZoomSnapPoints.Add(3.0f);
}
Visual Basic
Imports C1.Win.C1TouchToolKit
C1Zoom1.MaxZoomFactor = 4.0F
C1Zoom1.ZoomSnapDistance = 0.05F
C1Zoom1.ZoomSnapPoints.Add(2.0F)
C1Zoom1.ZoomSnapPoints.Add(3.0F)
End Sub
Visual Basic
C1Zoom1.AllowMouseWheelZoom = True
C#
c1Zoom1.AllowMouseWheelZoom = true;
Note:
If you set the C1Zoom.AllowPinchZoom property to False, the Form still can zoom, because the Ctrl +
MouseWheel message is valid if C1Zoom.AllowMouseWheelZoom = True.
If you add a C1ZoomPanel to the Form. Make sure the focus is in the C1ZoomPanel control. Pinch
outside the C1ZoomPanel, the C1ZoomPanel will zoom if the C1ZoomPanel.AllowMouseWheelZoom
= True.
Visual Basic
C1Zoom1.AllowPanScroll = False
Title Text
c1Zoom1.AllowPanScroll = false;
Visual Basic
C#
c1Zoom1.IsHorizontalRailEnabled = false;
c1Zoom1.IsVerticalRailEnabled = false;
Visual Basic
c1Zoom1.ScrollIndicatorMode = ScrollIndicatorMode.None
Title Text
c1Zoom1.ScrollIndicatorMode = ScrollIndicatorMode.None;
Displaying Scrollbars
To show Scrollbars instead of the Scroll Indicator, set the C1ZoomScrollIndicatorMode property to ScrollBar.
Visual Basic
c1Zoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollBar
C#
c1Zoom1.ScrollIndicatorMode = ScrollIndicatorMode.ScrollBar;
Visual Basic
C1Zoom1.BoundaryFeedbackMode = C1.Win.TouchToolKit.BoundaryFeedbackMode.Standard
Title Text
c1Zoom1.BoundaryFeedbackMode = C1.Win.TouchToolKit.BoundaryFeedbackMode.Standard;
Visual Basic
C1Zoom1.AutoShowControl = True
C#
c1Zoom1.AutoShowControl = true;
To control auto show for individual controls, you can use the C1Zoom.ControlAutoShowing event. You can get the
displayed area of the control by using the C1Zoom.GetDisplayRectangle method.
C1Zoom Elements
The following topics provide information on the Pan Window and ControlBar elements in the C1Zoom control.
Visual Basic
C1Zoom1.ShowPanWindow()
C#
c1Zoom1.ShowPanWindow();
Visual Basic
C1Zoom1.ClosePanWindow()
C#
c1Zoom1.ClosePanWindow();
To verify whether or not the PanWindow is shown, use the C1Zoom.IsPanWindowShown property.
C#
bool displayed = c1Zoom1.IsPanWindowShown;
1. Add a user control and add buttons that will represent the control bar.
3. Add a C1Zoom control to your form and a control that you wish to zoom in on.
The following image represents a control bar created from buttons each button performs some type of zoom
behavior when you click on it such as ScrollUp, ScrollLeft, ScrollRight, etc. You can implement Zoom In/Out,
Scrolling, Switch FullScreen and other commands as ControlBar buttons when the C1ZoomCommandProvider is
added to the user control form.
The following imags illustrates a custom control bar created out of buttons with different zoom commands:
1. Add a UserControl to the project. In the Solution Explorer, right-click the solution name and select Add| User
Control. Name the user control (MyControlBar1)
2. Click Add in the Add New Item dialog box.
3. Add two Standard Buttons, Button1 and Button2 to MyControlBar1.
4. Add the C1ZoomCommandProvider from the Toolbox. If it does not appear in the Toolbox, right-click the
Toolbox and select Add Tab. Name the tab TouchToolKit and right-click the area in the tab and select Choose
Items. Browse to the location of the C1.Win.C1TouchToolKit.4.dll and click Open. The
C1ZoomCommandProvider1 item will appear in the component tray.
5. Click the smart-tag anchor of Button1, then select ZoomIn from the list of C1ZoomCommands. Note: The
C1.Win.C1TouchToolKit.4.Design should be referenced to your project for the smart-tag anchor to appear
when you clikc on the control.
6. Repeat same step for Button2, and select ZoomOut from the list.
7. Set Button1’s Text to Zoom In and Button2’s Text to Zoom Out.
8. Build the project.
9. In design-time, add a C1Zoom to the Form. (C1Zoom1).
10. Select C1Zoom1 from the Properties Window and click on the ellipsis button next to the ControlBars
property in the Properties Window.
Notice the button1 control will appear larger each time you click on the Zoom In button and then gradually
zoom out each time you click on the Zoom Out button.
If you want to make a space between the Form's border and the ControlBar, you can use the ControlBar.Margin
property to make the space. The following table shows which property takes effect when the DockPosition is
changed:
TopCenter Top
MiddleLeft Left
MiddleRight Right
BottomCenter Bottom
When the ControlBar.PositionMode property value is Floating, you can change the ControlBar's position by code or
dragging it in the UI.
When the ControlBar.PositionMode property value is Fixed, you can change the ControlBar's position by code, but
you can't change it by dragging it in the UI.
C1Zoom Layout
C1Zoom.AutoShowControl
C1Zoom.FullScreenMode
C1Zoom.InnerPanelLayoutMode
C1Zoom.KeepAspectRatio
C1Zoom.MaxZoomFactor
C1Zoom.ScrollIndicatorMode
C1Zoom.ZoomFactor
Visual Basic
C1Zoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.MiddleCenter
C#
c1Zoom1.InnerPanelLayoutMode = InnerPanelLayoutMode.MiddleCenter;
[C#]
c1Zoom1.BackColor = Color.DarkGray;
[Visual Basic]
C1Zoom1.BackColor = Color.DarkGray
To set the Background image, you can use the C1Zoom.BackgroundImage property and the
C1Zoom.BackgroundImageLayout property like the following:
[C#]
[Visual Basic]
[C#]
c1Zoom1.KeepAspectRatio = true;
[Visual Basic]
C1Zoom1.KeepAspectRatio = True
To set the minimum size or maximum size of the form, use the Form.MinimumSize property or Form.MaximumSize
property.
When the C1Zoom.FullScreenMode property is FullScreen, the Form switches to full screen.
When the C1Zoom.FullScreenMode property is FullScreenWithTaskbar, the Form switches to full screen with
the Windows Taskbar.
When the C1Zoom.FullScreenMode property is None, the Form switches to normal view.
Use the following code to switch your form to full screen view:
[C#]
c1Zoom1.FullScreenMode = C1.Win.TouchToolKit.FullScreenMode.FullScreen;
[Visual Basic]
C1Zoom1.FullScreenMode = C1.Win.TouchToolKit.FullScreenMode.FullScreen
[C#]
[Visual Basic]
The following image illustrates the ZoomFactor set to 200% when the button is clicked.
The following image illustrates the ZoomFactor set to 100% when the button is clicked.
[C#]
c1Zoom1.MaxZoomFactor = 4.0f;
[Visual Basic]
C1Zoom1.MaxZoomFactor = 4.0F
Visual Basic
Imports C1.Win.TouchToolKit
Private Sub C1Zoom1_ControlAutoShowing(sender As System.Object, e As ControlAutoShowingEventArgs) Handles
C1Zoom1.ControlAutoShowing
' Do not auto scroll if a control is displayed
If C1Zoom1.GetDisplayRectangle(e.Showinc1ontrol).Size = e.Showinc1ontrol.Size Then
e.Cancel = True
End If
' Do not auto scroll if a control is partial displayed
If C1Zoom1.GetDisplayRectangle(e.Showinc1ontrol).IsEmpty Then
e.Cancel = True
End If
' Do not auto scroll if a control's most part is shown
If C1Zoom1.GetDisplayRectangle(e.Showinc1ontrol).Size.Height > 30 Then
e.Cancel = True
End If
End Sub
C#
using C1.Win.TouchToolKit;
private void C1Zoom1_ControlAutoShowing(object sender, ControlAutoShowingEventArgs e)
{
// Do not auto scroll if a control is displayed
if (C1Zoom1.GetDisplayRectangle(e.Showinc1ontrol).Size == e.Showinc1ontrol.Size)
Detecting Zooming
You can detect control bounds zooming by C1Zoom.ControlBoundsZooming event, and you can detect font size
zooming by C1Zoom.ControlFontZooming event.
Normally, ZoomPolicy is better way to share custom zoom behavior in multiple projects.
In C1Zoom.ControlBoundsZooming event, you can cancel built-in control bounds zooming and you can implement
your custom code for a control.
[C#]
[Visual Basic]
Imports C1.Win.TouchToolKit
In C1Zoom.ControlFontZoming event, you can cancel built-in Font zooming and you can implement your custom
code for a control. In the event, you need change default Font of target control because Control.Font property inherits
parent control's Font setting if the Control.Font property is default. Also, C1Zoom.InnerPanel object need to be
excluded.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
End If
End Sub
You can give priority to a TextBox than Form when the TextBox has some text.
[C#]
[Visual Basic]
To see how the ZoomFactorChanged event works you can look at the ZoomFactorFeatures demo in the
TouchToolKit for WinForms explorer sample.
When you select the ZoomFactorFeatures demo, the default ZoomFactor appears as 100%:
Now, select the area on the form that you wish to zoom by pinching two fingers together and then gradually
expanding your fingers apart. The following image shows the form in the preview mode before the items zoom in:
Release your fingers and the form appears like the following:
The log on the sample shows the changed value of the ZoomFactor property:
C1Zoom Limitations
The following limitations exist for the C1Zoom control:
C1ZoomCommandProvider Overview
The C1ZoomCommandProvider is a component that can be added to a user control’s component tray. The following
section describes the C1ZoomCommandProvider’s built in actions and custom actions.
To add a C1ZoomCommandProvider to your user control complete the following:
2. Add the C1ZoomCommandProvider from the Toolbox. If it does not appear in the Toolbox, right-click the
Toolbox and select Add Tab. Name the tab TouchToolKit and right-click the area in the tab and select Choose
Items. Browse to the location of the C1.Win.C1TouchToolKit.4.dll and click Open.
1. Add a UserControl to the project. In the Solution Explorer, right-click the solution name and select Add| User
Control. Name the user control (MyUserControl)
2. Click Add in the Add New Item dialog box.
3. Add a control such as a Button to MyUserContro1.
4. Add the C1ZoomCommandProvider from the Toolbox. If it does not appear in the Toolbox, right-click the
Toolbox and select Add Tab. Name the tab TouchToolKit and right-click the area in the tab and select Choose
Items.
5. Browse to the location of the C1.Win.C1TouchToolKit.4.dll and click Open. The
C1ZoomCommandProvider1 item will appear in the component tray.
6. Add a control such as a Button, Button1.
7. Add the C1ZoomCommandProvider from the Toolbox. If it does not appear in the Toolbox, right-click the
Toolbox and select Add Tab. Name the tab TouchToolKit and right-click the area in the tab and select Choose
Items. Browse to the location of the C1.Win.C1TouchToolKit.4.dll and click Open. The
C1ZoomCommandProvider1 item will appear in the component tray.
8. Click the smart-tag anchor of Button1.
The following table lists and describes the built-in Zoom Commands:
ZoomOut ZoomOut 10% when executing this command. If the current factor
reaches the max factor value then it does nothing.
ScrollLeft Scrolls Left 1/3 of the form content width. If the form has scrolled to
the end point, then it does nothing.
ScrollRight Scrolls Up 1/3 of form content height. If the form has scrolled to the
end point, then it does nothing.
ScrollUp Scrolls Right 1/3 of form content width. If the form has scrolled to
the end point, then it does nothing.
ScrollDown Scrolls Down 1/3 of form content height. If the form has scrolled to
the end point, then it does nothing.
SwitchFullScreen Changes the form to full screen. If the form is already in full screen,
then it remains in full screen.
ShowOrHidePreviewWindow Shows the pan window. If the pan window is shown, close pan
window.
Custom action
You can access the Form which hosts the ControlBar by using the C1ZoomCommandProvider.OwnerForm property.
Use the following code to close the Form.
C#
c1ZoomCommandProvider1.OwnerForm.Close();
Visual Basic
C1ZoomCommandProvider1.OwnerForm.Close()
You can access the C1Zoom component which is in the Form by using the
C1ZoomCommandProvider.OwnerC1Zoom property. Use the following code to scroll to the right-down direction.
C#
private void button1_Click(object sender, EventArgs e)
{
Point currentLocation = c1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation;
currentLocation.X -= 100;
currentLocation.Y -= 100;
C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation = currentLocation;
}
Visual Basic
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim currentLocation As Point = C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation
currentLocation.X -= 100
currentLocation.Y -= 100
C1ZoomCommandProvider1.OwnerC1Zoom.ScrollLocation = currentLocation
End Sub
C1ZoomPanel Overview
You can add zoom ability to part of the Form by the C1ZoomPanel. It is useful to exclude some part of the Form,
MenuStrip, ToolStrip or other controls. The C1ZoomPanel is similar to a Panel control, except it allows users to zoom
controls in the Panel.
In C1ZoomPanel, the following items are not available: ControlBar, Pan Window, Full-screen mode and Keep
Aspect Ratio. The C1ZoomPanel, C1Zoom and C1ApplicationZoom controls can't be used together.
6. From the View menu click View| Other windows| Document Outline to show the Document Outline window.
7. Select C1ZoomPanel1 on the Document Outline window, then move it to a place between
ToolStripContainer.ContentPanel and SplitContainer.
9. Select C1ZoomPanel1 on the Document Outline window, then click C1ZoomPanel’s smart tag to open C1ZoomPanel’s
Tasks menu and slect Dock to Parent.
10. Run the project. Make sure both TreeView and ListView can be zoomed by touch.
The following features are aslo available in the C1Zoom component.
Zooming
Scrolling
Zooming Events
C#
c1ZoomPanel1.EndAddControls();
}
Visual Basic
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
C1ZoomPanel1.BeginAddControls()
C1ZoomPanel1.EndAddControls()
End Sub
4. Run the project, Zoom-up C1ZoomPanel content and then click Button1.
5. Confirm Button2 is added in the expected position and size.
ZoomPanel Limitations
The following limitation exists for the C1ZoomPanel control:
· Same limitations with C1Zoom.
C1ApplicationZoom Overview
The C1ApplicationZoom component allows users to zoom all controls of all Forms in the project. Creating and using
a C1ApplicationZoom is very similar to using a regular C1Zoom component. In C1Zoom, you need to add a
C1Zoom component to each Form. In C1ApplicationZoom, you need to add a C1ApplicationZoom component
only to the start-up Form because C1ApplicationZoom automatically attaches C1Zoom components to each Form
which is accessible from the Application.OpenForms static property. If there is a C1Zoom or C1ZoomPanel on a
Form, C1ApplicationZoom skips the Form so you can continue use these controls to implement custom zoom
settings for the specific Form.
The start-up form is a Form which is selected in the Start-up Form dropdown list in the project properties
window in a Visual Basic project. In a Visual C# project, the Start-up Form is a Form of a parameter of the
Program.cs in the Application.Run method.
C1ApplicationZoom can zoom all Forms which can be referenced from Application.OpenForms static property.
MessageBox, InputBox and other common dialogs are not supported.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
Excluding a Form
Excluding a Form
You can cancel attaching of C1ApplicationZoom by using C1ApplicationZoom.Attaching event. Following code
excludes Form2 when the project has Form1 and Form2, and Form1 has C1ApplicationZoom.
[C#]
[Visual Basic]
Imports C1.Win.TouchToolKit
[C#]
[Visual Basic]
Imports C1.Win.TouchToolKit
C1ApplicationZoom Limitations
C1ZoomPanel Limitations
The following limitation exists for the C1ZoomPanel control:
· Same limitations with C1Zoom.
C1TouchEventProvider Overview
C1TouchEventProvider enables you to detect Touch and Pen(Gesture), Manipulation, and Pointer events. In a Button
control, both Mouse Click and Tap raises the Button.Click event. In the C1TouchEventProvider, the Control.Click
event does not occur by Tap, and the C1TouchEventProvider.Tapped event occurs instead. Therefore, you can use
different events to invoke different actions.
If you are looking for C1Zoom, C1ZoomPanel and C1ApplicationZoom events, see Zooming events.
TouchEventProvider Events
The following table lists and describes the events of the C1TouchEventProvider.
Name Description
ManipulationInetiaStarting Occurs when the input device loses contact with the
UIElement object during a manipulation and inertia
begins.
PointerEntered Occurs when a pointer enters the hit test area of the
control.
PointerExited Occurs when a pointer leaves the hit test area of the
control.
Routing Policy
All events in the C1TouchEventProvider are Routed Events. That means you can attach a C1TouchEventProvider to a
container and you can use an event for children of the container.
To try the C1TouchEventProvider event add three buttons on a panel and attach the C1TouchEventProvider event to
the Panel using the following code below.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
The C1TouchEventProvider.Tapped event occurs when you tap a button on the Panel.
Routed Direction
The routed direction is from child control to parent control. For example, Button1 is a child of Panel1. Both Button1 and
Panel1 are attached to the C1TouchEventProvider. Button1 first receives the TouchEvents, then Panel1 receives the
TouchEvents.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
[C#]
using C1.Win.TouchToolKit;
Imports C1.Win.TouchToolKit
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
Detecting Touch
You can detect Tap, Double-Tap and Right-Tap by using the C1TouchEventProvider. To detect Hold instead of Right-
Tap, see Detecting Tap and Hold (Long-Tap).
The following steps indicates how to detect Click by Mouse or Tap by Touch.
1. Add a Button control to the Form. (Button1).
2. Add a C1TouchEventProvider to the Form. (C1TouchEventProvider1).
3. Select the Button1, Set "EnableTouchEvents of C1TouchEventProvider1" property to True in the Property Window.
4. Select the Button1, Add the following code to its Click event.
5. Select the C1TouchEventProvider1, Add the following code to its Tapped event.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
Detecting Gesture
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
5. Run the project, and operate Rotation or Scale multi-touch actions on the Label1.
You can use C1TouchEventProvider.ManipulationMode property to detect specific gestures. To detect only rotation
gesture, use the following code.
[C#]
c1TouchEventProvider1.ManipulationMode = C1.Win.TouchToolKit.ManipulationModes.Rotate;
[Visual Basic]
C1TouchEventProvider1.ManipulationMode = C1.Win.TouchToolKit.ManipulationModes.Rotate
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
Detecting Pen
The PointerEventArgs.DeviceType property indicates the type of device used in the event handler. The property
returns Touch for finger and Pen for Pen device.
[C#]
using C1.Win.TouchToolKit;
[Visual Basic]
Imports C1.Win.TouchToolKit
[C#]
c1TouchEventProvider1.EnablePressAndHold = false;
[Visual Basic]
C1TouchEventProvider1.EnablePressAndHold = False
DisablingPenFlicks
Pen Flicks may be available to quickly navigate and perform shortcuts on your device with a flick of your pen. The
following screenshot indicates the Pen Flicks option of the Control Panel when the Pen Flicks is available on the device.
[C#]
c1TouchEventProvider1.EnablePenFlicks = false;
[Visual Basic]
C1TouchEventProvider1.EnablePenFlicks = False
[C#]
using C1.Win.TouchToolKit;
// Returns true if the OS is Windows 8, Windows Server 2012 or newer. Otherwise false.
private static bool IsWindows8()
{
if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 2) return true;
return false;
}
[Visual Basic]
Imports C1.Win.TouchToolKit
' Returns true if the OS is Windows 8, Windows Server 2012 or newer. Otherwise false.
Private Shared Function IsWindows8()
If Environment.OSVersion.Version.Major >= 6 AndAlso Environment.OSVersion.Version.Minor >= 2 Then Return
True
Return False
End Function
C1TouchEventProviderLimitations
The following limitation exists for the C1TouchEventProvider control:
· Can't get touch event of DropDown window.
· Can't get touch event of ElementHost control.
C1Magnify Overview
With the C1Magnify component you can view a popup Magnifier Window over any UIElement by tapping the
UIElement you wish to magnify. In Windows Desktop, the text in the TextBox is hidden by your finger when you are
selecting the text by touch. C1Magnify allows you to look at the selected text via the Magnifier Window.
The Magnifier Window is displayed, by default, when you tap and hold your finger on the control which enables
C1Magnify.
The following table illustrates how the Magnifier window frame appears when its C1Magnify.ShowMouseCursor
property is set to True and/or False:
False(Default) True
[C#]
C1Magnify1.ShowMouseCursor = false;
[Visual Basic]
C1Magnify1.ShowMouseCursor = False
[C#]
C1Magnify1.ZoomFactor = 4.0f;
[Visual Basic]
C1Magnify1.ZoomFactor = 4.0F
The following table illustrates how the Magnifier window frame appears when its C1Magnify.ZoomFactor property is
200%(Default) 300%
Magnifier Duration
Magnifier Duration
You can specify how long it will take for the magnifier popup window to appear after you press your finger on a
UIElement by setting an integer value for the C1Magnify.PopupDelay property. The value is measured in seconds.
Magnifier Scrolling
Magnifer Scrolling
You can use the C1Magnify.IsHorizontalRailEnabled or IsVerticalRailEnabled property to fix the moving direction
of the Magnifier window.
Visual Basic
C1Magnify1.BorderWidth = 3
C1Magnify1.Shape = C1.Win.TouchToolKit.MagnifierShape.Rectangle
C1Magnify1.Size = New Size(300, 100)
C#
C1Magnify1.BorderWidth = 3;
Magnifier Shape
You can set Magnifier window frame by using the C1Magnify.Shape property. The following table illustrates how the
Magnifier window frame appears when its C1Magnify.Shape property is set to Circle(Default), Rectangle, and
RoundedRectangle:
Magnifier Size
Magnifier Size
You can set the size of the Magnifier window by using the C1Magnify.Size property. The following table illustrates the
effect of the difference values set for the C1Magnify.Size property:
You can set the border width of the Magnifier window by using the C1Magnify.BorderWidth property. The following
table illustrates the effect of the different values set for the C1Magnify.BorderWidth property:
5 px(Default) 10 px 1 px
You can set background image for the border of the Magnifier window by using the C1Magnify.BorderBackground
property.
Magnify Events
Magnify Events
In this section you will learn how to use the following C1Magnify events:
C1Magnify.Move
C1Magnify.MagnifierShowing
C1Magnify.Close
You can use the C1Magnify.MagnifierShowing event to change the Magnifier Window before the window is
displayed. In the event, you can use different settings in different controls. Also, you can cancel showing the Magnifier
Window when the e.Cancel property is set to True.
The following code shows a rectangular Magnifier window for a TextBox. It does not show the Magnifier window for
NumericUpDown, but it shows a circular Magnifier window for other controls.
Visual Basic
Imports C1.Win.TouchToolKit
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
C1Magnify1.SetEnableMagnifier(TextBox1, True)
C1Magnify1.SetEnableMagnifier(NumericUpDown1, True)
End Sub
Private Sub C1Magnify1_MagnifierShowing(sender As System.Object, e As C1.Win.TouchToolKit.MagnifierEventArgs)
Handles C1Magnify1.MagnifierShowing
If e.TargetControl Is TextBox1 Then
Dim magnifier As C1Magnify = DirectCast(sender, C1Magnify)
magnifier.Shape = MagnifierShape.Rectangle
magnifier.Size = New Size(200, 30)
ElseIf e.TargetControl Is NumericUpDown1 Then
e.Cancel = True
Else
Dim magnifier As C1Magnify = DirectCast(sender, C1Magnify)
magnifier.Shape = MagnifierShape.Circle
magnifier.Size = New Size(100, 100)
End If
End Sub
C#
using C1.Win.TouchToolKit;
You can use the C1Magnify.MessageWhenClose property to post a message to the attached control when the
Magnifier Window is closed. The Default value is None.
None
Right Click
Left Click
Visual Basic
Imports C1.Win.TouchToolKit
C#
using C1.Win.TouchToolKit;
You can use the C1Magnify.MessageWhenMove property to post a message to the attached control when the
Magnifier Window is moving. The Default value is Mouse Move.
None
Mouse Move
Mouse Left Button Down
Visual Basic
Imports C1.Win.TouchToolKit
C#
using C1.Win.TouchToolKit;
Magnifier Limitations
C1Magnify Limitations
The following limitation exists for the C1Magnify control:
· Can't popup the Magnifier window for DropDown window.
C1MultiScaleImage Overview
Display higher resolution images by using the C1MultiScaleImage control. C1MultiScaleImage control can show
different images for different zoom factors. For example, the control can show normal size images for 100% zoom and
the control can show higher resolution images if the control is zoomed to 200%.
[Visual Basic]
c1MultiScaleImage1.Image = null;
c1MultiScaleImage1.Images.Clear();
[Visual Basic]
C1MultiScaleImage1.Image = Nothing
C1MultiScaleImage1.Images.Clear()
Zoom Policies
If a control has a property named "ZoomFactor", C1Zoom or C1ZoomPanel will get the control’s zoomfactor
automatically and set C1Zoom or C1ZoomPanel’s zoomfactor the same as the control’s zoomfactor.
TouchToolKit for Windows Forms provides built-in ZoomPolicy items and ZoomPolicy templates to support
standard controls and major 3rd party controls.
ZoomPolicy templates are provided as source code of C# and Visual Basic. You can modify a copy of the template to
implement your custom ZoomPolicy.
To uninstall the ZoomPolicy templates from Visual Studio, delete the following zip files manually located in the
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\1033 folder and
then run the deven.exe //installvstemplates.
C1Chart3DZoomPolicy.zip
C1ChartZoomPolicy.zip
C1CommandZoomPolicy.zip
C1FlexGridZoomPolicy.zip
C1ReportZoomPolicy.zip
C1ScheduleZoomPolicy.zip
C1TrueDBGridZoomPolicy.zip
VisualBasicPowerPacksZoomPolicy.zip
WPF_ElementHostZoomPolicy.zip
ComboBox ZoomPolicy
ComboBox will select all text when ComboBox.Font and ComboBox.Size change. The ComboBoxZoomPolicy is
used to disable this default behavior.
DataGridViewZoomPolicy
TouchToolKit provides DataGridViewZoomPolicy to get a better zoom result for DataGridView. It can zoom the Size
and Font for all Columns, Rows, or Cells.
If your C1DataGridView control has many rows and you try to change the default value for the rows or cells it may
causes a performance problem. To advoid this, you can try to change DataGridViewZoomPolicy.ZoomRowHeight
or DataGridViewZoomPolicy.ZoomCellStyleFont property value to False.
If you add new rows to the DataGridView control in code, use the C1Zoom.BeginAddControls and
C1Zoom.EndAddControls method.
FlowPanelLayoutZoomPolicy
The FlowLayoutPanelZoomPolicy is used to make sure the controls’ layout is always correct when zooming in and
zooming out. If you zoom in and then zoom out without using the FlowLayoutPanelZoomPolicy then the controls’
layout maybe incorrect. FlowLayoutPanelZoomPolicy can make sure that controls’ layout is always correct.
Initial zoomfactor is 100%, screenshot as shown below:
First zoom in the Form, then zoom out of the Form to 100%. The following table illustrates the difference between
enabling and disabling the FlowLayoutPanelZoomPolicy.
ListBoxZoomPolicy
ListBoxZoomPolicy ensures that the ListBox.ColumnWidth value changes when ListBox.MultiColumn is True and
ListBox.ColumnWidth is bigger than 0.
Set zoomfactor to 120%, the following table illustrates difference between enabling and disabling the
ListZoomPolicy.
MonthCalendarZoomPolicy
The MonthCalendar.Font and MonthCalendar.Size properties always remain unchanged. The
MonthCalendarZoomPolicy will move MonthCalendar to the center of the blank space.
Initial zoomfactor is 100%, as shown below:
The following table illustrates the difference between enabling and disabling MonthCalendarZoomPolicy. The
ZoomFactor is set to 120% for the enabled ZoomPolicy.
PictureBoxZoomPolicy
PictureBoxZoomPolicy improves the zoom result when the PictureBox.SizeMode property isn’t set to Zoom and
the ZoomFactor property is bigger than 1f.
The following table illustrates the difference between enabling and disabling the PictureBoxZoomPolicy. Note that the
ZoomFactor is set to 120% by default.
PropertyGridZoomPolicy
In some cases the PropertyGrid’s settings will not appear correct when zooming. The PropertyGridZoomPolicy gives
you a better zoom result.
The following image illustrates the PropertyGrid with its starting ZoomFactor set to 100%.
The following table illustrates the difference between the PropertyGrid without and with the ZoomPolicy when you
zoom by touch:
SplitContainerZoomPolicy
When you use the zoom operation, the SplitContainerZoomPolicy changes the SplitContainer.SplitLineWidth and
SplitContainer.SplitterDistance property values, so you can get the best zoom result.
TableLayoutPanelZoomPolicy
If the TableLayoutPanel's ColumnStyle.SizeType or RowStyle.SizeType property value is Absolute, the size of the
TableLayoutPanel, ColumnStyle.Width and RowStyle.Height properties do not change. The
TableLayoutPanelZoomPolicy will help you change the Column.Width and Row.Height in this case.
ToolStripZoomPolicy
By default, the ToolStrip’s font can't zoom. When you use the ToolStripZoomPolicy it can help you get the best zoom result.
The following table illustrates the difference between enabling and disabling the ToolStripZoomPolicy.
TreeViewZoomPolicy
If the following TreeView properties are not the default value when you zoom the TreeView, the TreeView.Size or
TreeView.Font property value will not change. The TreeViewZoomPolicy will help you change these value in this case.
TreeView.Indent
Note: In order to change the TreeNode.NodeFont property value, TreeViewZoomPolicy will enum all nodes of the
tree. If the tree has a lot of nodes, it may cause a performance issue. To avoid this problem, you can change the
"Enabled" property of TreeViewZoomPolicy to False.
ZoomPolicy
TouchToolKit for WinForms provides a group of Zoom Policies to give special support for C1 controls so that
TouchToolKit for WinForms and ComponentOne controls can work together well. In this section you will learn about
the policy for each ComponentOne Studio control.
C1ChartZoomPolicy
C1ChartZoomPolicy provides ability to change special properties of C1Chart, such as the following.
Font
Size
ChartLabel
ChartArea
Axis
PlotArea
So that, you can get the best zoom result when zooming C1Chart by using the C1ChartZoomPolicy.
The following table illustrates the difference between using and not using the C1ChartZoomPolicy when the
zoomfactor property is set to 120%:
Chart3DZoomPolicy
The C1Chart3DZoomPolicy provides ability to support C1Chart3D’s zooming behavior for optimal zooming.
The following table illustrates the difference between adding and not adding the C1Chart3DZoomPolicy.
C1MainMenuZoomPolicy
If you change Font or Size property's default value of C1MainMenu, you can get the best zoom result by using the
C1MainMenuZoomPolicy.
In C1MainMenu, initial zoomfactor is 100%, as shown below.
Set the zoomfactor to 120%. The following table illustrates the difference between adding and not adding the
C1MainMenuZoomPolicy.
C1DockingTabZoomPolicy
When you change Font or Size property's default value of C1DockingTab, you can get the best zoom result by using
C1DockingTabZoomPolicy.
C1NavBarZoomPolicy
C1NavBarZoomPolicy provides ability to support C1NavBar’s zooming behavior.
Set zoomfactor to 130%, the following table can explain the differences between adding and not adding the
C1NavBarZoomPolicy.
C1OutBarZoomPolicy
If you change Font or Size property's default value of C1OutBar, you can get the best zoom result by using
C1OutBarZoomPolicy.
In C1OutBar, Initial zoomfactor is 100%, screenshot is as below.
The following table illustrates the differences between adding and not adding the C1OutBarZoomPolicy. The
ZoomFactor property is set to 130%.
C1FlexGridZoomPolicy
If you change the values of the C1FlexGrid.Colunm.Width, C1FlexGrid.Row.Height, C1FlexGrid.Font, and
C1FlexGrid.Size properties, adding the C1FlexGridZoomPolicy in your application can help you get a better zoom
result.
Initial zoomfactor is 100%, screenshot is as below.
The following table illusrates the difference between adding and not adding the C1FlexGridZoomPolicy. The
ZoomFactor is set to 120%.
C1CalendarZoomPolicy
If you set the C1Calendar.Theme.BaseFont, you can add the C1CalendarZoomPolicy to get the best zoom result
when you zoom C1Calendar.
The Initial zoomfactor is 100% as shown below:
Set zoomfactor to 120%. The following table illustrates the difference between adding and not adding the
C1CalendarZoomPolicy:
C1ScheduleZoomPolicy
When you set the C1Schedule.Theme.TimeRulerMinutesFont, you can get the best zoom result by using the
C1ScheduleZoomPolicy.
The following table illustrates the ZoomFactor set at 120% for C1Schedule. The font size for the TimeRuler minutes
font is set to 6 pixels. Notice the difference in the font when using and not using the C1ScheduleZoomPolicy.
C1PrintPreviewControlZoomPolicy
If you change the value of the C1PrintPreviewControl.Font property, add the C1ReportZoomPolicy to make sure that
every element in the C1PrintPreviewControl zooms correctly.
The initial zoomfactor is 100%, as shown below:
To see the difference between using and not using the C1ReportZoomPolicy, complete the following:
1. Set the ZoomFactor property to 125%
2. Run the project to see the C1PrintPreview control zoomed using the C1PrintPreviewControlZoomPolicy.
3. At design time set the C1PrintPreviewControlZoomPolicy to disable and run the project.
The following table illustrates the ZoomFactor set at 125% for C1PrintPreview and illustrates the difference between
adding and not adding the C1PrintPreviewControlZoomPolicy.
C1RibbonZoomPolicy
C1TrueDBGridZoomPolicy
C1TrueDBGridZoomPolicy changes C1TrueDBGrid.CellTipsWidth, C1TrueDBGrid.DefColWidth,
C1TrueDBGrid.RecordSelectorWidth, or some other properties, so you can get the best zoom result.
Initial zoomfactor is 100%, part screenshot is as below.
The following table illustrates the difference between adding and not adding the C1TrueDBGridZoomPolicy.
VisualBasicPowerPacks
Visual Basic Power Packs is a Visual Basic 6.0 compatibility feature provided by Microsoft.
TouchToolKit for WinForms provides the VisualBasicPowerPacksZoomPolicy to support ShapeContainer’s zooming
behavior.
The following table illustrates the difference between adding and not adding the
VisualBasicPowerPacksZoomPolicy. Note that the ZoomFactor is set to 130%.
WPF Interoperability
WPF Interoperability is a technology of using Windows Presentation Foundation (WPF) in a Windows Forms project.
TouchToolKit for WinForms provides WPF_ElementHostZoomPolicy to support ElementHost’s zooming behavior.
8. Click Add Custom Policy drop down button in the ZoomPolicy Collection Editor window,
WPF_ElementHostZoomPolicy will be added.
TileControlZoomPolicy
1. Select Add New Item from the Visual Studio Project menu.
2. Select Visual C# Items from the left pane of the Add New Item window.
3. Next, select the C1TileControlZoomPolicy from the middle pane
4. Click the Add button.
5. Add the C1TileControl control to your form.
6. Build the project.
7. Add the C1Zoom, C1ZoomPanel or C1ApplicationZoom component to your form at design time.
8. Click the smart tag anchor of the component, and click Edit ZoomPolicies....
9. Click the Add Custom Policy button in the ZoomPolicy Collection Editor window.
10. The C1TileControlZoomPolicy is added to the Members list.
C1SplitContainerZoomPolicy
1. Select Add New Item from the Visual Studio Project menu.
2. Select Visual C# Items from the left pane of the Add New Item window.
3. Next, select the C1SplitContainerZoomPolicy from the middle pane
4. Click the Add button.
5. Add the C1SplitContainer control to your form.
6. Build the project.
7. Add the C1Zoom, C1ZoomPanel or C1ApplicationZoom component to your form at design time.
8. Click the smart tag anchor of the component, and click Edit ZoomPolicies....
9. Click the Add Custom Policy button in the ZoomPolicy Collection Editor window.
10. The C1SplitContainerZoomPolicy is added to the Members list.
TabControlZoomPolicy
C1GanttViewZoomPolicy
1. Select Add New Item from the Visual Studio Project menu.
2. Select Visual C# Items from the left pane of the Add New Item window.
3. Next, select the C1GanttViewZoomPolicy from the middle pane
4. Click the Add button.
5. Add the C1GanttView control to your form.
6. Build the project.
7. Add the C1Zoom, C1ZoomPanel or C1ApplicationZoom component to your form at design time.
8. Click the smart tag anchor of the component, and click Edit ZoomPolicies....
9. Click the Add Custom Policy button in the ZoomPolicy Collection Editor window.
10. The C1GanttViewZoomPolicy is added to the Members list.
C1GaugeZoomPolicy
1. Select Add New Item from the Visual Studio Project menu.
2. Select Visual C# Items from the left pane of the Add New Item window.
3. Next, select the C1GaugeZoomPolicy from the middle pane
4. Click the Add button.
5. Add the C1Gauge control to your form.
6. Build the project.
7. Add the C1Zoom, C1ZoomPanel or C1ApplicationZoom component to your form at design time.
8. Click the smart tag anchor of the component, and click Edit ZoomPolicies....
9. Click the Add Custom Policy button in the ZoomPolicy Collection Editor window.
10. The C1GaugeZoomPolicy is added to the Members list.