c# - ScaleY not work when using a Slider to Zoom in a Canvas WPF -


Need help understanding that why my code does not work XAML (no code behind)

  & lt; Window x: Class = "Chapter 02. ScaleInCustomSystem" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/ Winfx / 2006 / Xaml "title =" scale in custom system "height =" 310 "width =" 260 "& gt; & Lt; StackPanel Height = "280" width = "250" & gt; & Lt; Border borderbrush = "black" bordercutic = "1" height = "200" width = "200" margin = "20" & gt; & Lt; Canvas height = "200" width = "200" & gt; & Lt; Canvas.RenderTransform & gt; & Lt; TransformGroup & gt; & Lt; Scale Transform Scale Y = "- 1" /> & Lt; Translation Transform Y = "200" /> & Lt; / TransformGroup & gt; & Lt; /Canvas.RenderTransform> & Lt; Line X1 = "0" Y1 = "0" x2 = "80" Y2 = "80" stroke = "black" strokectination = "2" & gt; & Lt; Line.RenderTransform & gt; & Lt; ScaleTransform ScaleX = "{binding element name = slider, path = value}" scale Y = "{binding element name = slider, path = value}" /> & Lt; /Line.RenderTransform> & Lt; / Line & gt; & Lt; Rectangle canvas Tap = "100" canvas.lift = "30" width = "80" height = "40" stroke = "DarkRad" strokectination = "3" & gt; & Lt; Rectangle.RenderTransform & gt; & Lt; ScaleTransform ScaleX = "{binding element name = slider, path = value}" scale Y = "{binding element name = slider, path = value}" /> & Lt; /Rectangle.RenderTransform> & Lt; / Rectangles & gt; & Lt; / Canvas & gt; & Lt; / Border & gt; & Lt; Name of slider = "slider" min = "0" max = "3" value = "1" tilepacement = "bottom right" tickfrequency = "0.2" isssapoticated = "true" /> & Lt; / StackPanel & gt; & Lt; / Window & gt;  

When I run this code, the slider only scales the image on the X axis, and the y axis does nothing, when I only run the code with scaleY logic, It does not do anything What am i doing

EDIT: Just to clarify, I have taken this code from a code that I am reading WPF to know the name of the book is "Practical WPF Graphics Programming".

change value with value . This case is sensitive

  scale = "{binding element name = slider, path = value}" />  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -