Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

How to implemen implicit Style in Silverlight

$
0
0

In WPF, we can easily define a style at global scope like following code.

<Window x:Class="WpfImplicitStyle.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300"><Grid><Grid.Resources><Style TargetType="Button"><Setter Property="Background" Value="AliceBlue" /></Style></Grid.Resources><StackPanel><Button>Button a</Button><Button>Button b</Button></StackPanel></Grid></Window>

But in Silverlight, we need to set style like this: Style="{StaticResource someStyle}" one by one, which in serious trouble. Is there any other solution?

Thanks.


Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>