views:

44

answers:

0

Hi,

I have problems applying the following Style to multiple Path-Objects in XAML:

 <Style x:Key="cloudStyle" TargetType="Path">
  <Setter Property="Data" Value="M 410.67959 194.3815 C 392.37515 ...." />
  <Setter Property="StrokeMiterLimit" Value="4" />
  <Setter Property="StrokeMiterLimit" Value="4" />
  <Setter Property="StrokeLineJoin" Value="Round" />
  <Setter Property="StrokeEndLineCap" Value="Flat" />
  <Setter Property="Stretch" Value="Fill" />
</Style>

As long as I apply this Style to only one Path-Object, everything works fine. Otherwise the application crashes with a non-descriptive "AG_E_INVALID_ARGUMENT" Exception. If I omit the Data-Setter, the Style works with multiple Path-Objects. Because the Data string is quite long I omitted the whole thing. If it could be somehow related to this problem I will post this string, but I cannot imagine that this Data string cannot be applied to multiple instances.

The Style is located at top level in Application.Resources and is applied with the usual Style="{StaticResource cloudStyle}".

Does anyone have an idea how to solve this?

Thanks, Andrej