开发者

Add blend Button to visual Studio project

I draged style->simple button a开发者_如何转开发nd copied the xml and placed in my visual studio xml every thing is resolved except one

<Button Content="Button" Margin="814,496,22,29" Style="{DynamicResource SimpleButton}"/>

xml gives error at DynamicResource and says not resource not found where as if i see this line by opening the solution made in blend and mouse over it says it is

MS.Internal.Design.Metadata.ReflectionTypeNode

so surely this is missing but cannot find it to add please help


In the Blend project you should have a file called "Simple Styles.xaml". Copy it to your Visual Studio project and add reference to it in your App.xaml:

<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="MyApplication.App">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Simple Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜