According to the C# compiler and the Silverlight 2 documentation, Silverlight doesn't provide a FindName method for the DataTemplate class. I want to find a Border that's inside a ContentPresenter. What's the best way in SilverLight 2?
...
My tree definition is:
<TreeView Name="tree" ItemsSource="{Binding Children}" >
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<CheckBox Name="foo"></CheckBox>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
Having a TreeViewItem element, I try t...
I currently have a WPF project which has one main Window, and many UserControls which are children of this Window. Many of the children of this window are Tabs. I have successfully replaced my main Window with a User Control that implements almost exactly the same functionality as the Main Window.
Replacing the Window with a UserContro...
So in the example code below, I create a UserControl UserControldChild which is a child of the main Window, Window1.xaml. Why does the FindName() method fail to find the "myButton" in the code below?
This must have to do with the WPF XAML NameScopes, but I have yet to find a good explanation as to how NameScope works. Can someone enlig...
Hi,
I've got two comboboxes. The items of the first one i'm filling in Xaml with:
<ComboBox Name="ddl_pageType" Width="200" BorderThickness="5">
<ComboBoxItem Name="Website" Content="Webseite"/>
<ComboBoxItem Name="CNIProg" Content="Seite"/>
</ComboBox>
and the function ddl_pageType.FindName("Website")...
FindName is broken for me :(
If you are an expert in such things I would love some help.
The object I am looking for is there. I have proof.
Here is the scenario:
ToggleButton button = (ToggleButton)sender;
Popup popup = (Popup)button.FindName("popSelectIteration");
popup is null but not always. Just sometimes. But even when it ...
I've got 2 DataTemplates defined for a Listbox Control. 1 Template is for the UnSelected State and the other one is for the Selected State(showing more detail than the UnSelected State).
I followed the example here:
http://blogs.msdn.com/b/wpfsdk/archive/2007/04/16/how-do-i-programmatically-interact-with-template-generated-elements-pa...