怎么说,这ModernUI文本框风格完全改变
的外观改变这种
当所有我做的是添加此样式:
<UserControl.Resources>
<Style TargetType="{x:Type TextBox}">
<Setter Property="TextAlignment" Value="Right"/>
</Style>
</UserControl.Resources>
当我设置属性可怕ctly的元素:
<TextBox Text="" TextAlignment="Right"></TextBox>
一切看起来良好:
我真的不明白,并会在短期一丝感激。
哦宕大卫创建一个样式,您可以通过从字面上秒打我笑+1只是为了那个! –
感觉如此疯狂......如果我在编写时使用TargetType =“{x:Type TextBox}”和BasedOn =“{StaticResource {x:Type TextBox}}”来定义样式,那么它会按预期工作 – peter
OP没有任何风格应用,而且是隐含的。您还应该包含一个示例,其中'BasedOn'基于隐式样式'{StaticResource {x:Type TextBox}}' – mclark1129