The ChartView ToolTip should look like the on in the attached gif.
I figured out that I have to change the TooltipTemplate.
But how can I get the LineSeries X values and Y Values ? In my Source code instead of X and Y I should see in the ToolTip the X value (example: January) and Y Value (example: 2,00). Any ideas ?
Here is my unfinished Source Code:
private
LineSeries CreateLineSeries(KeyValuePair<ChartSerie, List<ChartDataPoint>> chartSeries, ChartLegendSettings legendSettings,
int
colorPaletteIndex)
{
// TODO: tooltip work in progress, show Format in Tooltips
FrameworkElementFactory tooltipFramework =
new
FrameworkElementFactory(
typeof
(Border));
tooltipFramework.SetValue(Border.BackgroundProperty,
new
SolidColorBrush(Colors.DimGray));
tooltipFramework.SetValue(Border.PaddingProperty,
new
Thickness(5));
FrameworkElementFactory tooltipStackpanelOne =
new
FrameworkElementFactory(
typeof
(StackPanel)) { Name =
"tooltipStackpanelOne"
};
tooltipStackpanelOne.SetValue(StackPanel.OrientationProperty, Orientation.Vertical);
tooltipFramework.AppendChild(tooltipStackpanelOne);
FrameworkElementFactory textBlockOne =
new
FrameworkElementFactory(
typeof
(TextBlock));
textBlockOne.SetValue(TextBlock.TextProperty,
"X"
);
textBlockOne.SetValue(TextBlock.ForegroundProperty,
new
SolidColorBrush(Colors.White));
textBlockOne.SetValue(TextBlock.FontWeightProperty, FontWeights.DemiBold);
FrameworkElementFactory textBlockTwo =
new
FrameworkElementFactory(
typeof
(TextBlock));
textBlockTwo.SetValue(TextBlock.TextProperty,
"Y"
);
textBlockTwo.SetValue(TextBlock.ForegroundProperty,
new
SolidColorBrush(Colors.White));
textBlockTwo.SetValue(TextBlock.FontWeightProperty, FontWeights.DemiBold);
tooltipStackpanelOne.AppendChild(textBlockOne);
tooltipStackpanelOne.AppendChild(textBlockTwo);
var lineSerie =
new
LineSeries()
{
VerticalAxis = CreateMultipleVerticalAxis(chartSeries, colorPaletteIndex,
out
var multipleVerticalAxis) ? multipleVerticalAxis :
null
,
ZIndex = 150,
// the line series should always be displayed on top of other series.
StrokeThickness = 3.5,
LegendSettings = (SeriesLegendSettings)legendSettings,
Opacity = 0.8,
//SeriesAnimation = new ChartRevealAnimation()
//{
// AnimationDirection = AnimationDirection.In,
// Orientation = Orientation.Horizontal,
// Duration = new TimeSpan(0, 0, 0, 1, 500),
// Delay = new TimeSpan(0, 0, 0, 0, 555),
//},
//PointAnimation = new ChartMoveAnimation()
//{
// MoveAnimationType = MoveAnimationType.Left,
// Duration = new TimeSpan(0, 0, 0, 0, 400),
// Delay = new TimeSpan(0, 0, 0, 0, 155),
//},
StackGroupKey = chartSeries.Key.Group,
CombineMode =
string
.IsNullOrEmpty(chartSeries.Key.Group) ? ChartSeriesCombineMode.None : ChartSeriesCombineMode.Stack,
PointTemplate =
new
DataTemplate()
{
VisualTree = AddPointsToSeries(chartSeries, colorPaletteIndex),
},
LabelDefinitions =
{
// set the clarion format for the labels
new
ChartSeriesLabelDefinition()
{
Template =
new
DataTemplate()
{
VisualTree = GetSeriesFormat(chartSeries),
}
}
},
TooltipTemplate =
new
DataTemplate()
{
VisualTree = tooltipFramework,
}
};
//// this is the old way of adding point to the LineSeries
//string pointTemplateString =
// @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">" +
// @"<Ellipse Fill=""Black"" Width=""5"" Height=""5"" /></DataTemplate>";
//lineSerie.PointTemplate = (DataTemplate)XamlReader.Parse(pointTemplateString);
// this is the color of line series
if
(chartSeries.Key.ColorHex !=
null
)
{
lineSerie.Stroke = (SolidColorBrush)(
new
BrushConverter().ConvertFrom(chartSeries.Key.ColorHex));
}
foreach
(ChartDataPoint serie
in
chartSeries.Value)
{
lineSerie.DataPoints.Add(
new
CategoricalDataPoint()
{
Category = serie.XPoint.Label,
Value = (
double
?)serie.Value,
});
}
return
lineSerie;
}
Hi,
Looks like, using the VirtualQueryableCollectionView, it is possible to lazy load the data if it is flat, but it is not possible if the data is displayed hierarchically. That is, using VirtualQueryableCollectionView, if GroupBy is done for single\multiple columns, the grouping is done only of the initial few records, obviously, as only few records are loaded initially by the VirtualQueryableCollectionView.
If there are multiple groupings then there is a hierarchy, and one can drill down subgroups step by step. I wanted to know if there is a way with GridView to lazily load the subgroup items.
Any suggestions will be helpful.
thanks
what i need to do is :
In the xaml file, there is an MergeField with PropertyPath isYes,if isYes == 'Y',I want to replace the MergeField with a checked box like symbol ☑
How to do this?
Hello,
we discovered an issue when having a TileList-Control inside a TileView. The reorder doesn't work, the items just disappear...
Please look at the following example code:
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<!-- reorder works like a charm -->
<
telerik:RadTileList
Grid.Column
=
"0"
>
<
telerik:Tile
TileType
=
"Single"
Background
=
"#FF00A100"
Content
=
"A"
/>
<
telerik:Tile
TileType
=
"Double"
Background
=
"#FFA10000"
Content
=
"B"
/>
<
telerik:Tile
TileType
=
"Single"
Background
=
"#FF0000A1"
Content
=
"C"
/>
</
telerik:RadTileList
>
<!-- reorder doesn't work -->
<
telerik:RadTileView
Grid.Column
=
"1"
>
<
telerik:RadTileList
>
<
telerik:Tile
TileType
=
"Single"
Background
=
"#FF00A100"
Content
=
"A"
/>
<
telerik:Tile
TileType
=
"Double"
Background
=
"#FFA10000"
Content
=
"B"
/>
<
telerik:Tile
TileType
=
"Single"
Background
=
"#FF0000A1"
Content
=
"C"
/>
</
telerik:RadTileList
>
</
telerik:RadTileView
>
</
Grid
>
I just upgraded to the latest release of UI for WPF (2018.3.blah blah). So far everything has been working fine. But today I invoked a bit of my code that uses RadOpenFolderDialog. The code is pretty simple:
var dlg = new RadOpenFolderDialog
{
InitialDirectory = Settings.LibraryFolder,
Multiselect = false,
};
(I have verified the "Settings.LibraryFolder" points to a valid, existing folder at the time this function is called)
It then throws an exception. The outer exception message is this:
"Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception."
The inner exception message is this:
"Cannot find resource named 'BreadCrumbBarItemCustomStyle'. Resource names are case sensitive"
I do not now, nor have I ever had a resource of that name so I have to assume this is something inside the Telerik release that was inadvertently removed. Can you help me?
I don't know if it is relevant but early on in my app I use the StyleManager to set an application theme
StyleManager.ApplicationTheme = new Windows8TouchTheme();
Also I am *NOT* using the "NoXaml" approach
Help...?
(This is a duplicate of a thread I accidentally started in the wrong subforum here: https://www.telerik.com/forums/latest-ui-for-wpf-release-throws-exception-when-using-radopenfolderdialog)
I just upgraded to the latest release of UI for WPF (2018.3.blah blah). So far everything has been working fine. But today I invoked a bit of my code that uses RadOpenFolderDialog. The code is pretty simple:
var dlg = new RadOpenFolderDialog
{
InitialDirectory = Settings.LibraryFolder,
Multiselect = false,
};
var res = dlg.ShowDialog();
(I have verified the "Settings.LibraryFolder" points to a valid, existing folder at the time this function is called)
It then throws an exception. The outer exception message is this:
"Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception."
The inner exception message is this:
"Cannot find resource named 'BreadCrumbBarItemCustomStyle'. Resource names are case sensitive"
I do not now, nor have I ever had a resource of that name so I have to assume this is something inside the Telerik release that was inadvertently removed. Can you help me?
I don't know if it is relevant but early on in my app I use the StyleManager to set an application theme
StyleManager.ApplicationTheme = new Windows8TouchTheme();
Also I am *NOT* using the "NoXaml" approach
Help...?
I have combined RadAutoCompleteBox with Combobox with multiple selection mode. When I select item from drop down of combobox the item gets added in the autocomplete box and the remaining portion of autocomplete box will be used for searching. But in this case I am not able to select the added items.
See attached screenshot, here the 2 items which are already added named TestPalga2 and TestPalga3 cant be selected. I want these items to select and remove on delete button press of keyboard.