如何在Windows 10的AutoSuggestBox中定义建议区域?

时间:2015-08-20 11:15:48

标签: c# xaml windows-10

是否可以为AutoOuggestBox for Windows 10应用定义建议区域的大小?

1 个答案:

答案 0 :(得分:1)

像这样:

   var grid = VisualTreeHelper.GetChild(AutoSuggestBox, 0) as Grid;
           var border = grid?.FindName("SuggestionsContainer") as Border;
           if (border != null)
           {
              var height = border.ActualHeight;
              Debug.WriteLine(height);
           }