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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Render Transform and Rotate Transfomr

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :WPF
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

View Complete Post

More Related Resource Links

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Foundations: Render Text On A Path With WPF


With Windows Presentation Foundation (WPF) you can lay out text on a path, then animate the individual points defining the path and watch the characters bounce around in response.

Charles Petzold

MSDN Magazine December 2008

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

Scripting SQL: VBScript Interfaces in SQL Server 2000 Let You Transform Data and Provide Reports to


Application service providers often must send information to clients automatically rather than on-demand. For example, a manufacturer may want to know each day how many of their products were sold by a retail chain. While SQL Server is ideal for maintaining this type of database, you have to write scripts to get the data out in a client-friendly format. Here you will see how you can use Data Transformation Services (DTS), a powerful tool in SQL Server, to automate the retrieval and formatting of data from SQL Server 2000 and make the process of pushing data to your users a lot easier.

Alok Mehta and Daniel Williams

MSDN Magazine August 2002

Graphics: Manipulate Digital Images in Internet Explorer with the DirectX Transform SDK


The Microsoft DirectX Transform is a Microsoft DirectX media API that can be used to create animated effects as well as to create and edit digital images for Windows-based applications. Scripting and HTML can be used to display an existing transform on a Web page, and improved transform support in Microsoft Internet Explorer 5.5 makes it easy to use transforms. This article provides step-by-step instructions for writing a transform as an ATL project and shows an example of an image transform. C++ is used to instantiate, configure, and display transforms in this project.

Alex Lerner

MSDN Magazine March 2001

XML Wrapper Template: Transform XML Documents into Visual Basic Classes


The XML Wrapper template described in this article transforms XML documents into Visual Basic classes, hiding the more complex parts of using the Microsoft XML parser. Developers who have little knowledge of XML or the Microsoft XML parser can use classes created with the template, thus making it easier to use XML in their projects. This article describes the template, shows classes in a sample application based on the template, and explains how to customize those classes to support repeating child elements. Although this project is illustrated using Visual Basic 6.0, the technique can be extended for use with other versions of Visual Basic and with other languages.

Dave Grundgeiger and Patrick Escarcega

MSDN Magazine January 2001

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)

Render X textboxes + Validation?

Hey there, How can I render X amount of textboxes and still have all of them to require a value at validation? I dont know the variable X.. so it could be 1, it could 50.

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

Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

Different number of data in Report after using Render method.

Hello All, I have CRM4 report that i execute from outside the CRM system, using the ReportExecutionService2005.asmx web service, i get the report exported directly by calling the Render method of the webservice, but when i compare the data of the Report outside the CRM is less then the data in the report executed from within CRM system. I have tested the same report with same user in CRM and outside CRM but data is different. can someone guide me what is going wrong in the Render method.BharatKumar Bambhaniya Software Developer.

Render Form with Razor

Hello,I have the following form with Razor View Engine: @Html.BeginForm(MVC.CMS.User.Create(), FormMethod.Post, new { @class = "Horizontal" }) <|-- Form Fields --> @Html.EndForm() This is not rendering a form. Any idea?I had this working with Web Forms View Engine.Thanks,Miguel

WPF Toolkit Vs WPF Themes - conflict to render datapicker/calendar

Hi all   I have searched and i did not find a solution for this problem. The Theme that I have downloaded from http://wpf.codeplex.com/wikipage?title=WPF%20Themes are doing something wrong with my calendar and i could not find how resolve it.   The problem is kind of simple. http://picasaweb.google.com/dufagundes/I#5512056146096648290 this image show what is going on and I appreciated if someone know why is that.   tks

Nested UserControl Render Order

I have a custom control created in codebehind, and I have in the same control an ordinary asp.net button. Like this: protected void Page_Load(object sender, EventArgs e) { } private void MyTable() { Table table = new Table(); TableRow row = new TableRow(); TableCell cell = new TableCell(); CheckBox check = new CheckBox(); check.ID = "theId"; check.Text = "My Check"; check.AutoPostBack = true; cell.Controls.Add(check); row.Cells.Add(cell); table.Rows.Add(row); this.Controls.Add(table); } protected override void CreateChildControls() { MyTable(); base.CreateChildControls(); } And in the asmx something like this:<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyUserControl.ascx.cs" Inherits="Tester.MyUserControl" %> <asp:Button ID="Button1" runat="server" Text="Button" /> ok... now. When I render my control it looks like: [BUTTON] [ ] My Check But I really need that the button render after the checkbox. Any idea how can I do that?

Menu render issue with itemwrap

HiI have the following asp menu:        <asp:Menu runat="server" ItemWrap="true"            Width="200" RenderingMode="Table"             StaticDisplayLevels="3">            <Items>                <asp:MenuItem Text="Mainmenu">                    <asp:MenuItem Text="Submenu that is too long to fit onto a single line"></asp:MenuItem>                </asp:MenuItem>            </Items>        </asp:Menu>How can i fix that the second line of the submenu has the same margin as the first line?I'd really appreciate your help.Philipp

Transform a model's positions directly

Hi; I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong: As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime: a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations. b) Cast the model's Transform-property as a MatrixTransform3D and multiply its matrix with the Value-property of a Transformation (which i guess is pretty much case (a) ) c) Leave the Transform-property as a identity matrix and instead transform the model's Geometry.Positions property directly (provided you use a MeshGeometry3D) like such: int i; MeshGeometry3D mesh; mesh = (SomeModel.Geometry as MeshGeometry3D); for (i = 0; i < mesh.Positions.Count; i++) { mesh.Positions[i] = SomeTransform.Transform( mesh.Positions[i]); } On first glance, option (c) seems like the best (though not most intuitive) choice, especially when you need the actual positions of the model(s); for example to calculate hit-detection. Is there another way to easily access a model's current, transformed position(s)? And why does WPF transform a model's own space instead of just the actual coordinates? Kind regards, Frank
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