The Flip Method supports WPF/Silverlight.
The Flip Method is available in LEADTOOLS Document and Medical Imaging toolkits.
Flips the objects that are currently being edited (selected) in this
AnnAutomation.
Supported in Silverlight, Windows Phone 7
Syntax
Visual Basic (Declaration) | |
---|
Public Overridable Sub Flip( _
ByVal horizontal As Boolean _
) |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As AnnAutomation
Dim horizontal As Boolean
instance.Flip(horizontal) |
Parameters
- horizontal
- true to flip the object horizontally (reverse); false to flip the object vertically.
Example
Visual Basic | Copy Code |
---|
Private Sub AnnAutomation_Flip(ByVal automation As AnnAutomation)
' make sure no objects are selected
automation.SelectNone()
' see if we can flip? (should say no)
If (Not automation.CanFlip) Then
MessageBox.Show("Cannot flip objects because no objects are selected")
End If
' add a text object and select it
Dim text As AnnTextObject = New AnnTextObject()
text.FontFamilyName = "Arial"
text.FontSize = 20
text.FontWeight = AnnFontWeight.Bold
text.Foreground = Colors.Red
text.Text = "Flip Me!"
text.Rect = New Rect(100, 100, 200, 200)
automation.Container.Children.Add(text)
automation.StartEditing(text, False)
' flip this object vertically
MessageBox.Show("Now we are going to flip this text vertically")
If automation.CanFlip Then
automation.Flip(False)
End If
' flip this object horizontally (reverse)
MessageBox.Show("Now we are going to flip this text horizontally (reverse it)")
If automation.CanFlip Then
automation.Flip(True)
End If
End Sub |
C# | Copy Code |
---|
private void AnnAutomation_Flip(AnnAutomation automation)
{
// make sure no objects are selected
automation.SelectNone();
// see if we can flip? (should say no)
if(!automation.CanFlip)
MessageBox.Show("Cannot flip objects because no objects are selected");
// add a text object and select it
AnnTextObject text = new AnnTextObject();
text.Text = "Flip Me!";
text.FontFamilyName = "Arial";
text.FontSize = 20;
text.Foreground = Colors.Red;
text.FontWeight = AnnFontWeight.Bold;
text.Rect = new Rect(100, 100, 200, 200);
automation.Container.Children.Add(text);
automation.StartEditing(text, false);
// flip this object vertically
MessageBox.Show("Now we are going to flip this text vertically");
if(automation.CanFlip)
automation.Flip(false);
// flip this object horizontally (reverse)
MessageBox.Show("Now we are going to flip this text horizontally (reverse it)");
if(automation.CanFlip)
automation.Flip(true);
} |
SilverlightCSharp | Copy Code |
---|
private void AnnAutomation_Flip(AnnAutomation automation)
{
// make sure no objects are selected
automation.SelectNone();
// see if we can flip? (should say no)
if(!automation.CanFlip)
MessageBox.Show("Cannot flip objects because no objects are selected");
// add a text object and select it
AnnTextObject text = new AnnTextObject();
text.Text = "Flip Me!";
text.FontFamilyName = "Arial";
text.FontSize = 20;
text.Foreground = Colors.Red;
text.FontWeight = AnnFontWeight.Bold;
text.Rect = new Rect(100, 100, 200, 200);
automation.Container.Children.Add(text);
automation.StartEditing(text, false);
// flip this object vertically
MessageBox.Show("Now we are going to flip this text vertically");
if(automation.CanFlip)
automation.Flip(false);
// flip this object horizontally (reverse)
MessageBox.Show("Now we are going to flip this text horizontally (reverse it)");
if(automation.CanFlip)
automation.Flip(true);
} |
SilverlightVB | Copy Code |
---|
Private Sub AnnAutomation_Flip(ByVal automation As AnnAutomation)
' make sure no objects are selected
automation.SelectNone()
' see if we can flip? (should say no)
If (Not automation.CanFlip) Then
MessageBox.Show("Cannot flip objects because no objects are selected")
End If
' add a text object and select it
Dim text As AnnTextObject = New AnnTextObject()
text.Text = "Flip Me!"
text.FontFamilyName = "Arial"
text.FontSize = 20
text.Foreground = Colors.Red
text.FontWeight = AnnFontWeight.Bold
text.Rect = New Rect(100, 100, 200, 200)
automation.Container.Children.Add(text)
automation.StartEditing(text, False)
' flip this object vertically
MessageBox.Show("Now we are going to flip this text vertically")
If automation.CanFlip Then
automation.Flip(False)
End If
' flip this object horizontally (reverse)
MessageBox.Show("Now we are going to flip this text horizontally (reverse it)")
If automation.CanFlip Then
automation.Flip(True)
End If
End Sub |
Remarks
Requirements
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)
See Also