TreeView:
-MainNode
-node0
data01
-data02
data021
data022
data03
-node1
data11
-node2
data21
Event SelectedChange;
As the choice of a node containing child nodes to get the final data?
For example:
selected node node0 receive data (data0...
I have a ListBox that I bind to an ItemsSource, like this:
var foos = new ObservableCollection<Foo> { foo1, foo2, foo3 };
var listBox = new ListBox { ItemsSource = _foos };
Now I want to do some operations right away on the ListBoxItems that holds the items, but they don't seem to be created right away. Are they? Is there some event ...
I'd like to handle the "Closing" event (when a user clicks the upper right 'X' button) of my window in order to eventually display a confirm message or/and cancel the closing.
I know how to do this in the code-behind : subscribe to the "Closing" event of the window then use the "CancelEventArgs.Cancel" property.
But I'm using MVVM so I...
Hi All I have master DataGrid and detail DataGrid. I need a arrow beatween them align to selected row in master?
[ Master ] [ Detail ]
[ row ] [ row ]
[ row ] [ row ]
[ selected row ] > [ row ]
[ row ...
Hallo,
i want to make a custom stackpanel in WPF, which shall automatically resizes his childs to a certain size depending on the panels height. But the panels height is dynamic because it stretches to his parent. When i want to get the height (i tried all possibilities, see code), it is always 0 or not defined, although in the build so...
Is there a way to get notified (e.g., by an event) when a Visual has been (re-)rendered?
Basically, I would like to take a screen shot whenever a Visual's appearance has changed. I assume the rendering thread is taking care of this in the background.
I am trying to avoid grabbing a screen shot periodically since I am only interested in...
Hey guys,
I'm having a problem where I have elements such as Listboxes and Rich Text boxes that I want to set to size automatically in xaml according to the size of the window, but I only want it to resize to the size of the window and then put scrollbars if the content is any bigger than that.
Unfortunately, the only way I can get scr...
In Silverlight (and probably WPF), when I define a System.Windows.Interactivity.Behavior<T> for e.g. an ItemsControl, like
public class SomeAwesomaticBehavior : Behavior<ItemsControl>
{
}
it will appear in Visual Studio's XAML editor (and probably in the Designer too) even for ordinary, non-Items-Controls and throw nasty runtime excep...
I have created a datagrid with columns bound to an observable collection. All works well except for a column which is bound to a nullable decimal property from my business object.
If I use
<DataGridTextColumn Binding="{Binding Path=BaseUnitCostValue}" Header="Unit Cost Value" MinWidth="100" />
as my column definition all works well,...
Hi,
I can't find infos on how to receive custom gestures on ScatterViewItems. I want "Tap-And-Hold" to invoke a function in the class behind my template.
...
I have a collection in the main window and I want to show it on a grid in a user Control,
What is the right MVVM way to do that ?
I've done an observableCollection in the MainWindow And bounded it to an observableCollection in the usercontrol. and in the user control the grid is bounded to
the collection.
it doesn't work :(
/// <su...
I want to create a control which takes a while to create (Pivot) and then add it to the visual tree. To do this i would need to change the dispatcher of the control (and its heirachy) before adding it to the VisualTree.
Is this possible? Are there any implications of walking the controls trees and setting the _dispatcher field via refle...
I am developing a WPF application in .NET 4.0 which calls a WCF Service hosted on the server developed in .NET 4.0.
I want to use windows authentication for this purpose and it seems that it is not working and keep on giving me following error.
The provided URI scheme 'http' is
invalid; expected 'https'. Parameter
name: via
I...
My fairly large WinForm application needs a GUI overhaul, but I can't afford to do it all at once. I need to know if I can slowly add WPF into it, and if so, how?
Can I add WPF dialogs?
Can I add WPF 'panels' within a WinForm so that I can embed WPF elements?
EDIT
Can I do the opposite and put WinForm dialogs in my WPF application?
...
I have created a data template for a data class. The width of the grid created by the datatemplate is bound to a property in the data class, ie, the size of the control matters.
I am creating a list of the data class objects, and adding them to an items control in MainWindow.
Update:
I would like to line up the controls from the data ...
What an awkwardly worded question, you're thinking?
When my application loads, it goes to the database and gets several different lookup tables worth of data and creates .NET Lists for each one and puts them in cache. For example, "Status".
List at this point:
On,
Off
When I retrieve the List of Statuses from the cache, I add another...
I'm iterating through all the children of a given Canvas object. The trouble is, it's only impacting one of the two children. The other iteration I have in another similar event is working just fine. I've got this so that you can drag the elements:
private Point lastmousepoint;
private void Window_MouseMove(object sender, Mou...
I have a Shell holding 2 Views. They both use the same viewmodel, in fact the shell uses the same viewmodel as well. I have 2 buttons in the shell that are supposed to change the visibility of the the 2 views. It appears that even though the command is firing, that the value is being changed and that i have onpropertychanged configured c...
I want that the user can resize a control by draging a resize-grip on the lower right border. With the ResizeGrip there seems to exists the perfect control for achieving this, but I don't see what is the plan to use this control. It does not derive from Thumb (however in msdn is written that it is an "implementation" of it), and does als...
I have a member in the WPF code behind that is disposable (meaning it implements the IDisposable interface)
I do not see any Dispose method I can override from UserControl in WPF so I can dispose of the member in my wpf usercontrol
What is the correct way to dispose of a member in a WPF usercontrol?
It's a usercontrol that wraps a pr...