binding

using of INotifyPropertyChanged

旧时模样 提交于 2021-01-30 09:09:37
问题 Can someone explain me why need to use implementation of INotifyPropertyChanged when using binding in wpf? I can bind properties without implementation of this interface? For example i have code public class StudentData : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

using of INotifyPropertyChanged

守給你的承諾、 提交于 2021-01-30 09:09:16
问题 Can someone explain me why need to use implementation of INotifyPropertyChanged when using binding in wpf? I can bind properties without implementation of this interface? For example i have code public class StudentData : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

using of INotifyPropertyChanged

倖福魔咒の 提交于 2021-01-30 09:07:37
问题 Can someone explain me why need to use implementation of INotifyPropertyChanged when using binding in wpf? I can bind properties without implementation of this interface? For example i have code public class StudentData : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

using of INotifyPropertyChanged

橙三吉。 提交于 2021-01-30 09:07:07
问题 Can someone explain me why need to use implementation of INotifyPropertyChanged when using binding in wpf? I can bind properties without implementation of this interface? For example i have code public class StudentData : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

Bind from 2 ViewModels in one XAML element

喜欢而已 提交于 2021-01-29 16:31:37
问题 I am interested in trying to use information from two ViewModels in one element. Here is my sample. At the beginning of the page I got this <ContentPage.BindingContext> <vm: MainViewModel /> </ContentPage.BindingContext> ... at one point I have an element that I need values from 2 VMs. <TapGestureRecognizer Command="{Binding CommandValueFromAnotherViewModel}" CommandParameter="{Binding StringValueFromCurrentViewModel}"> // This <TapGestureRecognizer.BindingContext> <vm

Angular 8 Metronic binding not updating

落爺英雄遲暮 提交于 2021-01-29 10:18:48
问题 I started a project with Angular 8 Metronic. I have a component with a form. I want spinner appears on submit click and disappear on API response. Here is a part of the component code : @Component({ selector: 'change-password', templateUrl: './change-password.component.html', styleUrls: ['./change-password.component.scss'], }) export class ChangePasswordComponent implements OnInit, OnDestroy { isLoading: boolean = false; ... submit() { this.isLoading = true; this.utilisateurService

Updating control property breaks OneWay binding?

给你一囗甜甜゛ 提交于 2021-01-29 10:04:56
问题 Consider this very simple example where I have a UserControl like this: UserControl XAML: <UserControl x:Class="BindingTest.SomeControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="SomeControlElement"> <Grid> <TextBlock Text="{Binding ElementName=SomeControlElement, Path=Counter}" /> </Grid> </UserControl> Code Behind: using System; using System.Windows; using System.Windows.Controls; using System.Windows

Problems with Bindings in Xamarin Forms (MVVM)

喜夏-厌秋 提交于 2021-01-29 08:45:12
问题 I am having some problems understanding xaml with mvvm. Sometimes works but others doesn't. ViewModel (implements INotifyPropertyChanged): private Class1 firstClass; public Class1 FirstClass{ get{return firstClass;} set{firstClass = value; OnPropertyChanged();} } private string name; public string Name{ get{return name;} set{name = value; OnPropertyChanged();} } private string address; public string Address{ get{return address;} set{address = value; OnPropertyChanged();} } View: private

Cannot bind parameter, cause the parameter type is not supported by the binding (HttpTrigger of Azure Functions)

心不动则不痛 提交于 2021-01-29 08:40:50
问题 I have to migrate a part of a monolith to be able to run the migrated part independently, but i'm new in azure functions. Multiple HttpTriggers contain an a unsupported parameter type. ( IMultiplierService ) public static async Task<IActionResult> GetMultiplier( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "multipliers/{id:guid}")] HttpRequest req, string id, IMultiplierService multiplierService){ ... } I read online and understand that the string id is a reference to the {id

CS0201 error in ICommand impmentation for WPF application

混江龙づ霸主 提交于 2021-01-29 08:27:15
问题 I develop a WPF application, obviously, I use MVVM pattern. Without an external library (MvvmCross, MvvmLight, ...) And I've tried to implement ICommand : Option 1 public class Command : ICommand { private readonly Func<bool> _canExecute; private readonly Action _action; public Command1(Action action, Func<bool> canExecute) { _action = action; _canExecute = canExecute; } public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager