Hi,
I want to bind a textblock text to a property of a static class. Whenever the property value of the static class changes, it should reflect to the textblock which is on the other window or custom control.
Thanks
...
Hi, I need to append a simple string to my commandparameter but doesnt work. Does StringFormat support this or am I doing anything wrong ?
<DataTemplate x:Key="ClickableHeaderTemplate">
<Button x:Name="btn" Content="{Binding}" Background="Transparent"
Command="{Binding DrilldownHeaderClicked}"
...
How can I enable a mouse binding to the release of the right button? At the moment I have the following code in xaml which is linked to closing the wpf window. The problem here is that because it reacts to the rampup of the click when closing the window it activates a context menu on the desktop.
<MouseBinding Command="Close" MouseActio...
Hi Everyone,
I'm having some issues when trying to bind a property of a UserControl in a ItemTemplate with a FindAncestor mode.
I have the following code:
<Window x:Class="TestUserControlBinding.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/200...
how can i change a button template dinamiclly
i have a combobox where by changing his selected value i want to change a button template
this is what i have been trying to do :
<Grid x:Name="LayoutRoot">
...
Hello,
I am using an ObservableCollection to wrap some of my generated entity framework objects.
When the user wants to edit some values , i am opening a popup windows that contains fields, and when the user changes and press save - the changes are saved to the database, and the binded controls are changes as it is an observablecollect...
I have a two listboxes where I generate content from XML. I define UriSource in XML. I'd like to find out how I can update Frame's Source property from two different lisboxes. Any ideas are highly appreciated.
XAML:
Listboxes and Frame:
<Grid x:Name="PANEL_BottomArea_Grid" DataContext="{Binding Source={StaticResource PagesData}}">
...
I am new to WPF so after reading for a while I deduce that my problem needs to be handled with this pattern: DependencyProperty.
I want my toggleButton to have another boolean property.
My problem is where should I assign this property, and how? Inside the object that is bound to the toggleButton?
Let's say I have a class cell (which ...
Hello,
I am new to WPF, and I want to develop an application for Theater seating in WPF- c#.net.
I did some research but i am lost as i do not know how each seat's data (sold or not, price, in which row) should be eventually bound to field in a table in SQL Express.
Should i be using ObservableCollection to populate the contents of a Dat...
I'd like to highlight to the user anything that has been modified, so that they know what they have changed or what has been programatically changed behind the scenes for them.
I want to use styles to apply this logic to all my controls, but i'm not sure how. I know I need to create a trigger but not sure what to trigger on exactly or h...
I have a huge issue with the WPF TreeView. I have setup a tree that is similar to this.
<TreeView DataContext="{Binding Projects}">
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="True" />
</Style>
<TreeView.Resources>
<HierarchicalDataTemplate x:Key="LoadTemplate">
<Grid>
...
Hi all,
I'm trying to create a user control with dependency properties to bind to. Internally I have a ComboBox that is bound to these same properties, but the binding only works one way. The ComboBox fills from the ItemsSource, but SelectedItem doesn't get updated back to the viewmodel I'm binding to.
A simplified example:
This is th...
I have a WPF application with form that has a textbox named "txtStatusWindow". I also have a vb.net class handed to me by a co-worker that needs to be called and executed by the code in my application code-behind. My co-worker insists that I will need to use common .net events to update the textbox on my form.
The separate vb.net class:...
We have a custom panel class that animates its children via an internal DoubleAnimation object. However, we want to expose the animation's Duration dependency property as a public property of our panel so the user can change it in their XAML when using our panel. But we don't want to expose any other part of the animation object, just ...
Can I force a window to re-evaluate all of its bindings and validations?
For some reason it seems to be ignoring the INotifyPropertyChanged.PropertyChanged in one weird situation and I'm looking for a work-around to use until I find the real cause.
...
I got a grid (2 rows) with grid splitter, the splitter is at the second row.
I want to bind the second row height to a member, so I can control the view by a button click:
At the begining the view shows only first row, when button clicked the view show both rows and the splitter is in the middle, after another click the second row and t...
hello,
in a GridView column i need to display a string composed from a set of fields on my view model. how do i bind multiple fields to same column and how do i specify the format string to use for this column?
thanks for any help
konstantin
...
Hello,
I am using a base class to my Popup windows on a WPF application. Everything looks and works great beside one thing : I cant map an event handler that is on the base class to the xaml.
Ofcourse i can easily have the event on the implemented class, and use the method to call the base class, but i just wanted to know if there a wa...
I'm trying to reset data in my object bound to a simple form (some textboxes and a couple of buttons).
I have 2 objects that were created separately, but have the same information. Object 1 is bound to a form using DataBinding. Object 2 is there to be able to reset Object 1 to original values.
Whenever user edits data everything is fine...
Would it be possible to bind to Validation.HasErrors on any child control of a panel, without explicitly binding to every named control? Specifically i want to fire a trigger on a general style of a panel if any child control is in error state.
Thanks.
...