在AutoSuggestBox中垂直居中文本 [英] Vertically centering text in AutoSuggestBox

查看:102
本文介绍了在AutoSuggestBox中垂直居中文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好, 


我正在尝试在AutoSuggestBox中垂直居中文字。 


1。我增加了默认文本框高度o 50px 

2.当我使用"verticalContentAlignment = center"时,占位符文本不会垂直居中。 

我试图添加填充,但它也没有用。 


是否有人解决了这个问题? 

我找到了Textbox的几个解决方案,但我找不到AutoSuggestBox 。 


感谢您的帮助! 

< AutoSuggestBox PlaceholderText =" Search" QueryIcon = QUOT;查找与QUOT; 
TextChanged =" AutoSuggestBox_TextChanged"
QuerySubmitted =" AutoSuggestBox_QuerySubmitted"
SuggestionChosen =" AutoSuggestBox_SuggestionChosen"高度= QUOT; 50"余量= QUOT; 452,362,529,0" VerticalContentAlignment =" Center" />

解决方案

< blockquote>

请参阅以下代码,了解Autosuggestbox的样式/模板,您可以根据需要更新


https://msdn.microsoft.com/en-us/library/windows/apps/mt185404.aspx


Hello, 

I am trying to vertically center text in AutoSuggestBox. 

1. I increased the default text box height o 50px 
2. Placeholder text does not vertically center when I used "verticalContentAlignment=center". 
I tried to add padding, but it did not work either. 

Does anybody solve this issue? 
I found couple solutions for Textbox but I cannot find for AutoSuggestBox. 

Thanks for your help in advance! 

 <AutoSuggestBox PlaceholderText="Search" QueryIcon="Find"
                TextChanged="AutoSuggestBox_TextChanged"
                QuerySubmitted="AutoSuggestBox_QuerySubmitted"
                SuggestionChosen="AutoSuggestBox_SuggestionChosen" Height="50"  Margin="452,362,529,0" VerticalContentAlignment="Center"/>

解决方案

Refer following code for style/template of Autosuggestbox which you can update as per your requirement

https://msdn.microsoft.com/en-us/library/windows/apps/mt185404.aspx


这篇关于在AutoSuggestBox中垂直居中文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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