tags:

views:

51

answers:

1

I am getting following error randomly.

cannot convert string 'Top' in attribute 'VerticalAlignment' 
to object of type 'System.Windows.VerticalAlignment'. 
Top is not a valid value for VerticalAlignment.

Please suggest what could be causing this error to come up and why it is so random.

<ProgressBar Margin="10" Name="PBar" 
       HorizontalAlignment="Left" 
       VerticalAlignment="Top" 
       Width="150" Height="20" IsIndeterminate="True"> 
</ProgressBar>
A: 

It looks like some core WPF issue. Today i started getting simillar issue from another peice of code. Nothing seems to be wrong, but surely something is. Could it be related with the version of WPF or something else (I mean related to environment). New one is as follows.

Cannot convert string 'None' in attribute 'WindowStyle' to object of type 'System.Windows.WindowStyle'. None is not a valid value for WindowStyle.

Lalit