Strange DependencyProperty value
Hi,
I have created a UserControl to show images when provided an url but the strange thing is that sometimes for the value I get "Noesis::BaseComponent]", and before that I got ".?AVBaseComponent@Core@Noesis@@".
The xaml looks like this
where SelectedArticle.PreviewUrl is an array of strings.
I have a hack to avoid this but I was curious to see if this is a bug in my code or noesis.
The cv:ImagePreview is my user control to display the image.
The dependency property is defined like this
I have an older version of Noesis 2.1.0rc2 but I didn't see something like this fixed in the release notes. But it could also be that I didn't read the release notes thoroughly
I have created a UserControl to show images when provided an url but the strange thing is that sometimes for the value I get "Noesis::BaseComponent]", and before that I got ".?AVBaseComponent@Core@Noesis@@".
The xaml looks like this
Code: Select all
<ItemsControl ItemsSource="{Binding SelectedArticle.PreviewUrl}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0, 6, 0, 6">
<cv:ImagePreview ImageUrl="{Binding}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
I have a hack to avoid this but I was curious to see if this is a bug in my code or noesis.
The cv:ImagePreview is my user control to display the image.
The dependency property is defined like this
Code: Select all
public static DependencyProperty ImageUrlProperty = DependencyProperty.Register("ImageUrl", typeof(string), typeof(ImagePreview),
new FrameworkPropertyMetadata("", new PropertyChangedCallback(imageUrlChanged)));
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Strange DependencyProperty value
Hi,
BaseComponent is the class we internally use to box strings in the native side, but that should be automatically converted back to strings when going back to the C# side.
Could you please create a ticket in our bugtracker and attach an example that reproduces the problem? We will take a look and will try to solve it as soon as possible.
BaseComponent is the class we internally use to box strings in the native side, but that should be automatically converted back to strings when going back to the C# side.
Could you please create a ticket in our bugtracker and attach an example that reproduces the problem? We will take a look and will try to solve it as soon as possible.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Strange DependencyProperty value
I just did a quick test and it seems to be working as expected with the latest version.
I receive objects of type string in the PropertyChangedCallback args, and the property ImageUrl is correctly updated with the corresponding string.
Could you try with the latest 2.1.0f1 version?
I receive objects of type string in the PropertyChangedCallback args, and the property ImageUrl is correctly updated with the corresponding string.
Could you try with the latest 2.1.0f1 version?
Re: Strange DependencyProperty value
I have tried with the new version and the problem is still there.
I will try to create a small project to reproduce the problem and submit it.
I will try to create a small project to reproduce the problem and submit it.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Strange DependencyProperty value
I saw the report with the files, thank you.
We will investigate what is happening.
We will investigate what is happening.
Who is online
Users browsing this forum: Google [Bot] and 81 guests