<TextBlock Cursor="Hand" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,0" 
Name="btnMin" Text="{Binding RowData.Row.TypeIcon.IconCode}"
Style="{StaticResource FIcon}" FontSize="16" Foreground="{Binding RowData.Row.TypeIcon.IconColor}">
</TextBlock>

上面红色的部分一直显示找不到对象,图标那里一直报错,原因就是忘了从另外一个项目里拷到一段代码到app.xaml里,如下:

<Application x:Class="Main.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:Main"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/DataResource;component/skin/style.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

留此贴备用

12-31 20:35