Hallo,
is there any way to only get a direkt right click on a node? The GetElementAtPoint get's the node even if the cursor is outside of the (visible part) of the node but at the same hight (I think this is the same reason why the hottrack reacts outside of the visible part of the node)
I'd use the NodeMouseClick but the event args aren't derived from MouseEventArgs so there is no MousePosition/MouseButton (I think this should be changed)
private
void
radTreeView1_MouseDown(
object
sender, MouseEventArgs e)
{
if
(e.Button == System.Windows.Forms.MouseButtons.Right)
{
TreeNodeElement el = radTreeView1.ElementTree.GetElementAtPoint(e.Location)
as
TreeNodeElement;
...
}
}
So I need to distinguish between a direkt right click on a node and a right click on the treeview (the white part)
I am getting different XY coordinates on the CompleteDragging event than what the actual shape XY coordinates are (see image file). Any clue how to get the correct XY coordinates? It seems like I am getting the XY of the center of the shape. Below is the code I am using:
private
void
DragService_CompleteDragging(
object
sender, PositionChangedEventArgs e)
{
label13.Text = $
"{e.NewPosition.X},{e.NewPosition.Y}"
;
foreach
(var shape
in
radDiagram1.Shapes)
{
var myShape = shape
as
RadDiagramShape;
if
(myShape.Text == _asset.AssetTag)
{
label14.Text = $
"{myShape.X},{myShape.Y}"
;
break
;
}
}
}
I am trying to find the best way to add a secondary Y axis for a line series. An example of this would be a Fahrenheit secondary Y axis for a Celsius primary Y axis. The best way I have figured out so far is to create a dummy series that is not visible and that shares the same X axis and color as the primary axis. The minimum and maximum values are then set based on the ActualRange of the primary axis. This is not ideal because the secondary axis ticks aren't being generated on round numbers.
Is there a better way to do this?
Is there an event that I can use to update the secondary Y axis minimum and maximum when the ActualRange of the primary axis changes?
// Create data table with test data
DataTable dataTable =
new
DataTable();
dataTable.Columns.Add(
new
DataColumn(
"Date"
,
typeof
(DateTime) ));
dataTable.Columns.Add(
new
DataColumn(
"Temp"
,
typeof
(
float
) ));
dataTable.Rows.Add(
new
DateTime(2016, 2, 1), 245.0f);
dataTable.Rows.Add(
new
DateTime(2016, 3, 1), 248.0f);
dataTable.Rows.Add(
new
DateTime(2016, 4, 1), 238.0f);
// Create line series for test data
LineSeries lineSeries1 =
new
LineSeries();
lineSeries1.Name =
"Temperature"
;
lineSeries1.Spline =
false
;
lineSeries1.ValueMember =
"Temp"
;
lineSeries1.CategoryMember =
"Date"
;
lineSeries1.DataSource = dataTable;
// dummy line series for secondary axis
LineSeries dummyLineSeries =
new
LineSeries();
dummyLineSeries.Name =
"Dummy Temperature"
;
dummyLineSeries.Spline =
false
;
dummyLineSeries.IsVisible =
false
;
dummyLineSeries.BorderColor = lineSeries1.BorderColor;
// X Axis definition
DateTimeCategoricalAxis DTcategoricalAxis1 =
new
DateTimeCategoricalAxis();
DTcategoricalAxis1.PlotMode = AxisPlotMode.OnTicks;
DTcategoricalAxis1.LabelFormat =
"{0:MMMyy}"
;
DTcategoricalAxis1.Title =
"Month-Year"
;
DTcategoricalAxis1.AxisType = Telerik.Charting.AxisType.First;
// Primary Y Axis definition
LinearAxis linearAxis1 =
new
LinearAxis();
linearAxis1.Title =
"Temperature (°C)"
;
linearAxis1.AxisType = Telerik.Charting.AxisType.Second;
// Secondary Y Axis definition
LinearAxis linearAxis2 =
new
LinearAxis();
linearAxis2.Title =
"Temperature (°F)"
;
linearAxis2.AxisType = Telerik.Charting.AxisType.Second;
linearAxis2.HorizontalLocation = AxisHorizontalLocation.Right;
// Add Axes to the line series
lineSeries1.HorizontalAxis = DTcategoricalAxis1;
lineSeries1.VerticalAxis = linearAxis1;
dummyLineSeries.HorizontalAxis = DTcategoricalAxis1;
dummyLineSeries.VerticalAxis = linearAxis2;
// Add line series to chart
radChartView1.Series.AddRange( lineSeries1, dummyLineSeries);
// Force secondary axis range to match adjusted
linearAxis2.Minimum = linearAxis1.ActualRange.Minimum * 1.8 + 32.0;
linearAxis2.Maximum = linearAxis1.ActualRange.Maximum * 1.8 + 32.0;
I have a need of hiding the richtexteditor, populating it, and then doing a PrintPreview. I have discovered that if the control's "Visible" property is false, it does not work. The document is empty. It also does not work if you dynamically create the control at run-time. Thoughts? Obviously, I can add a control to the form and hide it behind another control, but that's a hack.
Dim
foo
As
New
RadRichTextEditor
Dim
provider
As
New
HtmlFormatProvider()
foo.Document = provider.Import(
"<html><body>All Notes for Project Foo<br/><br/></body></html>"
)
foo.PrintPreview()
Hi,
I've written a Custom Editor with a TextBox and two buttons (I simply made few changes at the code of your CustomEditor Demo), it seem to work fine except for the fact that if I set the Multiline propery of the TextBoxItem to true I cannot change the text anymore (I looks like it became ReadOnly), so I suppose it isn't so simple.
How can I write a custom editor that accept multiline text ?
Hi
I want a Not selectable ListViewElement
by not selectable , I mean you can not select it's items
I have it as custom item in a parent listview
Right to Left All Items radRibbonbar Form (Normal Form):
Hi
I have a form with a grid that contains just a combobox and I'm wondering what is the proper way to have that value stick, by stick I mean causing the CellValueChangedEvent, when I select a value in the list and then move to another control.
The relevent events that get fired are:
ValueChanging
ValueChanged
and then the next event is
Leave
I've played around with calling EndEdit, however I don't believe I'm calling it at the right point.
In the _Leave event I get the new row as
var newRow = lstData.CurrentRow as GridViewNewRowInfo, however the Cells["ComboColumn"].Value is null and this is becuase CellValueChanged hasn't fired yet.
-Michael