私は Microsoft Surface で作業しており、丸い画像オブジェクトを ScatterViewItem に添付しています。正方形の ScatterViewItem の背景を非表示にする際に問題が発生しています。入って背景を透明に設定すると、透明ではなく、灰色の半透明のようになります。最終的には、灰色の半透明のエッジを持つ正方形の上に座っている中央の丸い画像になります。これを隠すにはどうすればよいですか?私はC#を介してプログラムでこれを行っています。
2452 次
1 に答える
3
表示されているのは、実際には svi の背景ではなく、既定のテンプレートの一部である影です。影を取り除きたい場合は、コントロール テンプレートを再定義する必要があります。
このように:
<s:ScatterView>
<s:ScatterViewItem Background="Transparent">
<s:ScatterViewItem.Template>
<ControlTemplate>
<TextBlock>Hello World</TextBlock>
</ControlTemplate>
</s:ScatterViewItem.Template>
</s:ScatterViewItem>
</s:ScatterView>
Be aware that if you replace it like that, you lose all the other little visual flare like the 'pick up' effect and the shimmer. If you want to keep those, just use blend to edit a copy of the existing template and remove the shadow.
于 2009-10-02T16:16:46.890 に答える