PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Associating some WLanguage procedures with an event of a ".Net control (WPF)"
  • Finding out or modifying the value of a .NET property of a .Net control (WPF)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling a .NET 3.0, 4.0 control, ... (WPF) by programming
Overview
Versions 16 and later
Caution: The Xaml control found in the earlier WINDEV versions (up to version 15) is now called the .NET 3.0, 4.0 control, ... (WPF). In this documentation, we will be using the term of ".Net control (WPF)".
New in version 16
Caution: The Xaml control found in the earlier WINDEV versions (up to version 15) is now called the .NET 3.0, 4.0 control, ... (WPF). In this documentation, we will be using the term of ".Net control (WPF)".
Caution: The Xaml control found in the earlier WINDEV versions (up to version 15) is now called the .NET 3.0, 4.0 control, ... (WPF). In this documentation, we will be using the term of ".Net control (WPF)".
WINDEV enables you to handle a .Net control (WPF) by programming. To do so, use the control variable in the code.
The variable of the.Net control (WPF) corresponds to the name of the.Net control (WPF).
The Net control (WPF) uses the XamlXXX functions.
Associating some WLanguage procedures with an event of a ".Net control (WPF)"
To associate a procedure written in WLanguage with a specific event of a.Net control (WPF), use XamlEvent.
The following example is used to associate a procedure with the click event of the "OKButton" button. During a click on the OKButton button, the "ClickProcedure" procedure will be run and it will display "The OK button was clicked".
// -- Initialization code of "DOTNET_Xaml_OK"
DOTNET_Xaml_OK = [
OK
]
// Associate the "ClickProcedure" procedure
// with the "Click" event on the "OKButton" button
XamlEvent(DOTNET_Xaml_OK, "OKButton", "Click", ClickProcedure)
// -- ClickProcedure procedure
PROCEDURE ClickProcedure
Info("The OK button was clicked")
Finding out or modifying the value of a .NET property of a .Net control (WPF)
To get or modify the value of a property, use the XamlPropertyfunction.
The following example is used to display the "Name" and "FontSize" properties of the control, that respectively define the name of the control and the size of the font for this control.
// -- Initialization code of "DOTNET_Xaml_OK"
DOTNET_Xaml_OK = [
OK
]
// Display the values of the "Name" and "FontSize" properties
Info("Name of the control: ", XamlProperty(DOTNET_Xaml_OK, "OKButton", "Name"))
Info("Size of the font: ", XamlProperty(DOTNET_Xaml_OK, "OKButton", "FontSize"))
Minimum required version
  • Version 11
Comments
Click [Add] to post a comment