Hello,
We have a control hierarchy similar to the following one in our application.
The number of menu times varies based on some business logic.
<actr:PopupButton Command="{StaticResource NewLaborDropDownCommand}">
<actr:Menu>
<actr:Menu.ItemsSource>
<MultiBinding Converter="{x:Static app:SREntityListConverterMultiple.Instance}" ConverterParameter="SR AvailableProblems">
<Binding Mode="OneWay"/>
<Binding RelativeSource="{RelativeSource Self}" Mode="OneWay"/>
</MultiBinding>
</actr:Menu.ItemsSource>
<actr:Menu.Resources>
<DataTemplate x:Key="NewLaborTypeMenuItemTemplate">
<actr:Button
Command="{StaticResource NewLaborCommand}"
CommandParameter="{Binding Mode=OneTime}"
Context="MenuItem" VariantSize="Small"
Label="{Binding LaborType.Name,Mode=OneTime}"
ScreenTipDescription=""
/>
</DataTemplate>
</actr:Menu.Resources>
<actr:Menu.ItemTemplate>
<DataTemplate>
<actr:PopupButton
Context="MenuItem" VariantSize="Small"
ImageSourceSmall="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=imagesourcesmall}"
ImageSourceLarge="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=imagesourcelarge}"
Label="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=formattednumber}"
>
<actr:Menu
ItemsSource="{Binding Mode=OneTime, Converter={x:Static app:ProblemLaborTypesConverter.Instance}}"
ItemTemplate="{StaticResource NewLaborTypeMenuItemTemplate}" />
</actr:PopupButton>
</DataTemplate>
</actr:Menu.ItemTemplate>
</actr:Menu>
</actr:PopupButton>
While automating, we could get the handler of the outermost Popup button only. We don't have any idea how to get the handler for the Menu and other children. We are using Visual UI Automation verify tool.
Any pointers will be really helpful.
Thanks,
Giri
[Modified at 10/17/2008 06:52 AM]
We have a control hierarchy similar to the following one in our application.
The number of menu times varies based on some business logic.
<actr:PopupButton Command="{StaticResource NewLaborDropDownCommand}">
<actr:Menu>
<actr:Menu.ItemsSource>
<MultiBinding Converter="{x:Static app:SREntityListConverterMultiple.Instance}" ConverterParameter="SR AvailableProblems">
<Binding Mode="OneWay"/>
<Binding RelativeSource="{RelativeSource Self}" Mode="OneWay"/>
</MultiBinding>
</actr:Menu.ItemsSource>
<actr:Menu.Resources>
<DataTemplate x:Key="NewLaborTypeMenuItemTemplate">
<actr:Button
Command="{StaticResource NewLaborCommand}"
CommandParameter="{Binding Mode=OneTime}"
Context="MenuItem" VariantSize="Small"
Label="{Binding LaborType.Name,Mode=OneTime}"
ScreenTipDescription=""
/>
</DataTemplate>
</actr:Menu.Resources>
<actr:Menu.ItemTemplate>
<DataTemplate>
<actr:PopupButton
Context="MenuItem" VariantSize="Small"
ImageSourceSmall="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=imagesourcesmall}"
ImageSourceLarge="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=imagesourcelarge}"
Label="{Binding Mode=OneTime,
Converter={x:Static ui:EntityUIConverter.Instance},
ConverterParameter=formattednumber}"
>
<actr:Menu
ItemsSource="{Binding Mode=OneTime, Converter={x:Static app:ProblemLaborTypesConverter.Instance}}"
ItemTemplate="{StaticResource NewLaborTypeMenuItemTemplate}" />
</actr:PopupButton>
</DataTemplate>
</actr:Menu.ItemTemplate>
</actr:Menu>
</actr:PopupButton>
While automating, we could get the handler of the outermost Popup button only. We don't have any idea how to get the handler for the Menu and other children. We are using Visual UI Automation verify tool.
Any pointers will be really helpful.
Thanks,
Giri
[Modified at 10/17/2008 06:52 AM]