two-way-binding

How to make my custom UserControl handle a two-way Binding when it is inside a Template Setter inside a DataTrigger?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:42:54
问题 If I put the TimeSpanPicker directly in the UserControl element, it works. If I put a DateTimePicker (from the Extended WPF Toolkit) instead of my TimeSpanPicker, it works in both ways. (This situation is what I wish to use, it is in the code below) If I put the TimeSpanPicker in a Template Setter inside a DataTrigger inside Style.Triggers inside UserControl.Style, the Binding stops working. The binding that does not work in any way (although it is set to TwoWay) is this: TimeSpan="{Binding

Why is two-way binding in silverlight not working?

随声附和 提交于 2019-12-11 02:54:54
问题 According to how Silverlight TwoWay binding works, when I change the data in the FirstName field, it should change the value in CheckFirstName field. Why is this not the case? ANSWER: Thank you Jeff, that was it, for others: here is the full solution with downloadable code. XAML: <StackPanel> <Grid x:Name="GridCustomerDetails"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions>

Two way binding on angular 6 reactive form

梦想与她 提交于 2019-12-10 02:58:26
问题 I am trying to create a complex reactive form with nested component that is populated with a data object. The behavior I am trying to achieve is very similar to the two-way data binding of a template-driven form: when the user edits an input of the form, the data object is changing automatically . but as opposed to template-driven form, I cannot use [(ngModel)] because it is deprecated in reactive forms for angular V6. I know that fromGroup.patchValue() will only do a one way binding and then

Two-way binding doesn't work

你说的曾经没有我的故事 提交于 2019-12-08 12:30:38
问题 I'm trying to learn Angular and Angular-CLI. So I created a project with Angular-CLI, which from the beginning seems to run just fine. Now for testing I changed app.component.html file to the following: <h1>Input your name:</h1> <input type="text" [(ngModel)]="name"> <p>Your input: {{ name }}</p> and my app.component.ts accordingly: ... export class AppComponent { name = ''; } I'm getting the error: Uncaught Error: Template parse errors: Can't bind to 'ngModel' since it isn't a known property

Two way data binding of images using ngFor in angular 6

旧巷老猫 提交于 2019-12-08 11:58:14
问题 I am using angular 6 and infinite scroll. Requesting the data using http service, I am able to bind the data(images) to dom on init. But I am fetching the next number of records on scroll end using infinite scroll. On scroll of I am triggering the function and pushing to the same array, and it is reflecting in ts(checked using debugger). But not binding in Html. It may be possible duplicate, But no solutions helped me. and also please give the correct way of debounce method implementation in

Two way binding on angular 6 reactive form

蹲街弑〆低调 提交于 2019-12-05 01:41:54
I am trying to create a complex reactive form with nested component that is populated with a data object. The behavior I am trying to achieve is very similar to the two-way data binding of a template-driven form: when the user edits an input of the form, the data object is changing automatically . but as opposed to template-driven form, I cannot use [(ngModel)] because it is deprecated in reactive forms for angular V6. I know that fromGroup.patchValue() will only do a one way binding and then ill have to manually subscribe to change events and update the data object manually - this will result

TwoWay Binding of a ComboBox to a static property in .NET 4.5

核能气质少年 提交于 2019-12-04 06:56:35
问题 Well, i just posted this question, but i figured that i am not doing anything wrong. My code (and the code of all of the answers) is correct, but my dev-maschine runs with .NET4.5 which apparently has a problem with the binding of the combobox... So here a new version of the question: How to two-way bind a combobox's SelectedItem to a static Property in .NET4.5? The following code snippets work in .net4 but not in .NET4.5. In 4.5 it is just that the selected value is not propagated back into

DataGridTemplateColumn Two way binding is not working

妖精的绣舞 提交于 2019-12-03 00:41:12
I've got a datagrid I've bound to a SqlDataApter. If I set up the XAML for the grid using DataTextColumn as illustrated in the code below it works perfectly <DataGrid AutoGenerateColumns="False" HorizontalAlignment="Left" Margin="27,42,0,0" Name="dataGrid1" VerticalAlignment="Top" AreRowDetailsFrozen="True"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding KEY}" Visibility="Hidden" IsReadOnly="True"></DataGridTextColumn> <DataGridTextColumn Binding="{Binding CHARACTERISTIC_CODE}" Header="Unit" IsReadOnly="True" /> <DataGridTextColumn Binding="{Binding UNIT_CHAR}" Header="Unit"

TwoWay Binding of a ComboBox to a static property

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 09:22:54
问题 -------EDIT------ So, i figured that my code is correct and so are the code snippets from all of your answers . Thanks for that. My problem is that my dev-maschine runs .NET4.5 which behaves differently! The very same program (compiled against .NET4.0) runs correct on a maschine with .NET4.0 but not on a maschine with .NET4.5! So here is my revised question. -------EDIT------ First, the simple example how i two-way bind my combobox to my data context: View model: public class

Two-way data binding with converter doesn't update source

人走茶凉 提交于 2019-12-01 03:32:49
问题 I've got a data binding set up with a converter to transform an awkward XML source to a display- and editing- convenient tree of internal classes. Everything works great for reading from the XML source, but I'm having a devil of a time trying to get changes made to the internal classes to propagate back to the XML source. Here's the XAML for the use site: <local:SampleConverter x:Key="SampleConverter" /> <Expander Header="Sample" > <local:SampleControl Sample="{Binding Path=XmlSource,