How to Render a Path using Geometry
Posted: 02 Nov 2015, 21:19
The following renders fine in visual studio with the [Has Geometry Here] filled in utilizing a rectangle to contain the resource. How can I modify this code to render using Noesis?
I am attempting to use a icon library that is formatted with the following objects as a static resource for each icon.
The icons would then be included as a rectangle in the application as follows.
This has no issue rendering in Visual Studio or WPF Applications. How can I get the included static resource to render in noesis/what do I need to change tom make them render.
Below is a full example without using static resources for testing purposes.
I am attempting to use a icon library that is formatted with the following objects as a static resource for each icon.
Code: Select all
<Canvas x:Key="IconGlobe" >
<Path Fill="#FFFFFFFF">
<Path.Data>
<Geometry>[Has Geometry Here]</Geometry>
</Path.Data>
</Path>
</Canvas>
Code: Select all
<Rectangle Style="{StaticResource MediumContent}" Margin="0,0,10,0">
<Rectangle.Fill>
<VisualBrush Visual="{StaticResource IconGlobe}"/>
</Rectangle.Fill>
</Rectangle>
Below is a full example without using static resources for testing purposes.
Code: Select all
<Rectangle Width="30" Height="30">
<Rectangle.Fill>
<VisualBrush >
<VisualBrush.Visual>
<Path Fill="#FFFFFFFF">
<Path.Data>
<Geometry>m 4.05467 1039.4287 c 0.85504 -5.7384 1.88225 -11.1531 2.28265 -12.0328 0.54267 -1.1922 1.75885 -1.9365 4.77732 -2.9237 2.22713 -0.7284 4.13425 -1.2335 4.23806 -1.1224 0.1038 0.111 0.3913 6.1218 0.63888 13.3572 l 0.45014 13.1552 -6.97085 0 -6.97087 0 1.55467 -10.4335 z m 15.041 4.8387 c -10e-4 -3.0771 -0.19899 -9.4478 -0.43918 -14.1571 l -0.4367 -8.5624 3.47351 -1.5788 3.47351 -1.5789 0 2.9403 c 0 1.6172 0.19783 5.8405 0.43962 9.3852 l 0.43961 6.4449 13.95533 0 13.95534 0 0.43958 -6.4449 c 0.24181 -3.5447 0.43958 -7.768 0.43958 -9.3852 l 0 -2.9403 3.47351 1.5789 3.4735 1.5788 -0.43668 8.5624 c -0.24013 4.7093 -0.4378 11.08 -0.43913 14.1571 l 0 5.5948 -20.90324 0 -20.90324 0 -0.002 -5.5948 z m 44.50886 -0.3024 c 0.001 -3.2434 0.19789 -9.3297 0.43646 -13.5251 l 0.43379 -7.628 4.02557 1.558 c 2.21418 0.857 4.4258 2.1121 4.91499 2.7893 0.48908 0.6772 1.60827 6.0624 2.48698 11.9671 l 1.59768 10.7359 -6.94913 0 -6.94913 0 0 -5.8972 z m -35.40059 -17.6432 c -0.5194 -8.9981 -0.2658 -10.4004 1.606 -8.881 4.54084 3.6862 15.84201 3.6862 20.38285 0 1.85967 -1.5096 2.10147 -0.1562 1.58341 8.8635 l -0.48462 8.4369 -11.30084 0 -11.3008 0 -0.486 -8.4194 z m 6.74019 -10.0376 c -1.1126 -0.538 -2.71869 -1.5629 -3.56911 -2.2776 -2.55317 -2.1456 -5.61295 -8.4193 -6.0069 -12.3164 l -0.35804 -3.54173 14.99129 0 14.99125 0 -0.3631 3.59233 c -0.46166 4.5664 -3.90384 10.7392 -7.3898 13.2518 -3.14233 2.2649 -9.00832 2.8811 -12.29559 1.2916 z m -9.65521 -20.89503 c -6.30901 -1.0015 -8.21938 -3.0098 -4.16789 -4.3815 1.45309 -0.492 2.02288 -1.0832 2.02288 -2.099 0 -3.0235 1.59149 -6.82519 3.84643 -9.18829 2.01913 -2.1159 5.32167 -4.2534 6.5717 -4.2534 0.20385 0 0.37064 2.008 0.37064 4.4623 0 4.90379 1.04348 6.69729 3.03434 5.21519 0.74244 -0.5527 1.01145 -2.02029 1.01145 -5.51759 l 0 -4.7647 2.0229 0 2.02289 0 0 4.7647 c 0 3.4973 0.26901 4.96489 1.01144 5.51759 1.99087 1.4821 3.03435 -0.3114 3.03435 -5.21519 0 -2.4543 0.16678 -4.4623 0.37063 -4.4623 1.00268 0 4.20775 1.8954 5.78959 3.4238 2.53013 2.4447 3.96671 5.2623 4.41532 8.65979 0.31773 2.406 0.66813 3.0087 1.91251 3.2888 1.563 0.3519 2.63492 1.8649 1.9872 2.805 -0.9067 1.3158 -6.30397 1.9326 -18.52104 2.1163 -7.23185 0.1088 -14.76274 -0.059 -16.73534 -0.3715 z</Geometry>
</Path.Data>
</Path>
</VisualBrush.Visual>
</VisualBrush>
</Rectangle.Fill>
</Rectangle>