Cannot find a Resource with the Name/Key TopCornerRadiusFilterConverter in uwp

守給你的承諾、 提交于 2020-02-04 22:56:24

问题


After installing WinUI into UWP application.I am getting 'Cannot find a Resource with the Name/Key TopCornerRadiusFilterConverter' error

Sample code:

xmlns:controls="using:Microsoft.UI.Xaml.Controls"
controls:DropDownButton Content="test"></controls:DropDownButton>

Application version:


回答1:


Cannot find a Resource with the Name/Key TopCornerRadiusFilterConverter in uwp

After install the WinUI nuget package, it will display note window said:

Thanks for installing the WinUI NuGet package!   

Don't forget to set XamlControlsResources as your Application resources in App.xaml:


    <Application>
        <Application.Resources>
            <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
        </Application.Resources>
    </Application>


or if you have other resources then add XamlControlsResources at the top as a merged dictionary:


    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
                <!-- Other merged dictionaries here -->
            </ResourceDictionary.MergedDictionaries>
            <!-- Other app resources here -->
        </ResourceDictionary>
    </Application.Resources>


See http://aka.ms/winui for more information.

So, Please add <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> into your app's application resource.



来源:https://stackoverflow.com/questions/59243777/cannot-find-a-resource-with-the-name-key-topcornerradiusfilterconverter-in-uwp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!