AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control .Net (WPF) / Control Xaml
  • 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
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Handling a .NET 3.0, 4.0, ... field (WPF) by programming
Overview
Attention: The Xaml field present until WINDEV 15 is now called the .NET 3.0, 4.0, ... field. (WPF) FIELD.. In this documentation, we will be using the term of ".Net control (WPF)".
WINDEV lets you manipulate a DotNet (WPF) field programmatically. 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. When theOK button is clicked, the "ProcedureClic" procedure is executed and displays "Click OK button".
// -- 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
PROCÉDURE 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("Control name: ", XamlProperty(DOTNET_Xaml_OK, "ButtonOK", "Name"))
Info("Font size: ", XamlProperty(DOTNET_Xaml_OK, "ButtonOK", "FontSize"))
Versión mínima requerida
  • Versión 11
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local