Please tell me how to access flipview control inside Hubsection *DataTemplate*
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
var sec = testHub.Sections[0]; var gridViewSelect = sec.FindName("Section4Header") as GridView;
FindName does the trick...
To access any control inside a HubSection you can do something like this:
EDIT: in order to use FindVisualChild extension method you have to use MyToolkit project. You can download it as a Nuget Package and see the project here.
Hope it helps! :D
EDIT 2: The code for FindVisualChild can be found here: https://mytoolkit.codeplex.com/SourceControl/latest#Shared/UI/FrameworkElementExtensions.cs
I don't know if you managed to solve your problem already. If you didn't here is how.
usage is very simple, for example in my case
Where HUB_HC is my HubSection name and SemanaHC is a combobox inside that HubSection witch is also inside of a StackPanel. It works for me and it's simple to use
Reference: How to access a Control inside the data template in C# Metro UI in the code behind
The best way to deal with this is to have a user control inside the DataTemplate. And UserControl will have the Flipview, so you can easily access the flipview there.