2
2
2xx322016-11-12 17:26:23
WPF
2xx32, 2016-11-12 17:26:23

C# how to implement Control in WPF?

Write a C# program that implements the WPF control (Control) as a separate dynamic library.
An element that displays the state. States are displayed in color. Properties: element shape, current state.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Nemiro, 2016-11-12
@AlekseyNemiro

To write a WPF control as a library in C# , you need to launch Visual Studio (2015), select the menu File => New => Project . In the window that appears, go to Templates => Visual C# => Windows => Classic Application . In the list of templates, find and select WPF Custom Control Library . Enter the name of the project and click on the Ok button . Write some code :-)
As for writing code, maybe the following links will help you:
C# Programming Guide
+ Classes and Structures
+ Properties
Information on working with Windows Presentation Foundation can be found at the following link:
https://msdn.microsoft.com/en-us/library/ms754130(...

R
Rou1997, 2016-11-12
@Rou1997

Also, as in WinForms, using UserControl, "Project" - "Add Item" - "WPF User Control".
And for a separate dynamic library, you need to create a project of the "Class Library" type, also add a custom element to it, then put the built DLL into the bin\Debug folder of the application where it is needed, and add a link.

2
2xx32, 2016-11-12
@2xx32

And what about the element and its properties, can someone help with this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question