Beispiel #1
0
            public LocationItem(TaggedContentSpan span)
            {
                _Span   = span;
                Content = new ThemedMenuText(span.ContentText);
                var ct = span.Tag.ClassificationType;

                if (ct == _H1 || ct == _DummyTag1)
                {
                    Content.FontWeight = FontWeights.Bold;
                    _ImageId           = IconIds.Heading1;
                }
                else if (ct == _H2 || ct == _DummyTag2)
                {
                    _ImageId = IconIds.Heading2;
                }
                else if (ct == _H3 || ct == _DummyTag3)
                {
                    _ImageId        = IconIds.Heading3;
                    Content.Padding = _H3Padding;
                }
                else if (ct == _H4 || ct == _DummyTag4)
                {
                    _ImageId        = IconIds.Heading4;
                    Content.Padding = _H4Padding;
                }
                else if (ct == _H5 || ct == _DummyTag5)
                {
                    _ImageId        = IconIds.Heading5;
                    Content.Padding = _H5Padding;
                }
                else if (ct == _H6 || ct == _DummyTag6)
                {
                    _ImageId        = IconIds.None;
                    Content.Padding = _H6Padding;
                }
            }
Beispiel #2
0
            public LocationItem(TaggedContentSpan span)
            {
                _Span   = span;
                Content = new ThemedMenuText(span.ContentText);
                var t = span.Tag.ClassificationType;

                if (t == _H1)
                {
                    Content.FontWeight = FontWeights.Bold;
                    _ImageId           = KnownImageIds.FlagDarkRed;
                }
                else if (t == _H2)
                {
                    _ImageId = KnownImageIds.FlagDarkPurple;
                }
                else if (t == _H3)
                {
                    _ImageId        = KnownImageIds.FlagDarkBlue;
                    Content.Padding = _H3Padding;
                }
                else if (t == _H4)
                {
                    _ImageId        = KnownImageIds.Flag;
                    Content.Padding = _H4Padding;
                }
                else if (t == _H5)
                {
                    _ImageId        = KnownImageIds.FlagOutline;
                    Content.Padding = _H5Padding;
                }
                else if (t == _H6)
                {
                    _ImageId        = KnownImageIds.Blank;
                    Content.Padding = _H6Padding;
                }
            }