Telerik Forums
UI for WPF Forum
2 answers
153 views

Hello,

it is possible integrate the RadChartVIew with RadGridVIew?

Something like this (but using RadChartVIew instead of RadChart): 

http://docs.telerik.com/devtools/wpf/controls/radchart/how-to/integration-with-rad-grid-view

 

My objective is to reload the Chart every time when the RadgridView is filtered. There are someexamples about this topic?

 

Thank you!

Regards

Leo

Carlo
Top achievements
Rank 1
 answered on 17 Jan 2017
3 answers
142 views

Hi, I am successfully able to display the custom merge field(inserts a table into the document) into my RadDocument. The problem I come across is that when I try to save or mail merge I am presented with an error

at Telerik.Windows.Documents.Layout.LayoutBox.InvalidateMeasure()
at Telerik.Windows.Documents.Layout.LayoutBox.InvalidateMeasureUpToTheRoot()
at Telerik.Windows.Documents.Layout.LayoutBox.OnAssociateDocumentElementChangedCore()
at Telerik.Windows.Documents.Layout.LayoutBox.set_AssociatedDocumentElement(DocumentElement value)

Am I doing anything wrong while creating a MergeField? Is the xamlserializer causing the error?

public class CustomMergeField : MergeField
{
    private const string CustomFieldName = "CustomField";
 
    static CustomMergeField()
    {
        CodeBasedFieldFactory.RegisterFieldType(CustomMergeField.CustomFieldName, () => { return new CustomMergeField(); });
    }
 
    public override string FieldTypeName
    {
        get
        {
            return CustomMergeField.CustomFieldName;
        }
    }
 
    public override Field CreateInstance()
    {
        return new CustomMergeField();
    }
     
    protected override DocumentFragment GetResultFragment()
    {
        UniversalDTO universalDTO = this.Document.MailMergeDataSource.CurrentItem as UniversalDTO;
        if (universalDTO == null)
        {
            return null;
        }
 
        if (this.PropertyPath == "Collaterals")
        {
            Table table = new Table();
 
            foreach (var coillateral in universalDTO.Collaterals)
            {
                Span span = new Span(coillateral.Type.Value);
                span.FontSize = 11.5;
                Paragraph paragraph = new Paragraph();
                paragraph.Inlines.Add(span);
 
                Span span2 = new Span(coillateral.Description);
                span2.FontSize = 11.5;
                Paragraph paragraph2 = new Paragraph();
                paragraph2.Inlines.Add(span2);
 
                TableCell cell = new TableCell();
                cell.Blocks.Add(paragraph);
                cell.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent));
 
                TableCell cell2 = new TableCell();
                cell2.Blocks.Add(paragraph2);
                cell2.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent));
 
                TableRow row = new TableRow();
                row.Cells.Add(cell);
                row.Cells.Add(cell2);
                table.AddRow(row);
            }
 
            Section section = new Section();
            section.Blocks.Add(table);
 
            RadDocument document = new RadDocument();
            document.Sections.Add(section);
 
            document.MeasureAndArrangeInDefaultSize();
            return new DocumentFragment(document);
        }
 
        return null;
    }
}
Tanya
Telerik team
 answered on 17 Jan 2017
3 answers
556 views

I have a Floating Radpane (2.gif) and I want this to fit the content inside. Is it possible to make it behave like the 1.gif grid?

What I want is for the width and height to be dynamic depending on the content.

The RadPane structure is as follows:

<telerik:RadDocking x:Name="RadDockingFloating">
    <telerik:RadSplitContainer x:Name="RadSplitContainer" Visibility="Collapsed" telerik:RadDocking.FloatingLocation="500,50"  InitialPosition="FloatingOnly">
        <telerik:RadPaneGroup >
            <telerik:RadPane IsHidden="True" ContextMenuTemplate="{x:Null}" TitleTemplate="{StaticResource TitleTemplate}"  x:Name="TooltipHeader" CanUserPin="False">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="90" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0">
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="OhlcChartTextBlock" />
                    </StackPanel>
                    <Border Grid.Row="1" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel >
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="VolumeChartTextBlock" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="TooltipFloatBorder" Grid.Row="2" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel x:Name="TooltipFloat">
 
                        </StackPanel>
                    </Border>
                    <Border Grid.Row="3" Margin="0, 3, 0, 0" BorderBrush="Black" VerticalAlignment="Top" BorderThickness="0 1 0 0">
                        <StackPanel>
                            <TextBlock TextWrapping="Wrap" Margin="5,3,0,0" x:Name="Order"/>
                        </StackPanel>
                    </Border>
                </Grid>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

Thank you
Gerard.

Stefan Nenchev
Telerik team
 answered on 17 Jan 2017
5 answers
256 views

Hi,

I've written a custom provider (using a custom TileMapSource). I'm using EPSG900913Projection but the tile source I'm using does not have data for the entire world. The first problem I have is that when I first render the map it's using GeoBounds for the entire world. The problem is that I don't statically know the extent of the data source until I load the map, so I can't set the GeoBounds for RadMap and my custom provider in xaml. I've tried hooking event handlers for my user control "Loaded" event, also in RadMap.InitializeCompleted where I've tried to set the GeoBounds for both the RadMap and the custom provider but still the first time the map renders it covers the whole world.

I'd also like to limit the zoom range the user can use i.e. I'd like to stop the user zooming out more than one zoom level from the initial data extent. Again, because the data extent is not statically known I can't set the min and max zoom to fixed values. Is there some way to calculate the zoom level corresponding to the available data extent?

I have wired up a refresh button that when clicked calls RadMap.SetView passing a locationRect that I've constructed from the data available, and that correctly sets the view (and zoom level) for the map.

Can you suggest where I might be going wrong?

Thanks,

Pete

 

Petar Mladenov
Telerik team
 answered on 17 Jan 2017
1 answer
131 views

Hi guys!
I found a problem regarding text size change and following text selection.

These are the minimal steps to replicate the bug:
* Start WPF demo and select RichTextBox demo
* Select first paragraph under "Overview": from "RadRichTextBox is a control" to "bookmarks and comments."
* From the upper toolbar, change font size to 20
* Scroll down to the second paragraph ("The control can preview... tweaking of images."), you will be only able to select words from the first and fourth line but NOT from the second or the third.

The problem disappears immediately after using another format command or if you change the paragraph text. It seems to me that font size change doesn't invoke a document measure/rearrange.

Thanks for your assistance.
Fabrizio Piazza

Tanya
Telerik team
 answered on 17 Jan 2017
1 answer
262 views

Hi

 

I am trying to create my own custom column based on GridViewBoundColumnBase to use with RadGridView.

When using a column like GridViewDataColumn intellisense knows that the Binding in DataMemberBinding uses the context of an item specified in its parents RadGridView's ItemsSource. This gives me the proper suggestions from intellisense to bind to.

With my custom column I am unable to replicate this behavior. I only inherit the datacontext from the parent RadGridView. How can I get around this?

(PS: I need to create a custom column, I do not want to set the DataTemplate of GridViewColumn specifically for every table)

Jan Terje
Top achievements
Rank 1
 answered on 17 Jan 2017
1 answer
270 views
I'd like to load an .xslx file for viewing only. In other words I want to stop the user from adding or changing anything. Is there any way I can set read only?
Dinko | Tech Support Engineer
Telerik team
 answered on 17 Jan 2017
3 answers
392 views

There is a small probability issue:

when in a child thread  call the RadWindow.Alert method  to show a message window 

i use Application.Current.Dispatcher.BeginInvoke to call main thread

 Application.Current.Dispatcher.BeginInvoke((Action)delegate
                {
                    RadWindow.Alert(new DialogParameters { Header = StringResources.GetCodeMessage("TiShi"), Content = "error", Owner = Application.Current.MainWindow });
                });

then there is a NullReferenceException  occur

the exception stack is as following

在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item)
   在 System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   在 System.Linq.Enumerable.Max(IEnumerable`1 source)
   在 System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next)
   在 System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   在 Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize)
   在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   在 System.Windows.UIElement.Measure(Size availableSize)
   在 System.Windows.ContextLayoutManager.UpdateLayout()
   在 System.Windows.UIElement.UpdateLayout()
   在 System.Windows.Interop.HwndSource.SetLayoutSize()
   在 System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   在 System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   在 System.Windows.Window.SetRootVisual()
   在 System.Windows.Window.SetRootVisualAndUpdateSTC()
   在 System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   在 System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   在 System.Windows.Window.CreateSourceWindowDuringShow()
   在 System.Windows.Window.SafeCreateWindowDuringShow()
   在 System.Windows.Window.ShowHelper(Object booleanBox)
   在 System.Windows.Window.Show()
   在 System.Windows.Window.ShowDialog()
   在 Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
   在 Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   在 Telerik.Windows.Controls.RadWindow.ShowDialog()
   在 Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
   在 Telerik.Windows.Controls.RadWindow.Alert(DialogParameters dialogParameters)
   在 Eurlanda.DataShire.DataShireIDE.MainUserControl.<MainUserControl_Loaded>b__13() 位置 g:\datashire_cloud_IDE\Eurlanda.DataShire.DataShireIDE\MainUserControl.xaml.cs:行号 528
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have no idea about this  issue  

Is any solution to avoid?

 

Polya
Telerik team
 answered on 17 Jan 2017
3 answers
98 views

Is it possible to change the way the RadDatePicker behaves when I write numbers ? 

For example I want to write 0101 and Press Enter, the Date should be 01.01.2017 (if the year is not given the current year should be taken). Instead I get 03.01.0101.  Is it possible to reprogram this behavior ?

Devid
Top achievements
Rank 1
 answered on 17 Jan 2017
3 answers
221 views
I am not able to launch the WPF Demos, in my system, i have the SQL'14 express version. but when i start to install the WPF they said to install SQL'08 Express so that i cant install it. they are showing the  below error

component SQL Server 2008 express has failed to install with the following error message" An error occurred attempting to install SQL server 2008 express service pack.1"
The Following COmponenets failed to install
-SQL server 2008 Express/
Kalin
Telerik team
 answered on 17 Jan 2017
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?