WPF finishing papers static resources

Original: WPF finishing papers static resources

In WPF If you set up a control style or rectangular pattern if Copy a new style that will double such as

Both times to the emergence of a new style will change, but to change the following rectangular me a good definition of a lot of trouble later Copy

 

Solutions to common style is set to static resources


  
  
  1. <Window.Resources>
  2. <LinearGradientBrush x:Key= "RectFill" EndPoint= "0.5,1" StartPoint= "0.5,0">
  3. <GradientStop Color= "Black" Offset= "0"/>
  4. <GradientStop Color= "#FFCB8787" Offset= "0.582"/>
  5. <GradientStop Color= "#FF8F6464" Offset= "0.808"/>
  6. </LinearGradientBrush>
  7. </Window.Resources>
  8. <Grid>
  9. <Rectangle Fill= "{StaticResource RectFill}" HorizontalAlignment= "Left" Height= "76" Margin= "85,70,0,0" Stroke= "Black" VerticalAlignment= "Top" Width= "243">
  10. </Rectangle>
  11. <Rectangle Fill= "{StaticResource RectFill}" HorizontalAlignment= "Left" Height= "76" Margin= "85,163,0,0" Stroke= "Black" VerticalAlignment= "Top" Width= "243">
  12. </Rectangle>
  13. </Grid>

Guess you like

Origin www.cnblogs.com/lonelyxmas/p/12075511.html