I have a view containing a ListView and an "Edit" Button. The ListView's ItemSource is bound to an ObservableCollection<Account> property on the underlying view model. Its SelectedItem property is also bound to the view model.
When the edit button is clicked, the existing view model launches an editing view/view model pair ("editing s...
Hi,
Basic winforms question I think. If I have a dialog where I'm collecting infomation, including some fields which will change depending upon the input of other fields, would it be normal/best practice to create an class/object to hold the various data, and then bind individual controls (e.g. text box, checkbox) to this object? i.e....
Hello all, i have customized ListBox declared in XAML:
<ListBox x:Name="uicMDSQonfServer">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"
Margin="0,5,0,5">
<CheckBox IsChecked="{Binding RelativeSource={TemplatedParent},
Path=Activated...
Hi there
I'm trying to understand the following part of an error message:
Additional information: 'Provide value on 'System.Windows.DynamicResourceExtension' threw an exception.' Line number '118' and line position '56'.
, what lines are the error referring to? No source files are mentioned..
...
Hi,
Is it possible to declare a style that sets the fontsize of tooltips to the same size as the parent form? I have tried this...
<Style TargetType="{x:Type ToolTip}">
<Setter Property="FontSize" Value="{Binding ElementName=MainWindow, Path=FontSize}"/>
</Style>
...but that doesnt work. Any suggestions?
...
I have a bunch of text boxes bound to table adapters, when I fill my datatable only one box out of all of them will fill, txtEducator (there is only one row in the datatable). They are all configured exactly the same. I have debuged and there is data in most of the fields in the datatable, it just chooses to only show the one field. (I ...
Hi
I have Silverlight Accordion control in the ChildWindow and I customized it the following way
<Style x:Key=itemStyle TargetType=AccordionItem>
<Setter Porperty=HeaderTemplate>
<DataTemplate>
<TextBlock x:Name=_headertext/>
</DataTemplate>
</Setter>
</Style>
<Accordion Style"{StaticResource itemStyle}">
<Accordi...
I have the following dependency property:
public bool IterationSelected
{
get { return (bool)GetValue(IterationSelectedProperty); }
set { SetValue(IterationSelectedProperty, value); }
}
public static readonly DependencyProperty IterationSelectedProperty =
DependencyProperty.Register("IterationSelected", typeof(bool),
typeof(...
I have a highly customized Edit control which inherits Richtextbox. I needed a way to bind a Value to this control, so I registered new DependencyProperty, but have trouble to code it like I need.
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register("Value", typeof(string), typeof(XliffRichCe...
We've created a custom theme for a WPF application. The styles in this theme use various bindings. On startup of the application a lot of Exceptions like this occur:
System.ArgumentException occurred,
Message="The requested value \"RecordFixToBottomPrompt\" could not be found.", Source="mscorlib", at StackTrace: bei System.Enum.Parse(Ty...
I'm looking a way to format DataGridViewTextBoxColumn so that the value to be databinded is formatted during databind. For example I have a CompanyName property and I need to take first 5 letters from the CompanyName when databinding happens.
I could hook on different DataGridView events (e.g. RowsAdded) and loop through all the rows an...
I have a object myObject.Name in a Form1 with a textBox1
In the Form1_Load I do:
this.TextBox1.DataBindings.Add("Text", myObject, "Name");
When validating the textBox I have myObject.Name changed. This is OK.
Now I modify internally in myObject _name = "changed value", but myTextBox text will not change. so... how to do it on both di...
I have a user control whose users I want to have them set a DataContext on to bind to a list of objects. In my control, however, I want to display that list in a grid, but in a non-trivial order. The column/row of display of each element will be determined by some code I will write.
So I cannot do a straight databinding in my control,...
Hi to all, well, I have a combobox which I have bind his selectedItem property to a value object object, like this
<fx:Binding source="styles_cb.selectedItem.toString()" destination="_uniform.style"/>
<fx:Declarations>
<fx:XML id="config_xml" xmlns="" source="config.xml" />
<!-- Place non-visual elements (e.g., services, value objects) ...
I have a situation where I currently have a HyperLinkColumn control that I would like to modify to have a Label or simple text appear in the same column as the hyperlink. How do I acheive this please? Any Idea?
...
One of the advantages that i hear about properties is that they can be used for databinding, while i hear no explanation of why beyond "that's how it works". Is it that way because there is no choice (i.e. a limitation of the .NET VM) or was it really designed that way, and if so why?
...
I have a domain object with a setter method that takes in a map of id, value pairs. This is not just a plain association, and this setter method has some login in it. For example:
class DomainObj{
def setTheMap(map){
//do stuff with the map
}
}
I have a form where the user can type in a value for each id. My goal is that when ...
dhopton's comment got me thinking. What are some situations where you wouldn't want to use an ObservableCollection?
...
Problem
I have a WPF Toolkit DataGrid, and I'd like to be able to switch among several preset column orders. This is an MVVM project, so the column orders are stored in a ViewModel. The problem is, I can't get bindings to work for the DisplayIndex property. No matter what I try, including the sweet method in this Josh Smith tutorial, I ...
Hi all,
I'm using a DataTable to sync some properties of a list of objects to a TreeView.
When labels are edited, I want the relevant property of the relevant object to be updated, and labels to sync when the properties are changed elsewhere.
Currently I'm updating the object's DataTable row when the property changes, and update the pr...