We are doing custom drawing in a control subclass's OnRender. This drawing code is based on an external trigger and data. As such, whenever the trigger fires, we need to re-render the control based on that data. What we're trying to do is find out…
A custom WPF Control overrides OnRender. The method generates and displays a Path from custom data. The data provider is bound using a Dependency Property. The Dependency Property registers for an event when data changed. This event in turn calls…
I am trying to draw timelines in WPF. It should basically consist of 3 rectangles.
It should look something like this (hardcoded using XAML):
Timeline
The large white rectangle should fill all of the available space, the green rectangles represent…
I want to draw something dynamically. Following code shows my OnRender. I'm setting DrawItem somewhere in my program where I need it. But when I'm calling DrawItem =5; what do I have to call, so that OnRender gets called?
protected override void…
I have a bivariate dataset with 100 observations. I used hexagon binning and ended up with 26 hexagon bins. In order to save the rows of the 100 observations that are in each of the 26 hexagon bins, I used the base::attr function in R. In the code…
I just cannot manage to draw a single pixel wide black (!) line in OnRender using drawingContext.DrawLine() on my laptop monitor which has a DPI of 120. I face this problems since years and I read many answers here on stackoverflow, but I can simply…
This is a continuation of a previous post (Interactively adding points to plotly R without redrawing background plot). I am making a scatterplot matrix (using the R package ggpairs) of 32 mtcars dataset values. My goal is to allow users to click on…
I have a custom panel that implements a nice custom layout of its children. I want to add some extra graphics to the panel and so override OnRender to add extra rectangles etc. It works great except the OnRender only seems to add to the background.…
I have a Shiny application that has two plots. If a user clicks on a point in the top plot, the x and y coordinate of that point are saved to a reactive Shiny variable (in the code below, it is called pointSel).
In the bottom plot, I would like the…
I posted a similar question earlier (Retrieving R object attributes in JavaScript). In that earlier post, I oversimplified my MWE, and so the answer I rewarded unfortunately does not really apply to my real problem. Here, I am showing why I may need…
I want to check if an image has been fully loaded. So I'm using onRendered on the template with the image:
template
helper
Template.backgroundImage.helpers({
…
I'm learning extjs as our application uses it. Right now I've been able to build something like:
blur: function(field, lastValues) {
var vField = field.getValue(),
vFormPanel = field.formPanel;
if (Ext.isEmpty(vField)) {
MsgBox.show({
…
I have a Shiny application in which a user can select black points in a Plotly scatterplot using the Plotly "box select" icon. The points the user selects will be highlighted in red. I have a MWE of this application…
I am trying to create my own graph user control, I have one already working on win forms and I am trying to move it into WPF world.
I am starting with learning how to do drawing, so first thing I was trying to draw a black ellipse that fills an…
I am having troubles understanding when the OnRender method is invoked.
Consider my example:
I have a class SomeElement deriving from FrameworkElement which overrides the OnRender method.
Suppose I have a Grid grid. What I would expect is that
var…