PC SOFT

WINDEV的在线文档

  • 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)
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Handling a .NET 3.0, 4.0 control, ... (WPF) by programming

Overview
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)".
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 variable of the control 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 Xaml事件.

The following example is used to associate a procedure with the click event of the "OKButton" button. When a click is performed 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
Xaml事件DOTNET_Xaml_OK"OKButton""Click"ClickProcedure

// -- ClickProcedure procedure
过程ClickProcedure()
信息"The OK button was clicked"

Finding out or modifying the value of a .NET property of a .Net control (WPF)
To find out or modify the value of a property, use Xaml属性.

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
信息"Name of the control: "Xaml属性DOTNET_Xaml_OK"OKButton""Name"))
信息"Size of the font: "Xaml属性DOTNET_Xaml_OK"OKButton""FontSize"))