【发布时间】:2015-01-02 15:36:35
【问题描述】:
我有一个名为 Palabok 的用户控件:
<UserControl x:Class="NeocClinic.WPFSystem.Templatas.Palabok"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0"></Button>
</Grid>
</UserControl>
然后我将它实现到我的 WPF 窗口:
<Window x:Class="NeocClinic.WPFSystem.IrritantDetailsForm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:windowsControls="clr-namespace:NeocClinic.WPFSystem.Templatas"
Title="IrritantDetailsForm" Height="300" Width="300">
<windowsControls:Palabok ></windowsControls:Palabok>
</Window>
我的问题是我想在将显示在 Palabok 用户控件的 Grid.Column="2" 中的窗口中添加一个组框(带有刺激物的个性化组件/控件)。然后我将对另一个 WPF 窗口使用相同的用户控件,但将图像控件放置到 Palabok 用户控件的 Grid.Column="2" 而不是组框,但我似乎可以将控件放在 Palabok 用户中控制。
【问题讨论】: