查找数据模板内的网格的子级 [英] find child which is a Grid inside a data template
本文介绍了查找数据模板内的网格的子级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<ListBox x:Name="lstMeetingTitleTime" BorderThickness="0,0,0,0"
Padding="0,0,0,0" Style="{StaticResource MeetingTitleListBoxStyle}"
ItemTemplate="{StaticResource MeetingTimeDataTemplate}"
ItemContainerStyle="{StaticResource ListBoxItemTitleTemp}">
我有一个列表框,其中有一个itemTemplate,其值是一个DataTemplate,它的样式与同一文件中的样式相同.在DAtaTemplate内有一个网格,我想在后面的代码中访问它..请帮助asap
I have a listbox which has a itemTemplate whose value is a DataTemplate which is in the style in the same file. Inside the DAtaTemplate there is a grid which i want to access in the code behind.. Pls help asap
推荐答案
看看VisualTreeExtensions.GetVisualDescendants
类- http://help.syncfusion.com/cr_83/cref_files/User%20Interface/Silverlight/Schedule/html/397d5587-6578-963f-42b4-9f00f41d72f2.htm [
这篇关于查找数据模板内的网格的子级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文