inotifypropertychanged

Function call works when called internally from in its control but not externally from the main app

点点圈 提交于 2019-12-14 03:21:13
问题 I have used some code that i retrieved from this website to create a scrolling terminal type window. The example works very well, so i decided i would turn it into a basic control so i could reuse. In the control I have a "LogEntry" type list that is databound to an "items control" so when the list gets updated, so does the items control. This list gets updated by calling the "AddEntry" function. When this function is called internally from the control, the list notifies the "ItemsControl"

How to report that custom (added) Calculated Property of entity object has changed?

别说谁变了你拦得住时间么 提交于 2019-12-14 02:52:00
问题 First, I apologize for my low level English writing. I use Entity Framework and data-binding in WPF MVVM project. I would like to know what is the best way to do data binding to added calculated property of EntityObject which is generated with Entity Framework. For example: partial class Person { partial string Name... partial string Surname... public string FullName { get { return Name + Surname; } } } And then in XAML something like ...Text="{Binding FullName, Mode=Twoway}" At this point my

asp.net mvc property changed event

南楼画角 提交于 2019-12-13 18:24:48
问题 I'm a .Net desktop applications developer trying to switch to ASP.Net MVC (3 or 4 doesn't matter). We have a .Net library which notifies any GUI you want to put on this assembly by Property Changed Events (or any other custom event we deemed necessary for that matter). This might not even be a relevant question, because perhaps it's done totally different in ASP.Net MVC , but how do you update your View in the browser on your client after receiving a Property Changed Event from an assembly on

Notify PropertyChanged after object update

大城市里の小女人 提交于 2019-12-13 04:36:23
问题 I wish to update my listview in an elegant way. This is my code: ObservableCollection<Track> tracks = new ObservableCollection<Track>(); Track track = new Track(); Tracks.AddRange(track); // collection add a track, and list view updates too Task.Factory.StartNew(() => track.GetInfo(); // this operation might require some times to update // here I need to notify that my object is updated ); How i can force to update binding of an object inside my ObservableCollection ? This is my userControl

Stringify member name similar to #define str(s) #s in C

百般思念 提交于 2019-12-13 02:42:14
问题 Is there any way to stringify a member name in C# for .NET 4.0 like you would in C by using the #define str(s) #s macro? public Double MyDouble { get { return _MyDouble;} set { _MyDouble = value; RaisePropertyChanged("MyDouble"); // The below item would refactor correctly if C# had a stringify pre-processor // RaisePropertyChanged(str(MyDouble)); } } private Double _MyDouble; Re-factorization breaks the raise property changed event if I have Search in Strings disabled or breaks completely

WPF ProgressBar Not Updating with INotifyPropertyChanged

帅比萌擦擦* 提交于 2019-12-13 00:42:57
问题 I have a UserControl with several TextBox controls and a ProgressBar. The TextBox controls properly reflect the properties in codebehind to which they are bound. The ProgressBar does not respond to property change, however. My XAML: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008

PropertyChanged is Null UWP

你说的曾经没有我的故事 提交于 2019-12-13 00:24:21
问题 Okay, before you say anything I know multiple posts of this exist and I am searching for an answer for hours. I am a new user in Stack Overflow and fairly new to C# and UWP so please feel free to correct me. I am making an UWP store application for Windows 10. I using an API and I am connecting to a server. All of that happens in a separate page of my MainPage.xaml which is loaded in a Frame ! What I want to do is to show the string connectionStatus to the MainPage.xaml (through a <TextBlock/

Hook in to OnDeserializing for XmlSerializer

柔情痞子 提交于 2019-12-12 20:40:18
问题 Otherwise than pointed out in this post I would like to act just before an XmlSerializer starts deserializing (not when finished deserializing) Background: I have a baseClass that implements INotifyPropertyChanged . This BaseClass is stored as xml in a database and when retrieved deserialized into an object instance. The deserialization executes the setters of this class where my ChangeNotification takes place. On a centralised handler for the changenotification I set the status of the object

WPF Are NotifyPropertyChangeds marshalled to the dispatcher?

≡放荡痞女 提交于 2019-12-12 19:03:58
问题 If I update a property that throws a NotifyPropertyChanged on a thread other than the bound control's dispatcher is the update forcibly marshalled to this dispatcher? BackgrounWorker.Run() => { blah.Blahness = 2; // notifies property changed on BW, is this marshalled to the dispatcher? } 回答1: Yes, the PropertyChanged event is automatically marshalled to the UI dispatcher, so you don't need to use Invoke to marshall it explicitly. Note that it is only true for change notifications on scalar

Notify One object when a property of another object changes

℡╲_俬逩灬. 提交于 2019-12-12 07:36:01
问题 I have a parent object called Page that has a List of objects called Control: public class Page { List<CustomControl> controls {get;set;} } The CustomControl class has the following defintion: public class CustomControl { string Name {get;set;} string Value {get;set;} } Say for instance the Page class has two CustomControls A and B. Is it possible to Notify Custom Control B when the property Value of Custom Control A changes so that it can change some of its properties. I was thinking of