English 中文(简体)
具有动态内容的流动文件(BlockUIContainer)
原标题:FlowDocument with dynamic content (BlockUIContainer)
  • 时间:2010-01-29 11:06:37
  •  标签:
  • xaml

我在笔记本上写着简单的xaml-file:

<FlowDocument AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph /> <BlockUIContainer><Button Tag="another.xaml">Next...</Button> </BlockUIContainer></FlowDocument>

This file contains BlockUIContainer with Button inside. Button also has Tag-property which contains reference to another xaml-file. When I load my xaml-file to FlowDocumentScrollViewer I want to click the button and load another.xaml in same FlowDocumentScrollViewer. How can I do this? I suspect that I need to search my button, but I don t know how.

问题回答

如果在您的XAML文件中添加内容内容,你可以在内容中插入另一种控制。 或者,你可以将内容目录的内容与他人联系起来。 xaml, and set the ContentControl to beidden byault, when make itprofile in the Button OnClick eventhandler, or You can have the ContentControlprofile all the time and only set its content property in You Button OnClick eventhandler.





相关问题
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 ...

热门标签