Esempio n. 1
0
        private void UpdateIcon()
        {
            var templateSettings = TemplateSettings;
            var source           = IconSource;

            if (source != null)
            {
                templateSettings.IconElement = SharedHelpers.MakeIconElementFrom(source);
            }

            else
            {
                templateSettings.IconElement = null;
            }
        }
Esempio n. 2
0
        private void OnIconSourceChanged()
        {
            var templateSettings = TabViewTemplateSettings;
            var source           = this.IconSource;

            if (source != null)
            {
                templateSettings.IconElement = SharedHelpers.MakeIconElementFrom(source);
                VisualStateManager.GoToState(this, "Icon", false);
            }

            else
            {
                templateSettings.IconElement = null;
                VisualStateManager.GoToState(this, "NoIcon", false);
            }
        }