BerndK / SvgToXaml

Smart Tool to view svg-files and convert them to xaml for use in .NET
Other
886 stars 164 forks source link

Changing color is not working fine in demo app #26

Closed NaveenBadal closed 3 years ago

NaveenBadal commented 3 years ago

Hello,

I tried to use the functionality , changing of color icons dynamically , implemented in wpfdemoapp. In that app, I tried to place my svg icon xaml and when I am clicking the change color button, in the svg icon, only one part is getting colored yellow, all other are black.

Can you please help me out in this. This is the svg icon xaml file content.

<Geometry x:Key="cell_site_assignmentGeometry1">F1 M14.9,15.81z M0,0z M10.42,5.05L11.42,6.57C13.1,5.51 13.91,4.34 13.84,3.09 13.72,1.19 11.58,0.0900000000000003 11.33,4.44089209850063E-16L10.56,1.62C11,1.85 12,2.54 12,3.2 12,3.86 11.47,4.39 10.42,5.05z</Geometry>
<Geometry x:Key="cell_site_assignmentGeometry2">F1 M14.9,15.81z M0,0z M3.38,5.05C2.38,4.39 1.77,3.73 1.8,3.2 1.83,2.67 2.8,1.85 3.29,1.62L2.51,0C2.26,0.12 0.12,1.19 0,3.09 -0.07,4.34 0.74,5.51 2.42,6.57z</Geometry>
<Geometry x:Key="cell_site_assignmentGeometry3">F1 M14.9,15.81z M0,0z M8.11,12.86L8.45,12.66A4,4,0,0,1,8.45,11.97L8.11,11.77A0.46,0.46,0,0,1,7.93,11.22L8.18,10.63A0.44,0.44,0,0,1,8.69,10.37L9.07,10.47A3.17,3.17,0,0,1,9.56,10C9.56,9.87,9.49,9.74,9.46,9.61L9.46,9.61A0.46,0.46,0,0,1,9.58,9.19L7.79,5.59A2,2,0,0,0,8.9,3.81A2,2,0,0,0,4.9,3.81A2,2,0,0,0,6,5.59L0.9,15.81 5.9,13.81 7.9,13.81 8.14,13.91 7.93,13.4A0.44,0.44,0,0,1,8.11,12.86z</Geometry>
<Geometry x:Key="cell_site_assignmentGeometry4">F1 M14.9,15.81z M0,0z M14.72,13.28L14.43,13.11A2.91,2.91,0,0,0,14.43,12.52L14.72,12.35A0.38,0.38,0,0,0,14.87,11.88L14.87,11.88 14.66,11.37A0.38,0.38,0,0,0,14.22,11.15L13.89,11.23A2.65,2.65,0,0,0,13.48,10.82C13.48,10.71,13.54,10.6,13.56,10.49A0.37,0.37,0,0,0,13.34,10.05L12.84,9.84A0.38,0.38,0,0,0,12.37,10L12.19,10.29A1.88,1.88,0,0,0,11.61,10.29L11.43,10A0.38,0.38,0,0,0,11,9.84L10.5,10.05A0.37,0.37,0,0,0,10.28,10.49C10.28,10.6,10.28,10.71,10.36,10.82A2.65,2.65,0,0,0,9.95,11.23L9.62,11.15A0.38,0.38,0,0,0,9.18,11.37L8.97,11.88A0.38,0.38,0,0,0,9.12,12.35L9.41,12.52A2.91,2.91,0,0,0,9.41,13.11L9.12,13.28A0.38,0.38,0,0,0,8.97,13.75L9.18,14.25A0.37,0.37,0,0,0,9.62,14.47L9.95,14.39A3.25,3.25,0,0,0,10.36,14.81C10.36,14.92,10.3,15.03,10.28,15.13A0.39,0.39,0,0,0,10.5,15.58L11,15.78A0.4,0.4,0,0,0,11.15,15.78A0.36,0.36,0,0,0,11.47,15.6L11.65,15.31A2.91,2.91,0,0,0,12.24,15.31C12.29,15.41,12.35,15.5,12.41,15.6A0.36,0.36,0,0,0,12.88,15.75L13.38,15.55A0.39,0.39,0,0,0,13.6,15.1C13.6,15,13.55,14.89,13.52,14.78A2.33,2.33,0,0,0,13.93,14.36L14.26,14.44A0.37,0.37,0,0,0,14.7,14.22L14.91,13.72A0.38,0.38,0,0,0,14.72,13.28z M14.3,14.08L14,14A0.37,0.37,0,0,0,13.61,14.14A2.59,2.59,0,0,1,13.24,14.51A0.37,0.37,0,0,0,13.1,14.91C13.1,15.01,13.16,15.12,13.18,15.22L12.72,15.41C12.72,15.32,12.61,15.23,12.56,15.13A0.41,0.41,0,0,0,12.18,14.94A1.51,1.51,0,0,1,11.66,14.94A0.41,0.41,0,0,0,11.28,15.13C11.28,15.23,11.17,15.32,11.12,15.41L10.66,15.22C10.66,15.12,10.66,15.01,10.74,14.91A0.38,0.38,0,0,0,10.61,14.51A2.22,2.22,0,0,1,10.23,14.14A0.37,0.37,0,0,0,9.82,14L9.5,14.09 9.31,13.62 9.59,13.46A0.39,0.39,0,0,0,9.78,13.08A2.26,2.26,0,0,1,9.78,12.56A0.39,0.39,0,0,0,9.59,12.18L9.31,12 9.5,11.54 9.82,11.62A0.37,0.37,0,0,0,10.21,11.49A1.9,1.9,0,0,1,10.59,11.12A0.38,0.38,0,0,0,10.72,10.72C10.72,10.61,10.66,10.51,10.64,10.41L11.1,10.21 11.26,10.49A0.38,0.38,0,0,0,11.64,10.68A2.26,2.26,0,0,1,12.16,10.68A0.38,0.38,0,0,0,12.54,10.49C12.59,10.4,12.65,10.31,12.7,10.21L13.16,10.41C13.16,10.51,13.11,10.61,13.08,10.72A0.37,0.37,0,0,0,13.22,11.12A2.16,2.16,0,0,1,13.59,11.49A0.37,0.37,0,0,0,13.98,11.62L14.3,11.54 14.49,12 14.21,12.16A0.39,0.39,0,0,0,14.02,12.54A2.26,2.26,0,0,1,14.02,13.06A0.39,0.39,0,0,0,14.21,13.44L14.49,13.6z</Geometry>
<Geometry x:Key="cell_site_assignmentGeometry5">F1 M14.9,15.81z M0,0z M13.18,12.28L13.18,12.28A1.39,1.39,0,0,0,10.62,13.34A1.41,1.41,0,0,0,11.37,14.09A1.39,1.39,0,0,0,13.18,12.28z M12.27,13.71A1,1,0,0,1,11.53,13.71A1,1,0,0,1,11,13.19A1,1,0,0,1,11.53,11.91A0.94,0.94,0,0,1,11.9,11.84A1,1,0,0,1,12.27,13.71z</Geometry>
<DrawingGroup x:Key="cell_site_assignmentDrawingGroup" ClipGeometry="M0,0 V15.81 H14.9 V0 H0 Z">
    <DrawingGroup.Transform>
        <TranslateTransform X="0.00417676568031311" Y="0" />
    </DrawingGroup.Transform>
    <DrawingGroup Opacity="1">
        <DrawingGroup Opacity="1">
            <GeometryDrawing Brush="#FF000000" Geometry="{StaticResource cell_site_assignmentGeometry1}" />
            <GeometryDrawing Brush="#FF000000" Geometry="{StaticResource cell_site_assignmentGeometry2}" />
            <GeometryDrawing Brush="#FF000000" Geometry="{StaticResource cell_site_assignmentGeometry3}" />
            <GeometryDrawing Brush="#FF000000" Geometry="{StaticResource cell_site_assignmentGeometry4}" />
            <GeometryDrawing Brush="#FF000000" Geometry="{StaticResource cell_site_assignmentGeometry5}" />
        </DrawingGroup>
    </DrawingGroup>
</DrawingGroup>
<DrawingImage x:Key="cell_site_assignmentDrawingImage" Drawing="{StaticResource cell_site_assignmentDrawingGroup}" />
NaveenBadal commented 3 years ago

Solved by own. So closing it.