I have a databound ListBox with a DataTemplate setup. The DataTemplate contains a Grid control with two column widths of Auto and *. I would like this column to always fill the ListBoxItem and never extend past the LisBox control to make the horizontal scrollbar visible.
I am able to bind the MaxWidth to the DataTemplate's grid using:...
I'm trying to do some WPF databinding, but I'm a little hung up at the moment. I have two listboxes and an XML file. The first listbox successfully binds to the XML source. However, when I try to bind to a child of the selected item from first listbox as the source for the second list box, nothing appears. The goal being something like a...
How can I change the desktop wallpaper using C# Code?
...
I am trying to successfully TwoWay bind an ObservableCollection to TextBoxes in a DataTemplate. I can get the data to display properly, but I am unable to change the list data through the UI. I have a Model class named 'model' which contains an ObservableCollection named 'List'. The class implements the INotifyPropertyChanged interface. ...
I'm having some trouble with the output of a DateTime value. My computer's current culture is set to de-AT (Austria).
The following code
string s1 = DateTime.Now.ToString("d");
string s2 = string.Format("{0:d}", DateTime.Now);
results in s1 and s2 both having the correct value of "30.06.2009".
But when using the same format in XAML
...
My point is this. For test i need when user check chk1 the chk2 element changed the property IsEnabled to False, but i can't do reference to chk2 element.
This is Style XAML.
<Style x:Key="styleCheckBox" TargetType="{x:Type CheckBox}">
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
...
when using mvvm pattern, when we have lists we use ObservableCollection<>.
my question is when should i call to
CollectionViewSource.GetDefualtView(theCollection);
to get the view that i can filter and sort and do some other cool stuff.
if i dont work with mvvm i'll do it in window.load
...
Hi,
Does anyone know how to set the Corner-Color of a WPF Toolkit DataGrids Scrollbar?
It would be nice if the upper Corner would use the same Style as the ColumnHeaderStyle and the lower Corner would be transparent.
Image
Thanks in advance!
...
how to add customized buttons to the existing Messagebox in WPF ? Apart from the usual ok and cancel button i need to add 3 more buttons and also i need to handle the events of these buttons.. How is it possible? please help me
...
Hello everyone,
my current free-time project, in order to dive into WPF MVVM, is a "digital" copy of an old puzzle I used to play a lot in my childhood. It basically is a simple puzzle where one has to fill a given space with different kind of pieces so the whole space is filled. But with the extra twist of being in hexagonal space.
...
I would like to set some limits/boundaries on the amount of pixels we can stretch a gridsplitter control which is inside a grid.How is this possible?
Basically one should not be allowed to pull the gridsplitter to large limits(it should be restricted to smaller grid boundaries)
...
I have a WPF toolkit DataGrid as the dropdown in a ComboBox template.
<toolkit:DataGrid x:Name="InnerGrid"
ItemsSource="{TemplateBinding ItemsSource}"
CanUserReorderColumns="False" CanUserResizeColumns="True"
CanUserSortColumns="False" CanUserResizeRows="False"
A...
I need a button-like control that can have a Checked property, so that when clicked it stays pressed.
I had that functionality in WinForms, with the CheckBox control, setting the Appearance property to "Button".
Can someone help me?
...
I'm developing a small application using Blend, basically what I have in my application are two list views, lets call them List View A and List View B.
List View A represent the files in my computer that I want to sent to the server and List View B represent the files that are in the server.
What I want to do is to create a transition ...
I am having problems displaying the Validation.Errors in my ItemsControl. The Validation.Errors does not contain anything. I am NOT using BindingGroup but I use my own custom TextBoxes. Here is the ItemsControl code:
<ItemsControl x:Name="errorList" ItemsSource="{Binding Path = (Validation.Errors), ElementName=gvAddCustomer}" >
...
How to make a column in WPFToolkit:DataGrid PasswordBox like?
...
The easiest way is to implement ButtonClick event handler and invoke Window.Close() method. But how to do this through a command binding?
...
Suppose I have a UserControl whose DataContext is set to an object that has an XmlDataProvider property. I would like to bind to this property in my control's XAML, and specify some XPath. I tried this:
<TreeView ItemsSource="{Binding Path=PropertyName, XPath=/items/item/*}">
At runtime I get the exception "BindingExpression with XPat...
Hi,
I have created a Treeview and used a stack panel to include a checkbox, icon image and text for each node in the tree.
These nodes are created at runtime.
I also have a button object.
The xaml is below.
The problem i have is that, when the click me button is clicked, i need to traverse thru the tree view and if a checkbox is checked...
How to make TextBox possible to get only certain values. e.g. DateTime input box with defined format settings.
...