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
Every time I try to use ReactiveObject in a viewmodel the application will just start crashing. If I use the INotifyPropertyChanged then the application stops crashing.
Here is the code:
using ReactiveUI;
using System.Collections.ObjectModel;
using MyForum.Models;
using System;
namespace MyForum
{
public class MainViewModel : ReactiveObject
{
public ObservableCollection<PivotInfoItem> _PivotItems { get; set; }
public MainViewModel()
{
this._PivotItems = new ObservableCollection<PivotInfoItem>();
LoadData();
}
public ObservableCollection<PivotInfoItem> PageCollection
{
get { return _PivotItems; }
set
{
this.RaiseAndSetIfChanged(x => x.PageCollection,value);
}
}
public bool _loadvis;
public Boolean OverlayVis
{
get
{
return _loadvis;
}
set
{
this.RaiseAndSetIfChanged(x => OverlayVis, value);
}
}
public bool IsDataLoaded
{
get;
private set;
}
/// <summary>
/// Creates and adds a few ItemViewModel objects into the Items collection.
/// </summary>
public void LoadData()
{
// Sample data; replace with real data
// this._PivotItems.Add(new PivotInfoItem() { Title = "Discover" });
// this._PivotItems.Add(new PivotInfoItem() {Title="Search" });
this.IsDataLoaded = true;
}
}
}
The text was updated successfully, but these errors were encountered:
Every time I try to use ReactiveObject in a viewmodel the application will just start crashing. If I use the INotifyPropertyChanged then the application stops crashing.
Here is the code:
using ReactiveUI;
using System.Collections.ObjectModel;
using MyForum.Models;
using System;
namespace MyForum
{
public class MainViewModel : ReactiveObject
{
}
The text was updated successfully, but these errors were encountered: