【问题标题】:How change focused TextBox style on Windows 10 UWP XAML?如何更改 Windows 10 UWP XAML 上的焦点文本框样式?
【发布时间】:2016-11-14 17:47:33
【问题描述】:

当文本框获得焦点时,如何将自定义样式(来自资源)应用到文本框。

我通常的解决方案

<Style TargetType="TextBox" x:Key="NoteBox">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
</Style>

不影响焦点或选定状态。

【问题讨论】:

    标签: c# xaml uwp win-universal-app uwp-xaml


    【解决方案1】:

    您必须在其 VisualState 中编辑 Setter。可以获取默认模板here

    只需复制它并编辑Focused VisualState 中的值。

    【讨论】:

      猜你喜欢
      • 2012-01-09
      • 2017-05-16
      • 1970-01-01
      • 2011-11-27
      • 2018-06-24
      • 2015-01-29
      • 1970-01-01
      • 2016-11-08
      • 2019-05-13
      相关资源
      最近更新 更多