Windows 在resourcedictionary XAML中绑定样式
我的ResourceDictionary中有以下代码:Windows 在resourcedictionary XAML中绑定样式,windows,xaml,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://sc
<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>
但不起作用。。。。给我一个值绑定的错误单词“不起作用”没有添加任何信息,如果代码起作用,你不会发帖。相反,解释一下它是如何不起作用的?你是怎么用那种风格的?什么是主题?并检查VS输出窗口的绑定错误。对不起,我更改了问题。。。。我的绑定值有错误,请发布准确的错误消息错误消息是'System.Windows.Markup.XamlParseException出现在app.xaml.cs的InitializeComponent()之前;