예제 #1
0
 private void Render(DrawingContext drawingContext)
 {
     if (DataContext is ILayerContainer layer && layer.IsVisible)
     {
         var renderer = LayerElement.GetRenderer(this);
         if (renderer != null)
         {
             var data       = LayerElement.GetData(this);
             var properties = data != null ? data.Properties : default;
             var record     = data != null ? data.Record : default;
             renderer.Draw(drawingContext, layer, 0.0, 0.0, properties, record);
         }
     }
 }
예제 #2
0
        private void Render(DrawingContext drawingContext)
        {
            if (DataContext is ILayerContainer layer && layer.IsVisible)
            {
                var renderer = LayerElement.GetRenderer(this);
                var data     = LayerElement.GetData(this);
                var dataFlow = LayerElement.GetDataFlow(this);

                if (data != null && dataFlow != null)
                {
                    var db     = data.Properties;
                    var record = data.Record;

                    dataFlow.Bind(layer, db, record);
                }

                if (renderer != null)
                {
                    renderer.Draw(drawingContext, layer, 0.0, 0.0);
                }
            }
        }