Keyword: x:Shared="false"
Hi,
I have a resource:
<Image x:Key="Icon_TrashCan" x:Shared="false" Source="/Assets/UI/Icons/Icon_TrashCan.png"/>
That I use in a DataTemplate in a ListView. In windows wpf I use the x:Shared="false" keyword in order to get the icon on every row on the list. NoesisGUI don't seem to support that keyword so how am I supposed to use it? As it is the icon is only shown on one of the rows in the ListView the other rows still has the button but it is just blank with no icon on it.
I have a resource:
<Image x:Key="Icon_TrashCan" x:Shared="false" Source="/Assets/UI/Icons/Icon_TrashCan.png"/>
That I use in a DataTemplate in a ListView. In windows wpf I use the x:Shared="false" keyword in order to get the icon on every row on the list. NoesisGUI don't seem to support that keyword so how am I supposed to use it? As it is the icon is only shown on one of the rows in the ListView the other rows still has the button but it is just blank with no icon on it.
-
-
sfernandez
Site Admin
- Posts: 2056
- Joined:
Re: Keyword: x:Shared="false"
Sorry to say we don't implement x:Shared yet. But you don't need it if you use an ImageSource as resource instead:
Code: Select all
<Grid.Resources>
<ImageSource x:Key="Icon_TrashCan">/Assets/UI/Icons/Icon_TrashCan.png</ImageSource>
<DataTemplate x:Key="MyTemplate">
<Image Source="{StaticResource Icon_TrashCan}"/>
</DataTemplate>
</Grid.Resources>
Re: Keyword: x:Shared="false"
Thanks, closing this.
Who is online
Users browsing this forum: No registered users and 0 guests