15,880,608 members
Home / Discussions / WPF

# WPF

 Re: How do I create xy plots with WPF APP (.NET Framework)? Eddy Vluggen16-Oct-21 3:13 Eddy Vluggen 16-Oct-21 3:13
 Re: How do I create xy plots with WPF APP (.NET Framework)? Gerry Schmitz16-Oct-21 9:46 Gerry Schmitz 16-Oct-21 9:46
 Re: How do I create xy plots with WPF APP (.NET Framework)? --- Solved Member 1539432817-Oct-21 4:44 Member 15394328 17-Oct-21 4:44
 Solution: Using the template on this web site - stackoverflow.com/questions/33756255/create-a-math-plot-in-c-sharp-xam .xaml .cs //------------------------------ private void AddPlot() { double dPI = Math.PI; Polyline poXY = new Polyline { Stroke = Brushes.Red }; int iNumOfCycles = 3; double dDeltaX = 0.01; int iNumOfPoints0 = (int)(iNumOfCycles / dDeltaX); for (int ii = 0; ii < iNumOfPoints0; ii++) { double dX = ii * dDeltaX; double dY = Math.Sin(2 * dPI * dX); poXY.Points.Add(CorrespondingPoint(new Point(dX, dY), iNumOfCycles)); } gCanvasPlot0.Children.Add(poXY); }//AddPlot //------------------------------ //------------------------------ private Point CorrespondingPoint(Point pt, int iNumOfCycles) { double dXmin = 0; double dXmax = iNumOfCycles; double dYmin = -1.1; double dYmax = 1.1; double dPlotWidth = dXmax - dXmin; double dPlotHeight = dYmax - dYmin; var poResult = new Point { X = (pt.X - dXmin) * gCanvasPlot0.Width / (dPlotWidth), Y = gCanvasPlot0.Height - (pt.Y - dYmin) * gCanvasPlot0.Height / (dPlotHeight) }; return poResult; }//CorrespondingPoint //------------------------------ This works.-- modified 18-Oct-21 11:02am.
 Re: How do I create xy plots with WPF APP (.NET Framework)? Gerry Schmitz17-Oct-21 11:30 Gerry Schmitz 17-Oct-21 11:30
 (xaml, wpf) ScrollViewer Binding confusion (beginner) Maximilien7-Oct-21 8:46 Maximilien 7-Oct-21 8:46
 Re: (xaml, wpf) ScrollViewer Binding confusion (beginner) Richard Deeming7-Oct-21 21:47 Richard Deeming 7-Oct-21 21:47
 Re: (xaml, wpf) ScrollViewer Binding confusion (beginner) Gerry Schmitz8-Oct-21 9:57 Gerry Schmitz 8-Oct-21 9:57
 Currency Entry Issue Kevin Marois7-Oct-21 7:23 Kevin Marois 7-Oct-21 7:23
 Re: Currency Entry Issue Richard Deeming7-Oct-21 21:44 Richard Deeming 7-Oct-21 21:44
 Re: Currency Entry Issue Kevin Marois8-Oct-21 6:03 Kevin Marois 8-Oct-21 6:03
 Quick MVVM Design Question Kevin Marois5-Oct-21 7:34 Kevin Marois 5-Oct-21 7:34
 Re: Quick MVVM Design Question Mycroft Holmes5-Oct-21 13:39 Mycroft Holmes 5-Oct-21 13:39
 Re: Quick MVVM Design Question Pete O'Hanlon5-Oct-21 20:26 Pete O'Hanlon 5-Oct-21 20:26
 Re: Quick MVVM Design Question Richard Deeming5-Oct-21 21:34 Richard Deeming 5-Oct-21 21:34
 Re: Quick MVVM Design Question Gerry Schmitz6-Oct-21 9:52 Gerry Schmitz 6-Oct-21 9:52
 Re: Quick MVVM Design Question #realJSOP9-Nov-21 23:37 #realJSOP 9-Nov-21 23:37
 Page/Frame michaelbarb23-Sep-21 10:12 michaelbarb 23-Sep-21 10:12
 Re: Page/Frame Gerry Schmitz24-Sep-21 12:48 Gerry Schmitz 24-Sep-21 12:48
 Re: Page/Frame michaelbarb24-Sep-21 13:24 michaelbarb 24-Sep-21 13:24
 Stuck with Weird Exceptions Kevin Marois7-Sep-21 13:51 Kevin Marois 7-Sep-21 13:51
 Re: Stuck with Weird Exceptions Richard Deeming7-Sep-21 21:28 Richard Deeming 7-Sep-21 21:28
 Re: Stuck with Weird Exceptions Kevin Marois8-Sep-21 4:58 Kevin Marois 8-Sep-21 4:58
 Disable ComboBox Hyperlinks Kevin Marois19-Aug-21 12:43 Kevin Marois 19-Aug-21 12:43
 Re: Disable ComboBox Hyperlinks Richard Deeming19-Aug-21 21:35 Richard Deeming 19-Aug-21 21:35
 Re: Disable ComboBox Hyperlinks Kevin Marois20-Aug-21 4:36 Kevin Marois 20-Aug-21 4:36
 Last Visit: 31-Dec-99 18:00     Last Update: 17-Apr-24 21:54 Refresh ᐊ Prev1...14151617181920212223 Next ᐅ