Basically what I need to know is how to send the source of an HierarchicalDataTemplate into a binding, this is what I have:
<HierarchicalDataTemplate DataType="{x:Type myModel:Person}">
<StackPanel Orientation="Horizontal">
<Image Source="Images\User.gif" />
<TextBlock Margin="5,0,0,0" Text="{...
Hi All,
This may be a no brainier but I just can't seem to get it to work. I have a view model that exposes a property called bool NotFound I would like to bind that to a trigger so that when it changes an image on my control changes.
This is the xaml that I am using as a data template for one of my view models.
<DataTemplate DataTyp...
Hi there,
I have a User Control with a Data Grid inside it which i re-use in a couple of different Pages and am using M-V-VM.
How can I / is it possible to expose the Data Grid's SelectedItem dependancy property as a dependancy property on the User Control which contains it???
The goal being that in a Page using the control, i could ...
I don't know exactly how to explain it, but here is basically how my problem could be reproduced:
Create a WPF Windows Application Project in VB.NET (don't create, just keep reading this, unless you don't believe me...)
Click the Window's header to create a Window.Loaded event-handler and to navigate to it.
Add the following to the eve...
Using the WPF datagrid from WPFToolkit I want to show errors only during the save operation. Currently it seems to validate when you move off the row, hit enter, etc.
There are two types of row level validations I need to perform:
1) Before service call to ensure fields on object are set.
2) After service call, to show any service va...
NOTE: I am not exactly sure how to title or tag this question, so if you have any ideas, PLEASE help!
I'm currently envisioning a few possible projects that involve dynamically rendering something (whether it is a point, a line, text, or music notes on a staff, for hypothetical example), but, if I were to undertake these projects, I'm n...
I have a huge theme xaml with control templates and styles. i need to find which styles from this list are applied to some of my controls. i see that the style of my control has changed but i can't find the place. for example, i have a Grid and i see that the background is changed, but i can't find TargetType woth Grid parameter.
...
I would like to display a bunch of settings in a window and offer different ways for the user to set them (TextBox, ListBox, etc).
One column has the names of the settings, and the other has the controls. Should I use a ListView for that? Can I use data binding? How do I specify a different control per row in the ListView?
...
I want to split the main window in three way Grid Spliiter same alike outlook style.
and all the controls nested inside in the three window is resized using Grid Splitter.
I am trying to do that using defining Row Definition of Grid and placing each control in Row 1 or column 1..
Its nice to have , if any body has some kind of template...
Hey
I have an XmlDataProvider that refers to an XML file and a specific node, and a TextBlock which it's Text property is bind to an element.
So far so good, everything works and I can see the element's value in the TextBlock.
What I'm trying to do is to forward that value into a method that will return me a string value that I have to...
Hi
i have a tab control with 2 tabs. the content of each tab is binded to a ListCollectionView and the data template has a grid showing the items. The problem is that if you click on any of the columns to sort, if I select the other tab and return to the first tab the sorting is cleared. Is it a known bug?
here is the code:
<Window x:...
How to implement IAddChild and Icollector interface in Wpf to add child to UserConterol?
...
I have a problem with a edit templete of cell in a WPF datagrid (WPF Toolkit). The template is builded with a ComboBox and the ItemsSource of
ComboBox are loaded at runtime.
This is the mean code...
<ObjectDataProvider x:Key="dataValuesProvider" MethodName="GetValues" />
<toolkit:DataGrid
ItemsSource="{Binding Path=MyItems}">
<toolkit...
While scaling a panel using a scale transform the application needs to reset the panel back to its original size. For this purpose a reset button starts a double animation that animates the scale transform from it's start value to 1 which means the panel will have it original value.
Visually the panel is scaled back to orignal size, but...
I have implemented a user control in WPF and I try to use that in another program. When I try to drag and drop a button from toolbox to my usercontrol it is not added as a child of my usercontrol. It adds that button to my parent.
How can i add a control from toolbox to my usercontrol??
...
Hi all,
I need to prepare a presentation about what's WPF, my audiences are mostly project managers and system analyzers . I intend to show them most important features of WPF like DataBinding . Can you suggest me a list of features which you think will be interesting for my audiences . and also does anybody know any website where I can ...
Hi all i need help wih my combobox. Iam quite new in the WPF world.
Ihave an combobox that the itemsource is binding with the following items:
Red
Green
Blue
Yellow
I want to select like "Red" in the code behind then the combobox will highligt "Red" and "Red" is selected. How can i do this in code thanks for advice.
And sorry for my b...
Hi all,
I have the following path. The data is from some data file:
<Path StrokeThickness="5" Stroke="Black" Fill="Yellow" Data="M 30330.8847248349,-37724.909002528 L 28556.3829935257,-37596.5557453925 28031.7660050946,-38008.0608378072 27746.4689258268,-38895.6687979239 27655.7148993139,-39397.1764657993 27718.5888966473,-39755.495543...
Hello.
I am using a DataTemplate (a StaticResource) in several places in my application as in an ItemsControl, ContentControl and in a ToolTip.
The template contains an Expander, and I want its IsExpanded property to be true if the DataTemplate is located within a ToolTip.
Any recommendations?
...
Hello
I have two data grid objects. Let's say that my first dg is called source and second dg is called target. Both dg objects use observable collection as a source. I fill target dg based on selected items from source dg. Now for every item in target dg I want to find corresponding item in source dg. I tried to use IndexOf method but ...