Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF UserControl validation problem
    primarykey
    data
    text
    <p>I have <code>UserControl</code> bounded to my view model. View model implements <code>IDataErrorInfo</code>. <code>UserConrol</code> has <code>Validation.ErrorTemplate</code>. In this template I use converter to show tooltip with errors:</p> <pre><code>&lt;UserControl.Style&gt; &lt;Style TargetType="{x:Type UserControl}"&gt; &lt;Setter Property="Validation.ErrorTemplate"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate&gt; &lt;DockPanel&gt; &lt;AdornedElementPlaceholder x:Name="adorner"&gt; &lt;Image x:Name="imgError" Width="32" Height="32" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Bottom" ToolTip="{Binding ElementName=adorner,Path=AdornedElement.(Validation.Errors),Converter={StaticResource ValidationErrors2TooltipConverter},ConverterParameter='Couldn't save hour work:'}" Source="{StaticResource ErrorDrawingImage}" /&gt; &lt;/AdornedElementPlaceholder&gt; &lt;/DockPanel&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/UserControl.Style&gt; </code></pre> <p>When I change some property (for instance: <code>ComboBox</code>'s selection), the number of error should change, but it doesn't. I couldn't find a way to refresh errors in <code>ToolTip</code>.</p> <p><strong>Questions:</strong></p> <ol> <li>How could I refresh errors in <code>ToolTip</code>.</li> <li>Validation works fine for <code>UserControl</code>, but doesn't work for components inside it. I defined <code>Validation.ErrorTemplate</code>'s for components in <code>UserControl</code>, but they are not visible, however controls bounded to view models (with <code>IDataErrorInfo</code>).</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload