locked
Outer Glow on Path element? RRS feed

  • Question

  • Hi there, im all pretty new to XAML / Expression blend and have a very basic question for you.

    I have a Path element that i would like to appear like it is "glowing", that is, to have the path in the middle with a solid line sourounded with a glow effect on its side.
    How would a newbie achive a think like that in expression blend, anyone?

    Nic

    Tuesday, March 23, 2010 7:49 PM

All replies

  • Someone else can probably provide a much better answer, but one simple way might be to duplicate the path, and apply a blur effect to the 2nd one underneath.  Select the path, then in the properties panel find effect (or search for it), and select new, blur effect.

     

    Wednesday, March 24, 2010 2:03 PM
    Moderator
  • Hi nironixon,

    place your path inside a grid or a border and add a DropShadowEffect on the Grid and the Border respectively. Your path inside the Grid or the Border will visually get the DropShadowEffect automatically. This technique does only work, when the background of the Border or the Grid is set to no brush. If you want to set a background to the grid itself with the path inside you simply put the grid inside another grid and set the desired background to the parent grid of the grid to the desired background brush.

    Here is an example that uses grids (XAML only):

      <Grid Height="76"
            HorizontalAlignment="Right"
            Margin="0,0,85,85"
            VerticalAlignment="Bottom"
            Width="196"
            Background="Black">
       <Grid>
        <Grid.Effect>
         <DropShadowEffect Color="#FFB42020" />
        </Grid.Effect>
        <Path Fill="White"
              Stretch="Fill"
              Stroke="Black"
              StrokeThickness="5"
              Margin="30.5,20.5,74.5,17.5"
              UseLayoutRounding="False"
              Data="M31,21 L73,58 L121,33" />
       </Grid>
      </Grid>
    

    Best regards,

    M. (LawBot)

    Thursday, March 25, 2010 9:07 AM