Telerik Forums
UI for WPF Forum
1 answer
316 views
When right clicking on a table inside the RichTextBox, a context menu appears. How can I remove/disable from this context menu the following options:
merge cells, table boders, autofit, table properties.

Thanks!
Tanya
Telerik team
 answered on 02 Mar 2015
7 answers
299 views
Hi,

I have a RadGridView containing a GridViewColumn which contains four 'action' buttons.

<telerik:GridViewColumn Header="{x:Static commonResources:CommonResources.ActionColumn}" >
    <telerik:GridViewColumn.CellTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <bc:RadGridViewActionButton NormalImage="../Images/dgy_040_edit_normal.png"
                                            MouseOverImage="../Images/bk_040_edit_normal.png"
                                            Visibility="{Binding Path=DataContext.IsModifySupported, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}, Converter={StaticResource BooleanToVisibilityConverter}}"
                                            ToolTip="{Binding Path=DataContext.ModifyCommandToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"
                                            Command="{Binding Path=DataContext.ModifyCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}" />
                <bc:RadGridViewActionButton NormalImage="../Images/dgy_200_details_normal.png"
                                            MouseOverImage="../Images/bk_200_details_normal.png"
                                            Visibility="{Binding Path=DataContext.IsViewSupported, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}, Converter={StaticResource BooleanToVisibilityConverter}}"
                                            ToolTip="{Binding Path=DataContext.DetailsCommandToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"
                                            Command="{Binding Path=DataContext.DetailsCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}" />
                <bc:RadGridViewActionButton NormalImage="../Images/dgy_030_delete_normal.png"
                                            MouseOverImage="../Images/bk_030_delete_normal.png"
                                            Visibility="{Binding Path=DataContext.IsDeleteSupported, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}, Converter={StaticResource BooleanToVisibilityConverter}}"
                                            ToolTip="{Binding Path=DataContext.DeleteCommandToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"
                                            Command="{Binding Path=DataContext.DeleteCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}" />
                <bc:RadGridViewActionButton NormalImage="../Images/dgy_028_copy_normal.png"
                                            MouseOverImage="../Images/bk_028_copy_normal.png"
                                            Visibility="{Binding Path=DataContext.IsCopySupported, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}, Converter={StaticResource BooleanToVisibilityConverter}}"
                                            ToolTip="{Binding Path=DataContext.CopyCommandToolTip, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"
                                            Command="{Binding Path=DataContext.CopyCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}" />
            </StackPanel>
        </DataTemplate>
    </telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
In the view model I set the visibility of the 'action' buttons.

This works well in the sense that the buttons are displayed or hidden in the grid.

But the 'Action' column with always takes into account the total width of all four buttons even when some of them are not displayed.

How can I get the GridViewColumn to only take up as much space as the actual displayed buttons?

Thanks,
Peter


Dimitrina
Telerik team
 answered on 02 Mar 2015
4 answers
165 views
test
Robert
Top achievements
Rank 1
 answered on 02 Mar 2015
1 answer
1.2K+ views
Hi,

My question is very very very simple ..... and though I'm struggling achieving this.
All I want, is a menu item being an image (via the ICON property) and on MouseOver event, change that picture with another one...... It's that easy but can't make it happen. Why the hell is this so complex ?

Anyone to help ?

01.<telerik:RadMenu Grid.Row="2" Grid.Column="1" Width="40" HorizontalAlignment="Right" Background="Transparent" ClickToOpen="True">
02.    <telerik:RadMenuItem Header="" Width="40" Height="40" ToolTip="Settings">
03.        <telerik:RadMenuItem.Icon>
04.            <Image x:Name="btnSetting" Source="Resources/setting.png" Stretch="UniformToFill">
05.            </Image>
06.        </telerik:RadMenuItem.Icon>
07.        <Trigger Property="IsMouseOver" Value="true">
08.            <Setter TargetName="btnSetting" Property="Source" Value="Resources/setting-hover.png"></Setter>
09.        </Trigger>
10.    </telerik:RadMenuItem>
11.</telerik:RadMenu>

On compile, I get an error msg saying IsMouseOver is not a valid Event and if I change this into "Property="Mouse.MouseOver" then it says not recognized or not accessible ??????

Cheers,

Chris
Masha
Telerik team
 answered on 02 Mar 2015
1 answer
42 views
Hi,

Viewing the screen cap you can see the issue I am having with the labels overrunning one another. Is there a way to have the label expand to amount of chart items?

Thanks,

Tony
Martin Ivanov
Telerik team
 answered on 02 Mar 2015
2 answers
314 views
I'm using the RadChart and right now am unable to migrate to the RadChartView.

Viewing the attached screen capture, what is my best option for sorting this out?

Thanks,

Tony
Martin Ivanov
Telerik team
 answered on 02 Mar 2015
2 answers
649 views
Hi I have a RadGridView. The ItemSource is a DataView based on a DataTable. The GridView Property AutoGenerateColumns = "False".

XAML:
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn x:Name="VisitNumber" DataMemberBinding="{Binding VisitNumber}" Header="Fallnummer" Width="120"/>
<telerik:GridViewDataColumn x:Name="LastName" DataMemberBinding="{Binding LastName}" Header="Nachname" Width="200"/>
<telerik:GridViewDataColumn x:Name="FirstName" DataMemberBinding="{Binding FirstName}" Header="Vorname" Width="150"/>
</telerik:RadGridView.Columns>

How can I retrieve the values of the selected row using C # code?
Maya
Telerik team
 answered on 02 Mar 2015
1 answer
132 views
Hello all,
I have the following problem when using the mail merge:
If I do not have watermark in the document, MailMerge and Export to PDF performs correctly.
Here is how I do the MailMerge (not full code):

//loop throught documents
do
{
    RadDocument currentDocument = document.MailMergeCurrentRecord();
    if (currentDocument != null)
    {
        //freeze images
        foreach (var image in currentDocument.EnumerateChildrenOfType<ImageInline>())
            image.ImageSource.Freeze();
 
        //Floating images
        foreach (var image in currentDocument.EnumerateChildrenOfType<FloatingImageBlock>())
            image.ImageInline.ImageSource.Freeze();
 
        lock (baton)
            documentQueue.Enqueue(currentDocument);//add new document to a queue for further processing
        currentDocument = null;
    }
 
} while (document.MailMergeDataSource.MoveToNext());


and here is how I export to PDF (into a stream):
public static async Task<Stream> ExportToPDF(RadDocument document)
{
    PdfFormatProvider provider = new PdfFormatProvider();
    Stream output = new MemoryStream();
 
    await StartSTATask(() =>
    {
        provider.Export(document, output);
    });
    output.Position = 0;
    return output;
}


As I have mentioned, the problem occurs when I have a Watermark in my document. Even though Mail Merge performs correctly, the document crashes on the 
provider.Export(document, output) saying that the current thread cannot access object as different thread owns it.

Here is full error report:

at System.Windows.Threading.DispatcherObject.VerifyAccess()
   at System.Windows.Media.Imaging.BitmapSource.get_PixelWidth()
   at System.Windows.Media.Imaging.WriteableBitmap.InitFromBitmapSource(BitmapSource source)
   at Telerik.Windows.Media.Imaging.RadBitmap..ctor(BitmapSource image)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.SetImageAlpha(WatermarkImageSettings imageSettings, Byte alpha)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.DrawWatermark(Header header, SectionLayoutBox sectionBox, PdfContentsWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.ExportHeadersAndFooters(SectionLayoutBox sectionBox, PdfContentsWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.ExportPage(SectionLayoutBox sectionBox, PdfContentsWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.<>c__DisplayClass1.<Export>b__0(PdfContentsWriter contentsWriter)
   at Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfContents.WriteContents(PdfWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfStream.WriteToCore(PdfWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfObject.WriteTo(PdfWriter writer)
   at Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfWriter.WritePdfObject(PdfObject obj)
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.Export()
   at Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider.Export(RadDocument document, Stream output)
   at IP_DocumentProcessor.MailMerge.IP_MailMerge.<>c__DisplayClass14.<ExportToPDF>b__13() in d:\VB Projects + Silverlight\VS2012APP\IP_DocumentProcessor\IP_DocumentProcessor\MailMerge\IP_MailMerge.cs:line 476
   at IP_DocumentProcessor.MailMerge.IP_MailMerge.<>c__DisplayClass1a.<StartSTATask>b__19() in d:\VB Projects + Silverlight\VS2012APP\IP_DocumentProcessor\IP_DocumentProcessor\MailMerge\IP_MailMerge.cs:line 500
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IP_DocumentProcessor.MailMerge.IP_MailMerge.<StartSTATask>d__1c.MoveNext() in d:\VB Projects + Silverlight\VS2012APP\IP_DocumentProcessor\IP_DocumentProcessor\MailMerge\IP_MailMerge.cs:line 510
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IP_DocumentProcessor.MailMerge.IP_MailMerge.<ExportToPDF>d__16.MoveNext() in d:\VB Projects + Silverlight\VS2012APP\IP_DocumentProcessor\IP_DocumentProcessor\MailMerge\IP_MailMerge.cs:line 474
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IP_DocumentProcessor.MailMerge.IP_MailMerge.<GenerateStreams>d__7.MoveNext() in d:\VB Projects + Silverlight\VS2012APP\IP_DocumentProcessor\IP_DocumentProcessor\MailMerge\IP_MailMerge.cs:line 282
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__1(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()


Your help would be highly appreciated as I don't know how to handle this problem.
Thank you.
Robert
Boby
Telerik team
 answered on 27 Feb 2015
1 answer
131 views
Hi,

I would like to know how it's possible to dock center a SplitContainer?

Thank's
Alain
Nasko
Telerik team
 answered on 27 Feb 2015
8 answers
213 views
Hi,

I looking for a kind of tabular layout.
The idea behind it is that in my data I know Row and Column and I want my diagram to look
something like in the attached images.

And I also need Multiple root items like showed on the second image.

The next thing is that I want to restrict node dragging to the matrix - inclusive position change (like drag drop in a treeview control for an example). But this is "enhanced" - my initial request is to generate the layout from data - just by knowing
a.) Node Position Row, Column
b.) Node connected to List of other Nodes

Is this possible - "out of the box" (or with little effort)?

Thanks
Manfred
Petar Mladenov
Telerik team
 answered on 27 Feb 2015
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?