![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Scaling How does scaling work in WPF, and how can some code to show it be written? Cesar |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Scaling Something like these:- 1) In code( you could so this in the OnStartUp of the Application class:- Button btn = new Button(); btn.LayoutTransform = new ScaleTransform(2, 2, 25, 25); Grid.SetRow(btn, 2); Grid.SetColumn(btn, 1); grid.Children.Add(btn); 2) via XAML:- <Button x:Name="btn1" Height="20" Width="50"> <Button.LayoutTransform> <MatrixTransform Matrix="3,0,0,3,0,0" ></MatrixTransform> </Button.LayoutTransform> Hello</Button> 3) via XAML:- <Button x:Name="btn1" Height="20" Width="50"> <Button.LayoutTransform> <ScaleTransform ScaleX="3" ScaleY="3" /> </Button.LayoutTransform> Hello</Button> You may also want to read about RenderTransform. -- Vipin Aravind http://www.explorewindows.com "CesarTabares" <CesarTabares@hotmail.com> wrote in message news:BF06B9F9-4576-41E6-982E-D720CDE61113@microsoft.com... > How does scaling work in WPF, and how can some code to show it be written? > > Cesar |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Scaling http://windowssdk.msdn.microsoft.com...d27fa748bf.asp shows an example using the RenderTransform property. Mike Jacobs [MS] "Vipin [MVP]" <Vipin@nospam.com> wrote in message news:O7nh5AKhGHA.652@TK2MSFTNGP03.phx.gbl... > > Something like these:- > 1) In code( you could so this in the OnStartUp of the Application class:- > Button btn = new Button(); > btn.LayoutTransform = new ScaleTransform(2, 2, 25, 25); > Grid.SetRow(btn, 2); > Grid.SetColumn(btn, 1); > grid.Children.Add(btn); > > 2) via XAML:- > <Button x:Name="btn1" Height="20" Width="50"> > <Button.LayoutTransform> > <MatrixTransform Matrix="3,0,0,3,0,0" ></MatrixTransform> > </Button.LayoutTransform> > Hello</Button> > > 3) via XAML:- > <Button x:Name="btn1" Height="20" Width="50"> > <Button.LayoutTransform> > <ScaleTransform ScaleX="3" ScaleY="3" /> > </Button.LayoutTransform> > Hello</Button> > > You may also want to read about RenderTransform. > > -- > Vipin Aravind > http://www.explorewindows.com > > "CesarTabares" <CesarTabares@hotmail.com> wrote in message > news:BF06B9F9-4576-41E6-982E-D720CDE61113@microsoft.com... >> How does scaling work in WPF, and how can some code to show it be >> written? >> >> Cesar > > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| DPI Scaling | Tutorials | |||
| Scaling | Vista installation & setup | |||
| window scaling | Vista General | |||
| DPI Scaling does not work | Vista installation & setup | |||