You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Create Observable itempublicclassObservableObjects{publicstaticISubject<string>CurrentAppLanguageObservable=newSubject<string>();}//Subscribe
ObservableObjects.CurrentAppLanguageObservable.Subscribe(str=>{//action on change});//Notify change
ObservableObjects.CurrentAppLanguageObservable.OnNext("Str");
Search Box search on TextChangedEvent with time control
Case : Create a search box which will search after no text changed in 1 second
<!-- Create SearchBar in XAML -->
<SearchBarx:Name="SearchBox"/>
Observable.FromEventPattern(SearchBox,"TextChanged").Do(sender =>{varsearchbar=(sender as SearchBar);//Action will be done on every text change here})//Wait for 1 second.Throttle(new TimeSpan(0,0,1)).Subscribe(sender =>{varsearchbar=(sender as SearchBar);//Do your search logic which is heavy load here});