xDismiss
JointheStackOverflowCommunity
Signup
HowtoRotateShapesinC#
IhaveashapeinmyC#codelikeanellipse.NowIwanttoprogrammaticallyrotateit.Forexample,nowIhaveaverticalellipseandinthe
runningIwanttochangeittoahorizontalone.HowIsitpossible?
c# windows
editedJul3'14at21:57 askedJul3'14at20:42
michaelc35 AliNGame
307 2 11 160 9
3 WPF,Winforms?Whattechareyouusing?BradleyDotNETJul3'14at20:44
1 Withoutsomeinformationabouthowyourellipseisrepresentedand/orhowyou'redrawingit,it'simpossible
tosay.Typicallyyouuseatransformationmatrixtotransformtheshapeoritsindividualpoints.Butagain,
theformthatmatrixtakesdependsonyourshape'srepresentation.Withoutmoreinformationfromyou,we
can'tansweryourquestion.JimMischelJul3'14at21:16
Thankguys.mycodeisC#forwindowsphone8.inwindowsphoneprogrammingIaddusing
Microsoft.Expression.ShapesthenIusethiscodetoadditinaGrid: AliNGame Jul4'14at4:29
1Answer
ProblemSolved:
CompositeTransformco=newCompositeTransform();
co.Rotation=90;
btn.RenderTransform=co;
answeredJul4'14at6:54
AliNGame
160 9
http://stackoverflow.com/questions/24562995/howtorotateshapesincsharp 1/1