I need to keep all my paths in a canvas so I can retrieve them easily. I found out that it works with VisualBrush
. When I try to retrieve the VisuahBrush
and put in into Style
s, it has error:
Object of the type System.Windows.Media.VisualBrush
cannot be applied to a property that expects the type Systems.Windows.Style
.
How else can I keep all my paths in a canvas and still retrievable in Style
s?
Any ideas will be a great help, thanks!
<VisualBrush x:Key="myVisualBrush">
<VisualBrush.Visual>
<Canvas>
<Path Fill="#FF231F20" Stretch="Fill" Width="12.69" Height="14.477" Canvas.Left="652.196" Canvas.Top="88.61" Data="F1M617.2051,52.7275C616.7281,52.4525,616.3391,52.6775,616.3391,53.2275L616.3391,66.4695C616.3391,67.0195,616.7281,67.2445,617.2051,66.9695L628.6721,60.3485C629.1481,60.0735,629.1481,59.6235,628.6721,59.3485z"/>
</Canvas>
</VisualBrush.Visual>
</VisualBrush>
<Style x:Key="myVisualStyle" BasedOn="{StaticResource myVisualBrush}" TargetType="{x:Type TextBox}">
<!-- Styles -->
</Style>