示例#1
0
        private void UpdateIcon()
        {
            var templateSettings = TemplateSettings;
            var source           = IconSource;

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

            else
            {
                templateSettings.IconElement = null;
            }
        }
示例#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);
            }
        }