# AutomationAssists
控制WPF应用程序是否能被自动化技术检测</br>
使用介绍:</br>
https://blog.csdn.net/qq_29198233/article/details/121098967</br>
示例代码:
<pre>
<code><Window x:Class="WPFDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFDemo"
xmlns:lan="https://schemas.lan.com/assists/automation"
mc:Ignorable="d"
lan:Assists.CanAutomationed="{Binding ElementName=checkBox,Path=IsChecked}"
Title="MainWindow" Height="450" Width="800">
<StackPanel >
<CheckBox Width="150" Height="30" Content="是否打开自动化" x:Name="checkBox"></CheckBox>
<Button Content="这是一个按钮"></Button>
<CheckBox Content="这是一个单选框"></CheckBox>
<TextBox Text="这是一个文本输入框"></TextBox>
</StackPanel>
</Window></code>
</pre>
示例展示:</br>
<img src="https://img-blog.csdnimg.cn/0fb0da9128774bb290069ff5624722d7.gif" width="500">