-
Dec 16th, 2014, 04:56 PM
#1
Vector graphic from xaml resource file
Sure its something simple but needs to be done a certain way.
I want to use a resource file and add an entry for a vectorized icon graphic to use as my notifyicon icon.
Here is my vectorized icon data:
Code:
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Grid>
<Path Data="F1M183.025,3329.47L183.025,3337.06 177.917,3337.06 177.917,3329.68C173.181,3329.66,168.773,3328.59,164.689,3326.46L164.689,3316.77C166.044,3317.87 168.062,3318.88 170.744,3319.82 173.427,3320.75 175.818,3321.28 177.917,3321.42L177.917,3308.69C172.458,3306.66 168.732,3304.46 166.737,3302.09 164.742,3299.72 163.745,3296.84 163.745,3293.43 163.745,3289.77 165.039,3286.65 167.63,3284.07 170.219,3281.49 173.648,3279.99 177.917,3279.57L177.917,3273.07 183.025,3273.07 183.025,3279.43C187.947,3279.67,191.622,3280.46,194.048,3281.81L194.048,3291.26C190.782,3289.28,187.109,3288.06,183.025,3287.62L183.025,3300.88C188.135,3302.73 191.797,3304.83 194.012,3307.2 196.228,3309.57 197.337,3312.43 197.337,3315.79 197.337,3319.66 196.102,3322.78 193.63,3325.15 191.155,3327.52 187.622,3328.96 183.025,3329.47z M177.917,3298.85L177.917,3287.76C174.673,3288.35 173.054,3290.04 173.054,3292.84 173.054,3295.24 174.673,3297.24 177.917,3298.85z M183.025,3310.68L183.025,3321.28C186.361,3320.77 188.031,3319.1 188.031,3316.28 188.031,3313.99 186.361,3312.13 183.025,3310.68z" Stretch="Uniform" Fill="#FF007C30" Width="12" Height="12" 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>
And I need to set my dynamically created (using the Forms reference) notifyicon's icon to it.
Whats the proper tag structure for it?
Tried using a DrawImage but isnt correct.
Currently using a embedded resource icon but just for kicks like to change it over to the xaml resource file
Thanks
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|