Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

[RESOLVED] Multi Color XAML Images/Icons

$
0
0
So got the need to add a warning image to our app and sure is easy with Metro Studio but how can I use more than one color in the xml Path Data?

I have the yellow warning triangle image with teh exclamation point inside it but the exclamation point is transparent. I want it to be black and still have the background retain its transparency.

Thanks

Example of the xaml


Code:

<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <Grid>
    <Grid Name="backgroundGrid" Width="48" Height="48" Visibility="Collapsed" />
    <Path Data="F1M874.094,289.369L854.3,254.63C854.028,254.151 853.515,253.856 852.958,253.856 852.403,253.856 851.89,254.151 851.617,254.63L831.824,289.369C831.555,289.84 831.559,290.416 831.835,290.883 832.111,291.348 832.618,291.634 833.165,291.634L872.752,291.634C873.299,291.634 873.805,291.348 874.081,290.883 874.357,290.416 874.361,289.84 874.094,289.369 M855.653,287.189L850.264,287.189 850.264,282.745 855.653,282.745 855.653,287.189z M855.653,279.41L850.264,279.41 850.264,266.077 855.653,266.077 855.653,279.41z" Stretch="Uniform" Fill="#FFFCCE00" Width="48" Height="48" Margin="0,0,0,0" RenderTransformOrigin="0.5,0.5">
      <Path.RenderTransform>
        <TransformGroup>
          <TransformGroup.Children>
            <RotateTransform Angle="0" />
            <ScaleTransform ScaleX="1" ScaleY="1" />
          </TransformGroup.Children>
        </TransformGroup>
      </Path.RenderTransform>
    </Path>
  </Grid>
</Viewbox>

Attached Images
 

Viewing all articles
Browse latest Browse all 256

Trending Articles



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