Re[6]: Всё-равно не работает
От: igor-booch Россия  
Дата: 29.12.15 10:18
Оценка:
PF>Смотрите здесь.

Хорошо, спасибо, буду иметь ввиду.

Убрал установку DataContext в элементе UserControl. Поставил RelativeSource в Binding:

<UserControl x:Class="WpfApplication3.UserControl1"
             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">

    <StackPanel>
      <Button ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"></Button>  
    </StackPanel>
</UserControl>


Эффекта нет, не работает.
http://rsdn.ru/Info/rules.xml
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.