summaryrefslogtreecommitdiff
path: root/Juick/Classes/DeferredLoadListBoxItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Classes/DeferredLoadListBoxItem.cs')
-rw-r--r--Juick/Classes/DeferredLoadListBoxItem.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/Juick/Classes/DeferredLoadListBoxItem.cs b/Juick/Classes/DeferredLoadListBoxItem.cs
deleted file mode 100644
index 97bfc18..0000000
--- a/Juick/Classes/DeferredLoadListBoxItem.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) Microsoft Corporation. All Rights Reserved.
-// This code released under the terms of the Microsoft Public License
-// (Ms-PL, http://opensource.org/licenses/ms-pl.html).
-
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Juick.Classes
-{
- /// <summary>
- /// Implements a subclass of ListBoxItem that is used in conjunction with
- /// the DeferredLoadListBox to defer the loading of off-screen items.
- /// </summary>
- public class DeferredLoadListBoxItem : ListBoxItem
- {
- private object _maskedContent;
- private DataTemplate _maskedContentTemplate;
-
- internal bool Masked { get; set; }
-
- internal void MaskContent()
- {
- if (!Masked)
- {
- _maskedContent = Content;
- _maskedContentTemplate = ContentTemplate;
- Content = null;
- ContentTemplate = null;
- Masked = true;
- }
- }
-
- internal void UnmaskContent()
- {
- if (Masked)
- {
- ContentTemplate = _maskedContentTemplate;
- Content = _maskedContent;
- _maskedContentTemplate = null;
- _maskedContent = null;
- Masked = false;
- }
- }
- }
-}