在Silver light应用程序CUIT-2012层次结构中错误显示 [英] In Silver light application CUIT - 2012 hierarchy showing wrongly

查看:61
本文介绍了在Silver light应用程序CUIT-2012层次结构中错误显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经创建了Silverlight示例应用程序(目标silverlight版本4)

I have create silverlight sample application (Target silverlight version 4)

.

如果我在Label caontrol上添加断言,则层次结构即将出现,如图片所示

If I add assertion on Label caontrol, hieararchy is coming as shown in image 

========样本应用程序XAML ====

=======Sample Application XAML ====

< UserControl

    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:sdk =" http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"x:Class ="SilverlightApplication2.MainPage"
    xmlns:Test ="clr-namespace:SilverlightApplication2"
    mc:Ignorable ="d"
    d:DesignHeight ="300". d:DesignWidth ="400".名称="TestMain" AutomationProperties.AutomationId ="100">      

    < Grid x:Name =" LayoutRoot"背景=绿色".         

            < Grid x:Name =" TestUderstand"背景=黑色">

                < Button Content ="Button" Horizo​​ntalAlignment =左"保证金="91,100,0,0&"; VerticalAlignment =顶部"宽度="75"/

        </Grid>
        < sdk:Label x:Name =" TestLaeble"高度="28".保证金="206,93,74,0&" VerticalAlignment =顶部"宽度="120".背景=白色"/

    </Grid>
</UserControl>

    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:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="SilverlightApplication2.MainPage"
    xmlns:Test="clr-namespace:SilverlightApplication2"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Name="TestMain" AutomationProperties.AutomationId="100">      

    <Grid x:Name="LayoutRoot" Background="Green">         

            <Grid x:Name="TestUderstand" Background="Black">

                <Button Content="Button" HorizontalAlignment="Left" Margin="91,100,0,0" VerticalAlignment="Top" Width="75"/>

        </Grid>
        <sdk:Label x:Name="TestLaeble" Height="28" Margin="206,93,74,0" VerticalAlignment="Top" Width="120" Background="White"/>

    </Grid>
</UserControl>

=================== .

===================.

如果我在Label控件上添加断言,则层次结构将如图所示(标签位于按钮下方).但是对于其他技术(MSAA或UIA),情况就有所不同.

If I add assertion on Label control, hierarchy is coming as shown in image (Label is coming below the button). But for other technologies(MSAA or UIA) coming differently.

推荐答案

您好Rajenjar,

Hi Rajenjar,

正如我在此建议中所建议的:

As I suggested in this tread: http://social.msdn.microsoft.com/Forums/en-US/746ed875-a60b-487b-8f13-bea2e2b14e06/in-silverlight-application-for-user-control-control-type-is-consider-as-its-name-in-cuit?forum=vstest,I still suggest reporting this issue to the developer of Microsoft Visual Studio UI Test plugin for Silverlight.

谢谢


这篇关于在Silver light应用程序CUIT-2012层次结构中错误显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆