Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Grid doesnt have style Property?

$
0
0

Hi,

I would like to style my grid using ResourceDictionary but it wont allow me as it doesnt have propery. How can i do that?

<Grid x:Name="myGrid"  Style="{StaticResource grdStyle})></Grid><Style TargetType="{x:Type Grid}" x:Key="grdStyle"><Setter Property="VerticalAlignment" Value="Top"/><Setter Property="HorizontalAlignment" Value="left"/><Setter Property="Margin" Value="10,0"/><Setter Property="Width" Value="600"/></Style>


&quot;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&quot;


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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