Telerik Forums
UI for WPF Forum
1 answer
161 views
Hi,
I have three questions regarding PivotGrid and ChartView:

1. Will the upcoming release have the capability to bind WPF ChartView to PivotGrid, similar to the WinForms version?
2. Is there a way to access the poperties in PivotGrid now and create a collection that can be used for binding with WPF ChartView?
3. Finally, if none of the above are implementable, can the WinForms PivotGridChartDataProvider object be used as a datasource for WPF ChartView?

Thanks,
Dave
Rosen Vladimirov
Telerik team
 answered on 10 Jan 2013
8 answers
810 views
I am trying to figure out how I can control the display of the X-Axis tick labels in the code-behind. 
I need to be able to create a graph like the sample attached (custom tick labels) where there are many data points for each label but I only want a label to appear aligned with the first of the data points belonging to that label.  Instead I am only able to get what you see in the "too many labels" attached image.

The labels may not be equal step distances apart as seen in the example going from Dec 14th to Dec 17th as data points are not collected on some days so using dates as my tick values doesn't work well.

I have used an XCategory item mapping to add the items for the x-axis. 
Then I added a event that is firing and the label points are being set to blank when I step through in debug. However the chart still displays the tick labels anyway when I view it.   

Am I making this change in the wrong event or am I changing the wrong property of the tick? What else can I do to make this work?

UPDATE: Just discovered that if I re-run my code to reload the chart the second run takes a relatively long time (over 60 secs to process) and then the tick labels do hide/show as desired. I'm not sure why the second run is so slow and why my labels won't hide the first time through.

ItemMapping itemMap = new ItemMapping("StockValue", DataPointMember.YValue);
seriesMapping.ItemMappings.Add(itemMap);
 
itemMap = new ItemMapping("XCat", DataPointMember.XCategory);
seriesMapping.ItemMappings.Add(itemMap);
 
 
radChart.DataBound += (o, e) =>
{
    TickPointCollection tickPoints = radChart.DefaultView.ChartArea.AxisX.TickPoints;
    if (tickPoints != null)
    {
        foreach (TickPoint point in tickPoints)
        {
            // don't show a label if it has been marked with an X to hide it
            if (point.Label.Contains("X"))
            {
                point.Label = " ";  // THIS IS HAPPENING IN DEBUG - so why do they show on the chart?
            }
            else
            {
                point.Label = point.Label;  // only a few qualify to get here and thus keep their labels
            }
        }
    }
};
Nikolay
Telerik team
 answered on 10 Jan 2013
0 answers
154 views
Hi,

I use RadRichTextBoxRibbonUI and RadRichTextBox to create an editor myself. I want to get font family (like "Arial") and font size currently active in RadRichTextBoxRibbonUI panel in the code behind. How to do it?

Thanks,
York
york
Top achievements
Rank 1
 asked on 10 Jan 2013
2 answers
170 views
When I save a file, and attempt to save it again later after making changes it keeps asking for the file name even though I've already defined it (like it thinks I'm using Save As, rather than Save). How can I solve this issue??
Avishek
Top achievements
Rank 1
 answered on 10 Jan 2013
0 answers
179 views
Hi,

I try to add an InlineUIElement for TextBlock to RadRichTextBox. The code is,
// Set font type and size in TextBlock
string fontName = "Verdana";
int fontSize = 12;
System.Windows.Media.FontFamily fontFamily = new System.Windows.Media.FontFamily(fontName);
TextBlock tagBlock = new TextBlock
{
    Background = new SolidColorBrush(Colors.LightGoldenrodYellow),
    FontFamily = fontFamily,
    FontSize = fontSize,
    Text = tagConent
};
 
// Get the size of TextBlock
tagBlock.Measure(new System.Windows.Size(Double.PositiveInfinity, Double.PositiveInfinity));
System.Windows.Size size = new System.Windows.Size(tagBlock.DesiredSize.Width, tagBlock.DesiredSize.Height);
 
// Create an InlineUIContainer containing the TextBlock
Telerik.Windows.Documents.Model.InlineUIContainer tagContainer = new Telerik.Windows.Documents.Model.InlineUIContainer(tagBlock, size);
 
// Insert the InlineUIContainer into the caret position
radRichTextBox1.InsertInline(tagContainer);

It works basically fine except text in TextBlock align top compared to text outside block (See attached picture). This is very similar to one in http://stackoverflow.com/questions/5225268/wpf-how-to-align-text-in-inlineuicontainer-content-with-outer-text-in-richtextb. But I can not find inlineuicontainer.BaselineAlignment as suggested in the post for Telerik.Windows.Documents.Model.InlineUIContainer. I need help on this.

Thanks,
York
york
Top achievements
Rank 1
 asked on 10 Jan 2013
4 answers
187 views

Hi,

I created RadMenu dynamically using HierarchicalDataTemplate using following code.

       <HierarchicalDataTemplate x:Key="MenuItemTemplate"
                                 ItemsSource="{Binding SubItems}">
            <TextBlock Text="{Binding Text}" />
        </HierarchicalDataTemplate>

        <telerik:RadMenu x:Name="radMenu" Height="22"
                          VerticalAlignment="Top"
                          Orientation="Horizontal"
                          ItemTemplate="{StaticResource MenuItemTemplate}" ItemClick="OnRadMenuItemClick" />
but in code behind of the OnRadMenuItemClick Event i am unable to find out name of the menu item that clicked.

		private void OnRadMenuItemClick(object sender, RadRoutedEventArgs e)
		{
			RadMenuItem item = e.OriginalSource as RadMenuItem;
 
			if (item != null)
			{
				switch (item.Name)
				{
		
				}
			}
		}

when i click on menu item .. item.Name allways comming as null.
can one please help me how to get the name of the menu item that clicked

but it is working for statically developed radmenu

Thanks
Rama


Rama
Top achievements
Rank 1
 answered on 10 Jan 2013
16 answers
461 views
I am building a WPF app where I work and I want to use the RadPanorama for the Start Screen or "Launching Pad" for the App.  I understand, and have seen the numerous threads, that there is no RadPanorama for WPF. 

However, is there any reason I cannot embed one in a WindowsFormsHost? 

Seems to work after a VERY quick little test but I am wondering if anyone has any feedback on doing it this way?  Somethings are very 'messy' to get at with out the Design Time support.  Is there a way around that? 

Additionally, doesn't seem to be a ton of documentation for manipulating a RadPanorama in Code Only, am I missing it?

P.S. I appologize if this is not the correct Forum.  With the whole WPF, RadPanoram, WindowsFormHost gammit I wasn't sure.
Terragile
Top achievements
Rank 1
 answered on 09 Jan 2013
1 answer
102 views
Hi
Is there is any event fired when the MaximizedItem changed?


Thanks
Akram
Pavel R. Pavlov
Telerik team
 answered on 09 Jan 2013
1 answer
230 views
Hi,

I need to display the rad panel bar with an expandable button, but not with an arrow. I want to have an button image instead of default arrow. I have attached the sample image of it.

Kindly help me in acheiving this.

Thanks,
Subash
Pavel R. Pavlov
Telerik team
 answered on 09 Jan 2013
8 answers
487 views
Hi, i have recently switched to 2012 Q3 and now the view  throws an Exception when loading the radgridview in the UI. Any ideas? 

Thanks in advance.

View : 

    <telerik:RadGridView x:Name="dg1"
     Grid.Row="1" Grid.ColumnSpan="2"
                                     ColumnWidth="*" UseLayoutRounding="False"
                                     ItemsSource="{Binding FilterView}"
                                     SelectionMode="Extended"
                                     SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                                     AutoGenerateColumns="False" Margin="5" ShowGroupPanel="False"
                                     RowIndicatorVisibility="Collapsed"
                                     CanUserDeleteRows="False"
                                     CanUserFreezeColumns="False"
                                     CanUserInsertRows="False"
                                     IsReadOnly="True"
                                     IsFilteringAllowed="False">

                    <i:Interaction.Behaviors>
                        <Behaviors:RadGridViewMultiSelectorBehavior
                            SelectedItems="{Binding SelectedItems, Mode=TwoWay}" />
                    </i:Interaction.Behaviors>

                    <telerik:RadGridView.InputBindings>
                        <MouseBinding Gesture="LeftDoubleClick" Command="{Binding Edit}" />
                    </telerik:RadGridView.InputBindings>
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="{loc:Localize name, STV}" Width="*"
                                                    DataMemberBinding="{Binding Name}" />
                        <telerik:GridViewDataColumn Header="{loc:Localize type, STV}" Width="*"
                                                    DataMemberBinding="{Binding WorkflowInfo.DisplayName, Converter={StaticResource LocalizationConverter}, ConverterParameter=STV}" />
                        <telerik:GridViewDataColumn Header="{loc:Localize created, STV}"
                                                    DataMemberBinding="{Binding DateCreated, StringFormat='d', ConverterCulture={x:Static Globalization:CultureInfo.CurrentCulture}}"
                                                    Width="Auto" />
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>


XAMLParseException ocurred

Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception.

Inner Exception: {"Value cannot be null.\r\nParameter name: element"}


 
 at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)<br>
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)<br>
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)<br>
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)<br>
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)<br>
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)<br>
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)<br>
   at System.Windows.FrameworkElement.ApplyTemplate()<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)<br>
   at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(Size availableSize)<br>
   at Telerik.Windows.Controls.GridView.GridViewHeaderRow.MeasureOverride(Size availableSize)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)<br>
   at Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)<br>
   at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size availableSize)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)<br>
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)<br>
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.Controls.Page.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)<br>
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)<br>
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)<br>
   at System.Windows.UIElement.Measure(Size availableSize)<br>
   at System.Windows.ContextLayoutManager.UpdateLayout()<br>
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)<br>
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()<br>
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()<br>
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)<br>
   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)<br>
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)<br>
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()<br>
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)<br>
   at System.Threading.ExecutionContext.runTryCode(Object userData)<br>
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)<br>
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)<br>
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)<br>
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br>
   at System.Windows.Threading.DispatcherOperation.Invoke()<br>
   at System.Windows.Threading.Dispatcher.ProcessQueue()<br>
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)<br>
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)<br>
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)<br>
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)<br>
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)<br>
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)<br>
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)<br>
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)<br>
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)<br>
   at System.Windows.Application.RunDispatcher(Object ignore)<br>
   at System.Windows.Application.RunInternal(Window window)<br>
   at System.Windows.Application.Run(Window window)<br>
   at System.Windows.Application.Run()<br>
   at STV.Application.StartUp.Main(String[] args) 


G
Top achievements
Rank 1
 answered on 09 Jan 2013
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?