Questions tagged [elementname]

Gets or sets the name of the element to use as the wpf binding source object.

Binding.ElementName Property is useful when you want to bind to the property of another element in your application.

37 questions
2
votes
2 answers

Xamarin.Forms View-to-View binding without changing BindingContext

I have a Button defined in XAML that contains a Command including a CommandParameter. The Command binds to the current view's ViewModel, while the CommandParameter binds to another control within the current view. In WPF this would look…
andreask
  • 4,248
  • 1
  • 20
  • 25
1
vote
2 answers

Control binding to other Control through ElementName, but Initial value isn't shown

I have two controls a WPF DatePicker and the WPF extenstion toolkit DateTimeUpDown. The DatePicker has a two way binding to a DateTime Property in a ViewModel and the DateTimeUpDown has a binding to the DatePicker through Element. The binding works…
dennis_ler
  • 659
  • 1
  • 9
  • 36
1
vote
1 answer

Find element via parameterized css selector

I'm building a menu with jQuery with several hyperlink and what I want is to show / hide a div containing the sub menus when I click on the hyperlink. I tried the following: $("div#divmnu" + mnuidx).show(); $("div#divmnu" + mnuidx).animate({ height:…
dieric
  • 13
  • 2
1
vote
1 answer

Binding a DependencyObject outside the Logical Tree to the property an element in the Logical Tree

Edited Problem Summary: I have a custom control that has an ObservableCollection of DependencyObjects. Because the DependencyObjects are not children of the control, they are not in the Logical Tree. However, I need them to bind to properties of…
Ketfera
  • 33
  • 3
1
vote
1 answer

Bind to parent control from within context menu within data template

I'm wanting to bind to a parent control from a context menu within a datatemplate. Unfortunately I'm restricted to .net 3.5 and can't use the x:reference extension introduced in .net 4. Below is an example of what I'm trying to do
wforl
  • 843
  • 10
  • 22
1
vote
2 answers

Listview bound via ElementName stays empty

I'm stuck again at some data-binding issue. This time I want to bind a ListView to the SelectedItem of a GridView. I already suceed with this type of data-binding but now my ListView, which should show some details about my selected item in my…
Zhedar
  • 3,480
  • 1
  • 21
  • 44
0
votes
2 answers

Changing another control's property in some control's Trigger with "dynamic" name

I am trying to change my labels style dynamically on my forms. The behaviour I want is: Every time a textbox called 'txtName', for instance, gets Focused, it should search for a Label Control named 'lblName' and change its FontWeight property to…
Hugo Ramos
  • 155
  • 12
0
votes
3 answers

Getting element name based on position in DOM

I want to find the name or ID of a element where I got top and left position. I know how to use jquery to find the position of an element (Hovering over the div will trigger that position text will appear on screen): $(".item").hover(function ()…
Cudos
  • 5,733
  • 11
  • 50
  • 77
0
votes
1 answer

Binding a SelectedItem from a ComboBox from a seperate XAML control file

I have a ComboBox in an application Ribbon Menu, where the selected item binds to a theme of the application UI as follows: Theme binding in MainWindow.xaml Theme="{Binding SelectedItem.Tag, ElementName=_themeCombo}" And the ComboBox
Richard
  • 439
  • 3
  • 25
0
votes
3 answers

How does WPF solve same ElementName issues?

Say the following HierarchicalDataTemplate displays 2 Data Sets. Then there a 2 ListBoxes with the same x:Name ="MyListBoxName". How does WPF knows which one to pass as CommandParameter ????
Fabian
  • 63
  • 11
0
votes
1 answer

Connecting width/height of cell in two different controls?

I need to create two controls that contain the same amound of items (a dynamic amount), the first control represents the keys, the second represents the values. I need it so that when the user resizes the upper column width it should affect the same…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
0
votes
2 answers

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

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…
Elisabeth
  • 20,496
  • 52
  • 200
  • 321
0
votes
1 answer

NSXMLParser "elementName" deallocated prematurely in didStartElement: protocol method

I have been using a NSXMLParser subclass for over six months with no problems in Snow Leopard. When I ported to Mavericks, suddenly, I started to get weird crashes in the middle of the import operation. I used Zombies to see what the problem was,…
wdchild
  • 51
  • 7
0
votes
1 answer

{Binding ElementName=...} does not work from any CompositeTransform property

I have the following code in which I hide a WebView just under the main Grid (LayoutRoot) so I can do a sliding animation later: ... ... …
James Ko
  • 32,215
  • 30
  • 128
  • 239
0
votes
1 answer

Combobox is showing bound values but selection isn't possible

I have some really strange behaviour with a combobox. Threre is a ObservabalCollection bound to it. Values are displayed correctly. I can add some values to my collection bound to combobox_PragmaSections, they are displayed and I can switch between…
Andreas
  • 25
  • 6