or
private
void btnDisplay_Click(object sender, RoutedEventArgs e)
{
try
{
for (int i = 1; i < 9; i++)
{
Image myImg = new Image();
myImg.Source =
new BitmapImage(new Uri("C:\\00002512\\00000000" + i.ToString() + ".TIF", UriKind.Absolute));
this.TransitionControl1.Content = myImg;
this.radProgressBar1.Value = i;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
I get this error : "Cannot perform action because the specified Storyboard was not applied to this object for interactive control." when I try to load the second image.
Can you help me?
thanks in advance
Max
<telerik:GridViewCell x:Name="theCell" |
BorderThickness="0" |
Foreground="{StaticResource ColorMessageText}" |
Value="{Binding Owner}" |
Margin="0,0,0,2" |
Content="Owner" |
Background="{x:Null}" |
BorderBrush="{x:Null}" |
FontSize="11" |
HorizontalAlignment="Left" |
HorizontalContentAlignment="Left" |
Width="90" |
Visibility="{Binding Column.IsVisible, Converter={StaticResource VisibilityOfBool}, ElementName=theCell}"/> |
<telerik:RadTabControl Name="RadTabControlAddress" SelectionChanged="RadTabControlAddress_SelectionChanged"> |
<telerik:RadTabControl.ItemContainerStyle> |
<Style TargetType="{x:Type telerik:RadTabItem}"> |
<Setter Property="ContentTemplate"> |
<Setter.Value> |
<DataTemplate> |
<Grid Name="Grid"> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="100" /> |
<ColumnDefinition Width="*"/> |
</Grid.ColumnDefinitions> |
<Grid.RowDefinitions> |
<RowDefinition /> |
</Grid.RowDefinitions> |
<TextBlock Text="{Loc address1}" Grid.Row="0" Grid.Column="0"></TextBlock> |
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Adresse.Adresse1 }" Height="30" Margin="5"></TextBox> |
</Grid> |
</DataTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</telerik:RadTabControl.ItemContainerStyle> |
</telerik:RadTabControl> |
private void AddAddressTab() |
{ |
_model.AddAddress(); |
RadTabItem itemToAdd = new RadTabItem() |
{ |
Header = "New Tab" |
}; |
RadTabControlAddress.Items.Add(itemToAdd); |
RadTabControlAddress.SelectedIndex = RadTabControlAddress.Items.Count - 1; |
} |
public AjouterView(AjouterViewModel model) |
{ |
InitializeComponent(); |
// Sauvegarde du model dans un attribut de la classe. |
_model = model; |
// On se sert de notre model en tant que DataContext. |
this.DataContext = model; |
//AddAddressTab(); |
} |
private IAdresse _adresse = null; |
public IAdresse Adresse |
{ |
get { return _adresse; } |
set |
{ |
_adresse = value; |
OnPropertyChanged("Adresse"); |
} |
} |
public void AddAddress() |
{ |
IAdresse address = new Adresse("Just a test"); |
ListAdresse.Add(address); |
Adresse = address; |
} |