filmov
tv
Draw a Line in WPF by Code
![preview_player](https://i.ytimg.com/vi/trTTQWd8OUE/maxresdefault.jpg)
Показать описание
small example how to draw a line in WPF
WPF,c#: eine Linie zeichnen in WPF
Views 0 Date 23.06.2015
WPF,c#: eine Linie zeichnen
Aufgabe: Ich möchte eine Linie in einem WPF Formular zeichnen. Die Linie dient zum Prüfen der Pixelwerte.
Hierzu ein kleines Code-Beispiel wie man eine Linie in WPF zeichnet.
Man erstellt ein Line Objekt, stellt die x und y Werte ein und fügt dann die Linie in das Hauptgrid des WPF Formulars zu
Hier der Beispiel-Code
private void btnStart_Click object sender, RoutedEventArgs e
Line objLine = new LineXX;
objLine.Stroke = System.Windows.Media.Brushes.Black; //Umriss
objLine.Fill = System.Windows.Media.Brushes.Black; //Fuellung
objLine.X1 = btnStart.ActualWidth + btnStart.Margin.Left ;
objLine.Y1 = btnStart.ActualHeight +btnStart.Margin.Top;
objLine.X2 = Application.Current.MainWindow.ActualWidth ;
objLine.Y2 = Application.Current.MainWindow.ActualHeight;
MainGrid.Children.Add objLine;
Das XAML Document besteht nur aus dem Grid und dem Start-Button
WPF,c#: eine Linie zeichnen in WPF
Views 0 Date 23.06.2015
WPF,c#: eine Linie zeichnen
Aufgabe: Ich möchte eine Linie in einem WPF Formular zeichnen. Die Linie dient zum Prüfen der Pixelwerte.
Hierzu ein kleines Code-Beispiel wie man eine Linie in WPF zeichnet.
Man erstellt ein Line Objekt, stellt die x und y Werte ein und fügt dann die Linie in das Hauptgrid des WPF Formulars zu
Hier der Beispiel-Code
private void btnStart_Click object sender, RoutedEventArgs e
Line objLine = new LineXX;
objLine.Stroke = System.Windows.Media.Brushes.Black; //Umriss
objLine.Fill = System.Windows.Media.Brushes.Black; //Fuellung
objLine.X1 = btnStart.ActualWidth + btnStart.Margin.Left ;
objLine.Y1 = btnStart.ActualHeight +btnStart.Margin.Top;
objLine.X2 = Application.Current.MainWindow.ActualWidth ;
objLine.Y2 = Application.Current.MainWindow.ActualHeight;
MainGrid.Children.Add objLine;
Das XAML Document besteht nur aus dem Grid und dem Start-Button
Draw a Line in WPF by Code
1. Draw Static and Dynamic Lines | Random Drawing WPF C#
WPF C#/VB - Shapes: Part 2 (Lines, Outlines & Exporting Shapes)
how to make a line on the c# GUI | how to draw a line on the c# GUI
ColorWheel Draw Coloured Lines in an WPF App
C# : How do you draw a line on a canvas in WPF that is 1 pixel thick
NE #74 WPF How to code using Shape.Line drawings for node links.
How to design shape in wpf
C# : How to draw a smooth curved line in WPF?
Learn WPF Geometries in 20 minutes
WPF Drawing proof of concept
C# Graphics How to Draw, move and copy a Line
C# : Draw dashed line in a WPF adorner
How to create a line chart in a WPF/UWP app using C# and XAML
Win Video WPF Path Markup
How to draw in C# using the Graphics Class - CSharp Programming
WPF: Learn about Paths and creating custom border shapes
C# : How Draw rectangle in WPF?
C# Tutorial - How to create line chart | FoxLearn
WPF Charts: create an XY line chart in .NET with LightningChart
WPF 2D Graphics Shapes & Drawing Tutorial
5. Custom and Random Thickness | Random Drawing WPF C#
Ensuring a Continuous Line on an Image in Your WPF Application
How To Draw A Line Between Two Points And Show Distance When Click And Release Mouse Button In Unity
Комментарии