Skip to content

Image annotation not showing on windows phone? #2

@objorke

Description

@objorke

From oxyplot: oxyplot/oxyplot#965

Adding image annotation not showing on windows phone.

what i try :

OxyImage imageAdd;
            OxyImage imageDelete;

            var assembly = typeof(TssDashboard).GetTypeInfo().Assembly;
            //var str = this.GetType().AssemblyQualifiedName;
            using (var stream = assembly.GetManifestResourceStream("Test.Resources.OKLA.png"))
            {
                imageAdd = new OxyImage(stream);
            }
            using (var stream = assembly.GetManifestResourceStream("Test.Resources.DeleteLA.png"))
            {
                imageDelete = new OxyImage(stream);
            }
            //// Relative to plot area, above top/left corner, 20pt high
            model.Annotations.Add(new OxyPlot.Annotations.ImageAnnotation
            {
                ImageSource = imageAdd,
                X = new PlotLength(DateTimeAxis.ToDouble(DictVarData.ElementAt(DictVarData.Count -50 ).Name), PlotLengthUnit.Data),
                Y = new PlotLength(980, PlotLengthUnit.Data),
                Width= new PlotLength(44, PlotLengthUnit.ScreenUnits),
                HorizontalAlignment = OxyPlot.HorizontalAlignment.Center,
                VerticalAlignment = OxyPlot.VerticalAlignment.Top,
            });
model.InvalidatePlot(true);

code execution not showing image on chart.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions