Hello Telerik,
I wanted to do something similar as this:
<telerik:RadWatermarkTextBox WatermarkContent="{Resx WatermarkTextBox_AddNew }" Visibility="{Binding IsNew, Converter={StaticResource VisibilityConverter}}"> <telerik:RadWatermarkTextBox.WatermarkTemplate> <DataTemplate> <!--TODO: Do your custom styling here. --> <TextBlock Style="{StaticResource TextBlockValueDefaultStyle}" Text="{Binding}" /> </DataTemplate> </telerik:RadWatermarkTextBox.WatermarkTemplate> </telerik:RadWatermarkTextBox>but for the TextBox part of the control
is there an easy way to do so?
Thank you
when using radwindow.alert, there is a small probability case to throw an System.ArgumentOutOfRangeException,
is any solution to avoid this ?

Hi,
I'm working with RadDocking on a multiple monitor set-up. Let's consider the following scenario:
1. I open my application.
2. I have my View containing RadDocking on a monitor.
3. I drag a RadPane to another monitor.
4. I save the layout using a XML file.
5. I close my application.
6. I disable/unplug the monitor on which I've dragged the RadPane.
7. I open my application, load the layout from that XML and the dragged RadPane doesn't show.
Code-wise at this point, even though that RadPane isn't showing, it still exists and has content.
I'm using RadDocking_PaneStateChange() to get that RadPane and I'm using this to determine if it was saved on that disabled monitor:
bool outOfBounds = (location.X <= SystemParameters.VirtualScreenLeft - screen.Bounds.Width) || (location.Y <= SystemParameters.VirtualScreenTop - screen.Bounds.Height) || (SystemParameters.VirtualScreenLeft + SystemParameters.VirtualScreenWidth <= location.X) || (SystemParameters.VirtualScreenTop + SystemParameters.VirtualScreenHeight <= location.Y);
Is there an inbuilt method that does this for me? If not, could you suggest a better approach, please? :)
Best regards,
Marius
Hello Telerik,
I am having an issue trying to find a way to add a tooltip to each bar in a barseries control.
I have browsed different solutions for it, but none seem to work.
long story short, here is my code
<telerik:RadCartesianChart Loaded="chart_Loaded" x:Name="chart" Palette="{StaticResource ActualTargetChartPalette}" ClipToBounds="False"> <telerik:RadCartesianChart.VerticalAxis> <telerik:CategoricalAxis IsInverse="True" MajorTickStyle="{StaticResource TransparentTickStyle}" LineStroke="Transparent" LabelStyle="{StaticResource TextBlockTrendStyle}" /> </telerik:RadCartesianChart.VerticalAxis> <telerik:RadCartesianChart.HorizontalAxis> <telerik:LinearAxis ShowLabels="False" ElementBrush="Transparent" /> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.Behaviors>My attempt ---><telerik:ChartTooltipBehavior /> </telerik:RadCartesianChart.Behaviors> <telerik:RadCartesianChart.Series> <telerik:BarSeries CategoryBinding="ItemTypeTranslated" ValueBinding="Actual" ItemsSource="{Binding ReportingSummaryOrderingTrendDTO.TrendItems}" CombineMode="None" ShowLabels="False" ClipToPlotArea="False" ToolTipOpening="BarSeries_ToolTipOpening" sdk:ChartAnimationUtilities.CartesianAnimation="Rise"> <telerik:BarSeries.TooltipTemplate> <ItemContainerTemplate>My attempt -----> <TextBlock Text="{Binding ItemToolTip}" ></TextBlock> </ItemContainerTemplate> </telerik:BarSeries.TooltipTemplate> <telerik:BarSeries.PointTemplate> <DataTemplate> <Rectangle Fill="{StaticResource ActualBrush}" Margin="0 0 0 3" /> </DataTemplate> </telerik:BarSeries.PointTemplate> <telerik:BarSeries.LegendSettings> <telerik:SeriesLegendSettings Title="{Resx ChartLegend_Actual}" MarkerGeometry="{StaticResource SolidRectLegendGeometry}" /> </telerik:BarSeries.LegendSettings> <telerik:BarSeries.LabelDefinitions> <telerik:ChartSeriesLabelDefinition Binding="Actual" Format="{}{0:F1}" DefaultVisualStyle="{StaticResource TextBlockTrendStyle}" Strategy="{StaticResource RightAlignedLabelStrategy}" /> </telerik:BarSeries.LabelDefinitions> </telerik:BarSeries> <telerik:BarSeries CategoryBinding="ItemTypeTranslated" ValueBinding="Target" ItemsSource="{Binding ReportingSummaryOrderingTrendDTO.TrendItems}" CombineMode="None" sdk:ChartAnimationUtilities.CartesianAnimation="Rise"> <telerik:BarSeries.PointTemplate> <DataTemplate> <Rectangle Fill="{StaticResource TargetBrush}" Height="2" VerticalAlignment="Bottom" /> </DataTemplate> </telerik:BarSeries.PointTemplate> <telerik:BarSeries.LegendSettings> <telerik:SeriesLegendSettings Title="{Resx ChartLegend_Target}" MarkerGeometry="{StaticResource LineSeriesLegendGeometry}" /> </telerik:BarSeries.LegendSettings> </telerik:BarSeries> </telerik:RadCartesianChart.Series> </telerik:RadCartesianChart> <telerik:RadLegend Grid.Column="1" Grid.Row="1" Margin="24,4,0,0" MinWidth="76" Items="{Binding LegendItems, ElementName=chart}" />
I have attached a picture showing where the tooltip should show
thank you for your time


I've had a standard ComboBox working with this code:
<ComboBox x:Name="comboWindow1" SelectedValue="{Binding Window1Page}" ItemsSource="{Binding listDashData, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="ddDashDescription" SelectedValuePath="ddDashName" SelectionChanged="comboWindow1_SelectionChanged"> <ComboBox.ItemContainerStyle> <Style TargetType="{x:Type ComboBoxItem}"> <Setter Property="IsEnabled" Value="{Binding ddDashEnabled}"/> </Style> </ComboBox.ItemContainerStyle></ComboBox>I switched over to the RadComboBox, thinking I could do almost exactly the same thing. However when I select the drop down, I get no items. If I remove the ContainerStyle then that works a treat.
I've looked at the various examples in the help, but nothing seems to work.
Both these code examples fail:
<UserControl.Resources> <Style x:Key="ComboIsEnabledStyle" TargetType="{x:Type tel:RadComboBoxItem}"> <Setter Property="IsEnabled" Value="{Binding ddDashEnabled}"/> </Style></UserControl.Resources><tel:RadComboBox x:Name="comboWindow2" SelectedValue="{Binding Window2Page}" ItemsSource="{Binding listDashData, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="ddDashDescription" SelectedValuePath="ddDashName" ItemContainerStyle="{StaticResource ComboIsEnabledStyle}" SelectionChanged="comboWindow2_SelectionChanged"> </tel:RadComboBox><tel:RadComboBox x:Name="comboWindow1" SelectedValue="{Binding Window1Page}" ItemsSource="{Binding listDashData, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="ddDashDescription" SelectedValuePath="ddDashName" SelectionChanged="comboWindow1_SelectionChanged"> <tel:RadComboBox.ItemContainerStyle> <Style TargetType="{x:Type tel:RadComboBoxItem}"> <Setter Property="IsEnabled" Value="{Binding ddDashEnabled}"/> </Style> </tel:RadComboBox.ItemContainerStyle></tel:RadComboBox>I amended one of the Telerik ComboBox examples to demonstrate as that does exactly the same thing. Can't attach, so it's available here: ComboBoxCustomFilteringDemo.zip
I'm really stumped as to what I've missed, as this should really be such a simple thing to do.
BTW I'm running the latest 2015.1.225 WPF version
We have an application in which we would like to support a custom clipboard format for copying\pasting in a RadRichTextBox. I have read your article on clipboard support (http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/features/clipboard-support), but that seems to mainly deal with changing which provided clipboard formats are used.
It appears that if I register a custom format provider with ClipboardEx, that would be able to handle pasting the custom format. For example:
ClipboardEx.ClipboardHandlers.Insert(0, new ClipboardHandler(){ ClipboardDataFormat = "MyCustomDataFormat", DocumentFormatProvider = new MyCustomFormatProvider()});
However, I don't see a way to handle copying a custom format without intercepting the CopyExecutingCommand and adding the custom format the the clipboard. For example:
void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e){ if (e.Command is CopyCommand) { Clipboard.SetData("MyCustomDataFormat", GetSelectionAsCustomDataFormatString()); }}However, I would want to make sure that the default clipboard formats are still added to the clipboard in addition to our custom format.
Can you provide any guidance on the best way to handle copying and pasting a custom clipboard format?
Thank you.

In addition to the class provided by the class, I ask if there are any classes or methods that can be applied to a class that has style gridview
ex) no applied style gridview export option source, I want to applied style gridview export option
public bool SaveDocument_GridViewUse(RadGridView gridViewList, ExcelExportTypeFDC selectedFormat)
{
try
{
string fileName;
string appFileName = "";
using (Stream stream = CreateFile(out fileName, selectedFormat))
{
gridViewList.Export(stream, new GridViewExportOptions() {
Format = ExportFormat.Csv,
ShowColumnHeaders = true,
});
}
if (selectedFormat == ExcelExportTypeFDC.Xlsx) appFileName = "excel.exe";
else if (selectedFormat == ExcelExportTypeFDC.Csv) appFileName = "excel.exe";
else if (selectedFormat == ExcelExportTypeFDC.Txt) appFileName = "notepad.exe";
ProcessStartInfo pInfo = new ProcessStartInfo(appFileName, fileName);
pInfo.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start(pInfo);
}
The following is the code snippet from my code. I have the command CheckTypeCommand defined in my Model. There are over 100,000 items in my collection and the number of columns is 50 odd. If I scroll up or down of this grid the command of this check box for every row that is render is getting executed. I want the command only to execute on UI trigger that is when I change the Check Type in the combobox. Can you please let me know what is I am missing here. If I disable Virtualization then the performance goes for a spin.
<telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding myList}" AutoGenerateColumns="False" Grid.Row="3" Grid.ColumnSpan="2" FontSize="11" SelectionMode="Single" SelectionUnit="Mixed" ClipboardCopyMode="Default" ActionOnLostFocus="CommitEdit" ScrollMode="RealTime" ElementExporting="radGridView_ElementExporting" SelectedItem="{Binding Data.GridSelectedRow, Source={StaticResource proxy} , Mode=TwoWay}" IsSynchronizedWithCurrentItem="False" ShowColumnSortIndexes="True" RowIndicatorVisibility="Collapsed" behaviours:ContextMenuBehavior.ContextMenu="{Binding ElementName=GridContextMenu}" FrozenColumnCount="3" > <telerik:RadContextMenu.ContextMenu> <telerik:RadContextMenu x:Name="GridContextMenu" ItemsSource="{Binding ContextMenu}" ItemContainerStyle="{StaticResource MenuItemContainer}" > </telerik:RadContextMenu> <telerik:GridViewDataColumn x:Name="checktypecombo" DataMemberBinding="{Binding CheckType, Mode=TwoWay}" UniqueName="CheckType" IsReadOnlyBinding="{Binding IsReadOnly}" IsReadOnly="True" SortMemberPath="CheckType" EditTriggers="CellClick" IsFilterable="False" IsGroupable="False" IsSortable="False" Width="75"> <telerik:GridViewDataColumn.Header> <TextBlock Text="Check Type" TextWrapping="Wrap" Style="{StaticResource TextBlockWhite}" /> </telerik:GridViewDataColumn.Header> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <telerik:RadComboBox Command="{Binding CheckTypeChanged}" SelectedValue="{Binding CheckType, Mode=OneWay}" SelectedValuePath="Tag" IsEditable="False"> <telerik:RadComboBoxItem Tag="C1" Content="Checktype1"/> <telerik:RadComboBoxItem Tag="C2" Content="C2"/> </telerik:RadComboBox> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView <telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding myList}" AutoGenerateColumns="False"
Grid.Row="3" Grid.ColumnSpan="2" FontSize="11" EnableColumnVirtualization="False"
SelectionMode="Single" SelectionUnit="Mixed"
ClipboardCopyMode="Default"
ActionOnLostFocus="CommitEdit" ScrollMode="RealTime" ElementExporting="radGridView_ElementExporting"
SelectedItem="{Binding Data.GridSelectedRow, Source={StaticResource proxy} , Mode=TwoWay}" IsSynchronizedWithCurrentItem="False"
ShowColumnSortIndexes="True" RowIndicatorVisibility="Collapsed" behaviours:ContextMenuBehavior.ContextMenu="{Binding ElementName=GridContextMenu}" FrozenColumnCount="3" >
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu x:Name="GridContextMenu" ItemsSource="{Binding ContextMenu}" ItemContainerStyle="{StaticResource MenuItemContainer}" >
</telerik:RadContextMenu>
<telerik:GridViewDataColumn x:Name="checktypecombo" DataMemberBinding="{Binding CheckType, Mode=TwoWay}"
UniqueName="CheckType" IsReadOnlyBinding="{Binding IsReadOnly}" IsReadOnly="True"
SortMemberPath="CheckType" EditTriggers="CellClick" IsFilterable="False" IsGroupable="False"
IsSortable="False" Width="75">
<telerik:GridViewDataColumn.Header>
<TextBlock Text="Check Type" TextWrapping="Wrap" Style="{StaticResource TextBlockWhite}" />
</telerik:GridViewDataColumn.Header>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadComboBox Command="{Binding CheckTypeChanged}"
SelectedValue="{Binding CheckType, Mode=OneWay}" SelectedValuePath="Tag"
IsEditable="False">
<telerik:RadComboBoxItem Tag="C1" Content="Checktype1"/>
<telerik:RadComboBoxItem Tag="C2" Content="C2"/>
</telerik:RadComboBox>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView