绑定resourcedictionary XAML中的样式

时间:2014-03-22 23:08:17

标签: windows xaml

我在ResourceDictionary中有这段代码:

        <ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:Controls="clr   namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:vb="clr-namespace:GPS.ViewModel"
    >


       <vb:VMGps x:Key="theme"/>

<Style x:Key="styleMap" TargetType="Controls:Map" >
        <Setter Property="ZoomLevel"   Value="{Binding ZoomLevel,Source={StaticResource  theme}}" />
    </Style>  

但是不起作用....给我一个带有值绑定的错误

0 个答案:

没有答案