Ejemplo n.º 1
0
        void OnInstantiated(object sender, TemplateInstantiatedEventArgs templateInstantiatedEventArgs)
        {
            if (templateInstantiatedEventArgs.Container is LayoutItemTemplateContainer layoutItemTemplateContainer)
            {
                _layoutStyleProvider.ApplyCaptionControlStyle(layoutItemTemplateContainer);
                _layoutStyleProvider.ApplyContainerControlStyle(layoutItemTemplateContainer);
            }

            if (templateInstantiatedEventArgs.Container is LayoutGroupTemplateContainer layoutGroupTemplateContainer)
            {
                _layoutStyleProvider.ApplyGroupControlStyle(layoutGroupTemplateContainer);
            }
        }
Ejemplo n.º 2
0
        void OnInstantiated(object sender, TemplateInstantiatedEventArgs templateInstantiatedEventArgs)
        {
            var layoutItemTemplateContainer = templateInstantiatedEventArgs.Container as LayoutItemTemplateContainer;

            if (layoutItemTemplateContainer != null)
            {
                _layoutStyleProvider.ApplyCaptionControlStyle(layoutItemTemplateContainer);
                _layoutStyleProvider.ApplyContainerControlStyle(layoutItemTemplateContainer);
            }
            var layoutGroupTemplateContainer = templateInstantiatedEventArgs.Container as LayoutGroupTemplateContainer;

            if (layoutGroupTemplateContainer != null)
            {
                _layoutStyleProvider.ApplyGroupControlStyle(layoutGroupTemplateContainer);
            }
        }