Hello Actipro,
I want to use the AnimatedWrapPanel but found that when using adorned elements, these are displaced. I managed to reproduce it within your sample app.
Please find the code
\Actipro Software\WPF-Controls\v24.1.1\SampleBrowser\ProductSamples\ViewsSamples\QuickStart\Common\ProductListBoxItem.xaml
and modify in this way, replace the Border named 'border' with the following:
<TextBox x:Name="ttt" Height="30" Width="50">
<TextBox.Text>
<Binding ElementName="ttt" Path="Text" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="True" NotifyOnValidationError="True">
<Binding.ValidationRules>
<validators:ValueIsNotNull ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
<TextBox.Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Static themes:SharedResourceKeys.TextBoxBaseStyleKey}}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<Grid>
<Border BorderBrush="Red" BorderThickness="1" HorizontalAlignment="Left">
<AdornedElementPlaceholder Name="ErrorTextAdorner"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
and define also this:
public class ValueIsNotNull : ValidationRule
{
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
{
return new ValidationResult(false, "Value must not be null");
}
}
This validator forces the adorner to be displayed.
Now, restore/maximize the window repeatedly and you will see that the red adorners are displaced. Please do not move the mouse when restoring/maximizing. Moving the mouse or clicking to another place forces the rendering of the adorners and they are placed in to correct places. In my case, I have a splitter between the wrappanel and another container, and it happens when moving the splitter.
This behavior is very disappointing. Please fix.