图像正在MainPage中工作,但我正在尝试将其集成到导航面板Templete中,图像不会显示.任何人都可以建议我可能是什么问题.
Templete正在使用FRAMES,但这不应该是问题.
XAML代码
- <Button Grid.Column="0" Style="{StaticResource NavigationButtonStyle}">
- <StackPanel Orientation="Horizontal">
- <Image Source="Assets/donut-icon.png" Style="{StaticResource IconImageStyle}" />
- <TextBlock Text="Donut" Foreground="White" />
- </StackPanel>
- </Button>
样式资源
- <Style TargetType="Image" x:Key="IconImageStyle">
- <Setter Property="Height" Value="20" />
- <Setter Property="Width" Value="20" />
- <Setter Property="Margin" Value="0,10,0" />
- </Style>