.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Rotate Hatch

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application

Dear forum

I want to do a rectangle filled with a hatch oriented in an arbitrary angle.

I have spent the whole day trying to do it but I have not succeed. Any idea how to do it?


Best Regards

View Complete Post

More Related Resource Links

Rotate GridView ???

How to rotate or make GridView to show data in 90 degree counterclockwise rotation. I want to show data by the first Row is field header and other rignt row show data record. (Beginning ASP.Net 2.0, VB, VWD 2005 Express)

How to Rotate a line 45degrees or 180 etc

Hi I need to rotate a line to certain angle.My code is private void UserControl1_Paint(object sender, PaintEventArgs e) { Graphics graphics = e.Graphics; Pen pn = new Pen(Color.Black); CustomLineCap myCap = new AdjustableArrowCap(5, 5, true); pn.CustomEndCap = myCap; graphics.DrawLine(pn, 0, e.Graphics.DpiY,e.Graphics.DpiX, e.Graphics.DpiY); } Now i need to rotate Line 45 degrees. can any one Help me please

Render Transform and Rotate Transfomr

Hi everyone I want draw a polygon and aply the user rotatetransform and translate transform when KeyDown Handled, but I dont know why if i aply the rotate transfor and then the translate transform the Axis Y and axis X did change I use the follow code, the container is a Canvas:   Polygon PolygonView = new Polygon();p.Points.Add(  new Point(0, 0));p.Points.Add(  new Point(60, 0));p.Points.Add(  new Point(60, 40));p.Points.Add(  new Point((40) , 40));p.Points.Add(  new Point((40), Figure.HEIGHT));p.Points.Add(  new Point(0, 20));p.Fill =   new SolidColorBrush(Colors.Red);    private void UserControl_KeyDown(object sender, KeyEventArgs e) {    TranslateTransform tt = new TranslateTransform();   RotateTransform rt = new RotateTransform();      TransformGroup tg = new TransformGroup();   switch (e.Key) { case Key.Left: f.PosX -= 20; break; case Key.Right: f.PosX += 20; break; case Key.Down: f.PosY += 20; break; case Key.Up: rt.CenterX = f.PosX; rt.CenterY = f.PosY; rt.Angle += 90; break; } tt.X = f.PosX; tt.Y = f.PosY; PolygonView.RenderTransform = tg; } Some body help me please !!!! Thanks....."En Busqueda del con

How to rotate a Path by an animation?

Hi! I want to rotate a Path in a DoubleAnimation, but following code does'nt works, what's the problem? Thanks! RotateTransform transform = new RotateTransform(); transform.Angle = 0; p.RenderTransform = transform; // p is a Path DoubleAnimation animation = new DoubleAnimation(); animation.From =transform.Angle; animation.To = transform.Angle + 90; animation.By = 1; animation.Duration = new Duration(TimeSpan.FromSeconds(2)); Storyboard.SetTarget(animation, transform); Storyboard.SetTargetProperty(animation, new PropertyPath(RotateTransform.AngleProperty)); Storyboard story = new Storyboard(); story.Duration = animation.Duration; story.Children.Add(animation); story.Begin();

Move, Resize, Rotate InkStrokes



I wrote a custom InkCanvas Adorner.  It has custom Selecting, Moving, Resizing, and Rotation. It works fine with UIElements (e.g., Rectangles, Ellipses, RichTextBoxes). It can also select InkStrokes.

However, how do you (Move, Resize, and Rotate) InkStrokes using a custom adorner.

I've tried wrapping the InkStrokes inside a ViewBox and that does not work.

Is there a way, WPF Team? I know the built-in Adorner does it. But I do not have that option now that the project has requirements for custom adorning.

All the Best,


Office VB.NET Developer

Rotate List View Item

Hi Everyone,

I am trying to create a "Did You Know?" web part on my SharePoint homepage that randomly flips through a list of facts one at a time.  The facts are stored in a SharePoint List.  How can I accomplish this?

Thank You

Image Rotate by Javascript


Hi ,

I have a DataTable in which i have some images i want to bind the image and want to rotating them only by javascript.

plz give me solution.


rotate a report

Is it possible to rotate an entire report?  The printer we use flips the paper over and prints on the back.  The paper contains a form we need to align to , so the report needs to be rotated 180 degrees to fit into the form,
John Schroeder

LIst box image Item -Rotate and save the rotated image to disk

<Window x:Class="DataBindingListBox.Window1"




 Title="Window1" Height="775" Width="1285" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow">


  <DataTemplate DataType="{x:Type MySample:Photo}" >   

   <Border Background="White" BorderBrush="#22000000" BorderThickness="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

    <Grid Name="ListItemGrid" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2" ShowGridLines="True" Background="Transparent">

     <TextBlock ></TextBlock>

     <!-- Drop Shadow -->

     <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="4" Background="Brown">


       <TranslateTransform X="2" Y="2" />




configuring logging to truncate or rotate a logfile


I have an application that is writing logging information to a file, I would like to find a means of rotating the logfile so that the file doesn't get too large.


Rotate the font


Dear all,

i want to rotate the font, may i know how to may it to 90' ?

 Private g As Graphics

        Dim width As Integer = 50
        Dim height As Integer = 60
         g.DrawString(p(i), New Font("Verdana", 12, FontStyle.Bold), Brushes.Black, xInterval * i + 50 + (width / 3), 500 - height - 25)


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend