1
何らかの理由で、TextBoxのフォーカスされた背景をデフォルトの白の色から変更する方法がありません。フォーカスしたときのUWP TextBoxの背景
<VisualState x:Name="Focused">
<Storyboard>
...
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="#000000" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement" Soryboard.TargetProperty="Opacity">
<DiscreteObjectKeyFrame KeyTime="0" Value="0.1" />
</ObjectAnimationUsingKeyFrames>
:
それが動作する唯一の方法は、(私は暗いっぽいか透明にすることを必要とする)カスタムテキストボックス、(hereからの)コードのペーストbazzillionラインを作成し、2行を編集することです私の質問は:それを行うには良い方法はありますか?他のコードはすべて(240行まで)必要ですか? ありがとうございます。
あなたは[behaviors](https://blogs.windows.com/buildingapps/2015/11/30/xaml-behaviors-open-source-and-on-uwp/)を使用することができます。彼らと一緒に働いたことはありませんが、この種のカスタマイズを本当に簡単にするはずです。 –