Ejemplo n.º 1
0
 /// <summary>
 /// Setup page and init the xaml
 /// </summary>
 public HomeView()
 {
     InitializeComponent();
     // This page must be cached
     NavigationCacheMode = NavigationCacheMode.Enabled;
     // Set the data context
     DataContext = ViewModel;
     // Page has been unloaded from UI
     Unloaded += (s, e) => ViewModel.Dispose();
 }
Ejemplo n.º 2
0
        /// <summary>
        ///     Setup page and init the xaml
        /// </summary>
        public HomeView()
        {
            InitializeComponent();
            // Set the data context
            DataContext = ViewModel;

            Unloaded += (s, e) =>
            {
                ViewModel.Dispose();
            };
        }
Ejemplo n.º 3
0
        public async Task <bool> DisposeAsync()
        {
            Singleton.getDialogueBox().showSearch(ConfigurationManager.AppSettings["close_message"]);
            unsubscribeEvents();
            ItemViewModel.Dispose();
            ClientViewModel.Dispose();
            QuoteViewModel.Dispose();
            OrderViewModel.Dispose();
            ReferentialViewModel.Dispose();
            AgentViewModel.Dispose();
            NotificationViewModel.Dispose();
            SecurityLoginViewModel.Dispose();
            HomeViewModel.Dispose();
            ChatRoomCurrentView = null;
            await ChatRoomViewModel.DisposeAsync();

            deleteCache();
            return(true);
        }