wpf Image的几种写法:

                <Border Grid.Column="0" Margin="12">
                    <Border.Resources>
                        <HierarchicalDataTemplate DataType="{x:Type mode:Node}" ItemsSource="{Binding Nodes}">
                            <StackPanel Orientation="Horizontal" Margin="0,2,0,2">
                                <Image Source="pack://application:,,,/ScriptConfig;Component/Images/2.png" Width="16" Height="16" />
                                <Image Source="/Images/2.png" Width="16" Height="16" />
                                <Image Source="/ScriptConfig;Component/Images/1.png" Width="16" Height="16" />
                                <TextBlock Text="{Binding Name}" ToolTip="{Binding Name}" Tag="{Binding}"/>
                            </StackPanel>
                        </HierarchicalDataTemplate>
                    </Border.Resources>
                    <TreeView Name="MyTreeView">
                       
                    </TreeView>
                </Border>
View Code

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-07-21
  • 2021-09-09
  • 2021-12-23
  • 2021-12-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案