Questions tagged [visual-tree]

106 questions
0
votes
1 answer

Strange behavior by combo box selection in wpf

I am working on an application, wherein we have a main window which is having so many child windows in different dock option. So, one dock is having a property panel window which allows a user to modify property of selected entity and after changing…
Yogesh
  • 3,044
  • 8
  • 33
  • 60
0
votes
1 answer

How to bring a Control to view though it is not in VisualTree

I am Sorry for the stupid title, but my requirement is quite similar to that. I have a CustomControl extended from DatePicker. I dont have any separate Control Structure for this. I need to attach a Popup to its Structure. So what am doing is in…
Sankarann
  • 2,625
  • 4
  • 22
  • 59
0
votes
2 answers

Walk the VisualTree in a worker thread for fulltext search

I am using WPF to show complex data (think reporting). I now need to have a fulltext search for it. We currently do this by walking the visual tree looking for textblocks. It seems that this needs to be done on the UI thread, is that right? The…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
0
votes
0 answers

Multiple Contents, Parent is null

I am trying to implement a UserControl that hosts two Content Areas. One for a Button Area and and one general Content area. However when I try to use it the additional ButtonArea does not have a Parent set and therefore RelativeSource Lookup fails.…
m00ni
  • 113
  • 1
  • 8
0
votes
1 answer

how do I loop through all controls on a popup

I'm trying to get the "PART_HeaderButton" from a DatePicker control and then apply a customized style. The problem is I can't search the visual tree to find this header button. The calendar is on a popup. It seems when the popup opens a new visual…
L.T.
  • 673
  • 7
  • 16
0
votes
1 answer

How to attach MenuItem to parent MenuItem in logical and visual trees?

I have created several MenuItems (not in XAML) so i added them the parent item : ( Parent_Menu as MenuItem ).Items.Add( Menu_Item ); Then i applied my styles by VisualTree list (in a loop) . But the styles won't apply on the new MenuItems . Here is…
David von Tamar
  • 797
  • 3
  • 12
  • 29
0
votes
1 answer

visual elements of current pivot page

I am using C#, Silverlight, Visual Studio for Windows Phone 7. I am interested in getting only the visual elements that are currently displayed on the screen during a pivot. For example, my pivot could have 5 PivotItems, but I only want to get the…
joulesm
  • 642
  • 1
  • 6
  • 28
0
votes
2 answers

Force visual tree creation with Prism

I have a TabControl containing Prism regions. I want to trigger some kind of notification (e.g. flashing the tab header) for certain events, and I want to trigger this notification from the components in the Prism regions. Once the tab containing…
Zak
  • 724
  • 4
  • 18
0
votes
2 answers

Getting DataGridCell from nested controls in the template column without iterating through the visual tree

The DataGridCell does not appear to be in the VisualTree of controls. I have a DataGridTemplateColumn that contains a Rectangle and Label in a Stack Panel inside a Grid.
DanBrum
  • 419
  • 1
  • 7
  • 18
0
votes
2 answers

How to force DataGrid to rebuild VisualTree for its columns

I have WPF form with DataGrid. New columns can be added to the datagrid manually by user via button. This is the code to add new column: private void ColumnAdornerAddButton_MouseDown(object sender, MouseButtonEventArgs e) { …
Amid
  • 21,508
  • 5
  • 57
  • 54
0
votes
1 answer

How to find element in visual tree in wp7?

I need to find element in visual tree. For example I have a grid and I need to set my own text in tbox:WatermarkTextBox when ExpanderView expands. xaml
SevenDays
  • 3,718
  • 10
  • 44
  • 71
0
votes
1 answer

How can i get a popup from the visual tree if the popup is at the RootVisual level in WP7

I need to get a popup in the VisualTree which is a sibling of Application.Current.RootVisual. Is there a way to do this? I couldn't find a way for this at the moment. I have tried to get the parent of the RootVisual but it don't have such. …
The DreAmeR
  • 145
  • 1
  • 7
0
votes
2 answers

how to put a UIElement in a visual tree twice in different locations?

i'd like to put a webbrowser twice in a grid twice in a wp app, but i got the exception:Element is already the child of another element. how can i solve this problem? PS: i need two webbrowsers show at the same time, but i only need interact with…
-1
votes
1 answer

WPF find column index of textblock inside visual tree

I want to calculate enter image description here automation id of text block inside the content presenter. My visual tree looks like this-
-1
votes
2 answers

Shoud disposing the same instance multiple times be possible

Should it be possible, to call .Dispose for the same instance of IDisposable multiple times without throwing an exception? Is there some definition for this? For example: public class Test : IDisposable { public void Dispose() { //…
BendEg
  • 20,098
  • 17
  • 57
  • 131