English 中文(简体)
银灯不会显示 xaml 页面元素或网格资源
原标题:Silverlight won t display xaml page element or grid resources

我用 XSLT 做了以下 XAML 文件。 当我在 KaXaml 中打开 XAML 文件时, 它会显示我期待它显示的内容。 当我将它纳入视觉工作室工程时, 它会在视觉编辑器中显示同样的东西。 当我试图运行该页面时, 它将不会装入。 如果我删除了 < code> page 元素和 < code> Grid. reresources 元素, 它会毫无问题地运行, 但显然所有格式都消失了 。

是否有一个简单的方法可以使这项工作发挥作用? 我是否应该使用 < code> page 和 < code>Grid.resources 的替代品?

出于某种原因,我可以在这里复制/粘贴代码,我把它放在Pastebin 上。

问题回答

是否有使用Page的具体理由?

如果您使用 用户控制 root, 效果良好。

并评论出这条线:

 <Setter Property="Background" Value="#556B2F"/>

TextBlock 样式中,由于该属性不支持,所以不支持该属性。





相关问题
How to bind a TabControl to an ObservableCollection in XAML

I have the following line of code in my code-behind class. TabControl.ItemsSource = ((MainWindowViewModel)DataContext).TabItemViewModels; I would like to move this to the XAML file. In brief, ...

Bind to ancestor of adorned element

Here is the case: <DataTemplate x:Key="ItemTemplate" DataType="local:RoutedCustomCommand"> <Button Command="{Binding}" Content="{Binding Text}" ...

FlowDocument Force a PageBreak (BreakPageBefore)

I m using C# to create a FlowDocument and fill it with data within a table. Example: FlowDocument flowDoc = new FlowDocument(); Table table1 = new Table(); flowDoc.Blocks.Add(table1); table1....

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

WPF TreeView binding through XAML

So I have a class structure like this Store Owner Cashier List of Products Product Name Price List of Vendors Company Name Contact Name So there are 4 ...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签