elementname

Differences between ElementName="<Me>" and RelativeSource self?

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:Name="This" DataContext="{Binding Path=Data, ElementName=This}" > versus <!-- Self referential via RelativeSource --> <Window ... ...

Binding ElementName. Does it use Visual Tree or Logical Tree

Having {Binding ElementName=foo}, will it lookup visual or logical tree? http://blogs.msdn.com/mikehillberg/archive/2008/05/23/Of-logical-and-visual-trees-in-WPF.aspx When does the logical tree matter? When looking up a name, such as in {Binding ElementName=Foo}, the search walks up the ancestry looking for a name scope, ...

ElementName Binding from MenuItem in ContextMenu

Has anybody else noticed that Bindings with ElementName do not resolve correctly for MenuItem objects that are contained within ContextMenu objects? Check out this sample: <Window x:Class="EmptyWPF.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...

Jquery - Finding what element $(this) is

Possible Duplicate: Can jQuery provide the tag name? Hi! This question is so basic i am ashamed asking but i tried to find the answer for 30 minutes without any result. How do i find out what kind of element has been clicked in the code below. $('*').click(function (event) { var this_element = $(this).???; return false; }...

Binding using ElementName for a control within the Grid\ListView

Hi I am currently busy with a WPF application that uses a "GridView". There are several template columns one of which is a ComboBox in column 3 named cmbInputControlType. What I would like to do using my Converter class, which I have already created, is binding the visibility of the TextBox(txtFrom) in column 4 to the selected value of...

Binding ElementName

Hello First Sorry for my English. I wanted to ask why ElementName does not work the first case, and work in the second. I give the two sections of code . the firts not work <Button Name="button1" Width="100" > <Button.LayoutTransform> <ScaleTransform x:Name="ttt" ScaleX="3" ScaleY="...

WPF: How to bind to a element when it is inside a DataGrid template column?

I can not bind the EditingCommand to the elementname Bla , how can I fix that? <StackPanel Orientation="Vertical"> <ToggleButton Content="bold" IsChecked="{Binding IsTextBold}" Command="EditingCommands.ToggleBold" CommandTarget="{Binding ElementName=Bla}" /> <DataGrid ScrollViewer.C...

Bind the Height of the Listbox inside the StackPanel to StackPanel`s height

Hello, I want to bind the Height of the ListBox to the Height of the StackPanel so the ListBox stretches itself Vertically so the green area is not visible anymore. When there is no item in the listbox its hidden. When there is item > 1 the ListBox must be stretching itself to the add/del buttons so the add/del buttons are always at th...