Reputation: 32213
I can't seem to get a transparent background for a DataForm in Silverlight 3 beta. The code below is what I am trying but it only makes the background partially transparent. Is there something I can do to fix it?
<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
Upvotes: 1
Views: 839
Reputation: 4518
By default the DataForm starts "Disabled" which means the corresponding Visual State alters the appearance.
If you override the default control template you will find a static resource named "DisabledColor". This is creating the slightly opaque white you are seeing. Just change that and you will be fine.
<SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
Upvotes: 3