2012-01-28 114 views
1

我现在正在开发一个具有反射效果的应用程序。我想一个VisualBrush分配给Rectangle.Fill为:VisualBrush不再适用于Windows 8 Metro应用程序?

<Rectangle.Fill> 
    <VisualBrush Opacity="0.75" Stretch="None" Visual="{Binding ElementName=ReflectedVisual}"> 
    </VisualBrush> 
</Rectangle.Fill> 

和VS报告VisualBrush并不在我的XML命名空间存在。

的xmlns:我手动使用它添加到XAML文件FX = “http://schemas.microsoft.com/netfx/2007/xaml/presentation”

而添加的基准DLL以及。但是,现在VS说我不能将VisualBrush分配给Brush类的属性。

对我来说这似乎很奇怪,因为我记得在Vista上相同的代码运行良好。有谁知道我在这里失踪的东西吗?

谢谢。

+1

地铁与Vista无关。您必须使用Windows.UI.Xaml.Media命名空间中的可用笔刷类。 http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.media.aspx – 2012-01-28 13:12:28

+0

你可能想在这里投票:http://visualstudio.uservoice.com/forums/121579-视觉工作室/建议/ 3138694-支持换visualbrush功能于WinRT中 – 2013-01-02 08:19:36

回答

相关问题