How can I get a transparent background for a DataForm in Silverlight 3?
I can't get a transparent background for the DataForm in Silverlight 3 beta. The code below is what I'm trying, but only makes the background partially transparent. Is there something I can do to fix this?
<Grid x:Name="LayoutRoot" Background="Orange">
<Border Background="Blue" Margin="100,0,0,100"/>
<Controls:DataForm x:Name="dataform" Background="Transparent" Margin="30"/>
</Grid>
Screenshot http://www.portnine.com/data/images/Misc/silverlight3.jpg
+1
a source to share
1 answer
By default, the DataForm runs Disabled, which means the corresponding visual state changes its appearance.
If you override the default control template, you will find a static resource named "DisabledColor". This creates the slightly opaque white that you see. Just change that and you should be fine.
<SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
+3
a source to share