Пример #1
0
        // reset CIC event if the container is being cleared.
        internal override void ClearContainerForItem(
            DependencyObject pContainer,
            object pItem)
        {
            CalendarViewDayItem spContainer = (CalendarViewDayItem)(pContainer);

            // There is much perf involved with doing a clear, and usually it is going to be
            // a waste of time since we are going to immediately follow up with a prepare.
            // Perf traces have found this to be about 8 to 12% during a full virtualization pass (!!)
            // Although with other optimizations we would expect that to go down, it is unlikely to go
            // down to 0. Therefore we are deferring the impl work here to later.
            // We have decided to do this only for the new panels.

            // also, do not defer items that are uielement. They need to be cleared straight away so that
            // they can be messed with again.
            m_toBeClearedContainers.Add(spContainer);

            // note that if we are being cleared, we are not going to be in the
            // visible index, or the caches. And thus we will never be called in the
            // prepare queuing part.

            if (!m_isRegisteredForCallbacks)
            {
                BuildTreeService spBuildTree;
                spBuildTree = DXamlCore.GetCurrent().GetBuildTreeService();
                spBuildTree.RegisterWork(this);
            }

            global::System.Diagnostics.Debug.Assert(m_isRegisteredForCallbacks);
        }
Пример #2
0
        private void PrepareState()
        {
            //CalendarDatePickerGenerated.PrepareState();

            // Set a default string as the PlaceholderText property value.
            string strDefaultPlaceholderText;

            strDefaultPlaceholderText = DXamlCore.GetCurrent().GetLocalizedResourceString(TEXT_CALENDARDATEPICKER_DEFAULT_PLACEHOLDER_TEXT);

            PlaceholderText = strDefaultPlaceholderText;

            return;
        }