Click here to Skip to main content
15,920,383 members
Home / Discussions / WPF
   

WPF

 
QuestionMoXAML Power Toys 2 just released. Pin
Pete O'Hanlon7-Oct-08 12:11
mvePete O'Hanlon7-Oct-08 12:11 
AnswerRe: MoXAML Power Toys 2 just released. Pin
Mark Salsbery8-Oct-08 13:03
Mark Salsbery8-Oct-08 13:03 
GeneralRe: MoXAML Power Toys 2 just released. Pin
Pete O'Hanlon8-Oct-08 21:44
mvePete O'Hanlon8-Oct-08 21:44 
GeneralRe: MoXAML Power Toys 2 just released. Pin
User 27100910-Oct-08 0:40
User 27100910-Oct-08 0:40 
QuestionUIElement and InotifyPropertyChanged Pin
ezazazel7-Oct-08 2:07
ezazazel7-Oct-08 2:07 
AnswerRe: UIElement and InotifyPropertyChanged Pin
Insincere Dave7-Oct-08 6:48
Insincere Dave7-Oct-08 6:48 
GeneralRe: UIElement and InotifyPropertyChanged Pin
ezazazel7-Oct-08 7:08
ezazazel7-Oct-08 7:08 
GeneralControl in ItemTemplate can't bind to owner control dependency property? [modified] Pin
Zvorko7-Oct-08 1:31
Zvorko7-Oct-08 1:31 
Hi!

I have a UserControl with a list box which has a ItemTemplate.

Item template is also my own UserControl - "TemplateControl"

I'm trying to bind TemplateControl dependency property to a UserControl dependency property. So every instance of the TemplateControl in the list would change when I change the property in the UserControl.

The simplyfied source is like this.

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="TestBlend.UserControl1"
x:Name="UserControl" >
<StackPanel>
<TextBlock Text="{Binding Path=MyProperty, ElementName=UserControl}" />
<ListBox ItemsSource="{Binding XPath=MyDataSource}" >
<ListBox.ItemTemplate>
<DataTemplate>
<TestBlend:TemplateControl Text="{Binding Path=MyProperty, ElementName=UserControl}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</UserControl>


The textbox Binding works fine, but binding in the TemplateControl does not work.

Does anyone have an idea how to solve or work around this problem?

Thank you all Smile | :)

<div class="ForumMod">modified on Friday, October 10, 2008 7:19 AM</div>
AnswerRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 0:45
User 27100910-Oct-08 0:45 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 0:52
Zvorko10-Oct-08 0:52 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 0:54
User 27100910-Oct-08 0:54 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 1:27
Zvorko10-Oct-08 1:27 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 1:33
User 27100910-Oct-08 1:33 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
Zvorko10-Oct-08 1:43
Zvorko10-Oct-08 1:43 
GeneralRe: Control in ItemTemplate can't bind to owner control dependency property? Pin
User 27100910-Oct-08 1:46
User 27100910-Oct-08 1:46 
GeneralReg:Voicechat application Integration Pin
Member 45820567-Oct-08 0:53
Member 45820567-Oct-08 0:53 
GeneralRe: Reg:Voicechat application Integration Pin
Pete O'Hanlon7-Oct-08 1:59
mvePete O'Hanlon7-Oct-08 1:59 
QuestionHow to update tabindex Pin
Cari796-Oct-08 2:23
Cari796-Oct-08 2:23 
AnswerRe: How to update tabindex Pin
Cari797-Oct-08 22:10
Cari797-Oct-08 22:10 
QuestionError while running WPF, DirectShowNet application in Vista Pin
Vishaal K. Menon6-Oct-08 0:07
Vishaal K. Menon6-Oct-08 0:07 
QuestionXAML Power Toys 3.1.0.2 Has Silverlight 2 Support! Pin
User 2710095-Oct-08 12:56
User 2710095-Oct-08 12:56 
AnswerRe: XAML Power Toys 3.1.0.2 Has Silverlight 2 Support! Pin
Syed Mehroz Alam8-Oct-08 19:02
Syed Mehroz Alam8-Oct-08 19:02 
AnswerWhat about Mole Pin
Syed Mehroz Alam9-Oct-08 19:51
Syed Mehroz Alam9-Oct-08 19:51 
GeneralRe: What about Mole Pin
User 27100910-Oct-08 0:34
User 27100910-Oct-08 0:34 
GeneralRe: What about Mole Pin
jandersen7830-Apr-09 11:15
jandersen7830-Apr-09 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.