relativesource Questions

14

Solved

How do I use RelativeSource with WPF bindings and what are the different use-cases?
Plenish asked 17/9, 2008 at 15:10

3

Solved

What of the following TextBlocks' Bindings costs more performance: <Window x:Name="Me" x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http...
Bradley asked 30/11, 2010 at 18:24

4

Solved

I am currently working within a WPF user control (the root element of my XAML file is "UserControl"), which I know is being hosted inside a Window. How can I access a property of the Window using d...
Lag asked 28/10, 2009 at 11:56

4

Solved

What am I doing wrong here?: <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <Button> <Button.ToolTip> <TextBlock Text="{Binding Path=Title, Re...
Tatouay asked 8/9, 2010 at 14:18

3

Solved

I'm using the binding RelativeSource with the FindAncestor Mode but the binding is not working. How do I debug and see if It is able to find the ancestor?
Bearnard asked 3/3, 2011 at 10:25

1

I want to bind a property to the parent container view having a ViewModel in its DataContext. This code works perfectly well when the parent is a direct instance of ConcreteClassView: Property="{...
Butterwort asked 2/11, 2012 at 11:22

3

Solved

Is FindAncestor searches an element in whole Visual tree of Window? If yes, then how can I improve on it ?? Is binding data error thrown if we access property of object by finding an element with...
Boundary asked 22/12, 2014 at 11:37

1

Solved

My target is to bind the Content-Property of the Label to the Tag-Property of the Elements the Style is applied to. But my solution doesn't seem to work: My style: <Style TargetType="TextBo...
Gillispie asked 25/8, 2013 at 16:16

1

Solved

I have a ItemsControl that's bound to an object, within the datatemplate of the ItemsControl i have two textblocks, I want to bind the first textblock's text property to another textblock that sits...
Utimer asked 21/11, 2012 at 15:28

1

Solved

This seems to be a pretty popular topic, but... I have the following XAML: <internal:MyCommandObject x:Name="CommandModel"/> <Button DockPanel.Dock="Bottom" Command="{Binding DoAction, ...
Duggan asked 4/7, 2012 at 16:56

6

Solved

What is the difference between these 2 bindings: <ControlTemplate TargetType="{x:Type Button}"> <Border BorderBrush="{TemplateBinding Property=Background}"> <ContentPresenter /&gt...
Encompass asked 15/7, 2009 at 12:52

4

Solved

Will there be RelativeSource FindAncestor, AncestorType... in Silverlight 4?
Berriman asked 18/2, 2010 at 18:54

3

I have a DataSet bound to the Window.DataContext; I also have a DataGrid: <DataGrid ItemsSource={Binding Tables[Items]}> <DataGrid.Columns> <DataGridTextBoxColumn Header={Binding ...
Souter asked 13/10, 2010 at 0:34

1

Solved

I have ItemsControl that is bound to collection of type Student. Inside the ItemTemplate I have a TextBox that uses IValueConverter to do some custom calculations and logic. I want to pass the actu...
Arp asked 2/12, 2010 at 12:41

2

Solved

I've been trying to build a text box with a hint that's displaying while it's empty. I'm having trouble setting the hint text from within a style. To be precise, this works (that is, it binds cor...
Upheave asked 3/9, 2010 at 21:0

3

Solved

What are the differences between making a binding self-referential via name versus self-referential via RelativeSource? For example: <!-- Self referential via name --> <Window ... x:Nam...
Blodgett asked 10/3, 2009 at 15:13

1

Solved

Here is the code: <GridViewColumn DisplayMemberBinding="{Binding Path=BookId}" Width="100"> <GridViewColumn.Header> <Border BorderBrush="Black"> <TextBlock Width="{Binding ...
Rajasthani asked 24/8, 2009 at 14:26
1

© 2022 - 2024 — McMap. All rights reserved.