Пример #1
0
        public DocumentMark(DocumentMarkViewModel viewModel)
        {
            //Default height used for repositioning in the margin
            Height     = _defaultHeight;
            _viewModel = viewModel;
            InitializeComponent();
            DataContext = this;
            string color = _viewModel.Marker?.Codemark?.Color;

            if (_viewModel.Marker?.Codemark?.Color.IsNullOrWhiteSpace() == true)
            {
                color = "blue";
            }

            ImageUri = $"pack://application:,,,/CodeStream.VisualStudio;component/Resources/Assets/marker-{_viewModel.Marker.Type}-{color}.png";
        }
Пример #2
0
        // private static int FadeInDefault = 200;

        public DocumentMark(DocumentMarkViewModel viewModel)
        {
            //Default height used for repositioning in the margin
            Height     = _defaultHeight;
            _viewModel = viewModel;
            InitializeComponent();
            DataContext = this;

            var color = _viewModel.Marker?.Color;

            if (color.IsNullOrWhiteSpace() == true)
            {
                color = "blue";
            }
            // this.FadeIn(FadeInDefault);

            // WTF I cannot get this to be "prcomment" OR "pull-request", using "comment" instead... going insane here...
            var type = _viewModel.Marker.Type == CodemarkType.Prcomment ? "comment" : _viewModel.Marker.Type.ToString();

            ImageUri = $"pack://application:,,,/CodeStream.VisualStudio;component/Resources/Assets/marker-{type}-{color}.png";
        }