I’m trying to implement a sidebar menu that contains navigation links. I’ve made a MenuItem class here
<Panel ux:Class="MenuItem" Clicked="{NavigateToPage}">
<string ux:Property="ItemText" />
<string ux:Property="Icon" />
<Image File="{Property Icon}" Width="35" Height="35" Alignment="CenterLeft" Margin="15, 0, 20, 0" Opacity="0.6">
<DropShadow />
</Image>
<Text Value="{Property this.ItemText}">
<DropShadow Spread="0.1" />
</Text>
</Panel>
I need some way to pass which image I want to use for the icon so what do you suggest? I know passing the file name won’t work -obviously-, but I attached this snippet of code to give you an idea of what I’m trying to accomplish. I know there’s a type called Resource but I haven’t had much luck trying to implement it.