Telerik Forums
UI for WPF Forum
1 answer
167 views
Hey there,

I'm currently searching for a way to set the radRichTextBox size to CM or inches.
Something like in the
radRichTextBoxRibbonUi -- Page layout -- Size 
but not with predesigned sizes.

Is there a given way to do that or do I have to calculate the size via ppi?

Thanks for any help! :)
Iva Toteva
Telerik team
 answered on 11 Mar 2013
1 answer
228 views
Hello. I have one problem. When I click button "Close" on RadDocumentPane I see that pane is closed. But when I try to save layout I see that this pane is hidden. I need to disable hidding pane when I click button "Close". How ca I do it? Thanks.
Vladi
Telerik team
 answered on 11 Mar 2013
2 answers
50 views
Hi.
I updated to the newest version of Telerik Dll's and I cannot add to ItemMappingCollection (Witch I could without problem)

code:
private void createSeriesMappings(int count, string value, string stackName)
       {
           for (int i = 0; i < count; i++)
           {
               SeriesMapping seriesMapping                                         = new SeriesMapping();
               seriesMapping.SeriesDefinition                                      = new StackedBarSeriesDefinition(stackName);
               seriesMapping.SeriesDefinition.ShowItemToolTips                     = true;
               seriesMapping.SeriesDefinition.ShowItemLabels                       = false;
               seriesMapping.SeriesDefinition.InteractivitySettings.HoverScope     = InteractivityScope.Series;
               seriesMapping.SeriesDefinition.InteractivitySettings.SelectionScope = InteractivityScope.Series;
               seriesMapping.ItemMappings.Add(new ItemMapping("[" + i + "]." + value, DataPointMember.YValue)); // this gives me the error
               chart.SeriesMappings.Add(seriesMapping);
           }
       }

the error
'Telerik.Windows.Controls.Charting.ItemMappingCollection' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Telerik.Windows.Controls.Charting.ItemMappingCollection' could be found (are you missing a using directive or an assembly reference?)

How can I solve this ?

Best regards
Kristján


Kristjan Einarsson
Top achievements
Rank 1
 answered on 11 Mar 2013
7 answers
427 views
Hi All,


We use Telerik's PersistenceManager capabilities to save user settings to XML in a relational database (as desribed here).
In particular, some of RadGridView's settings are stored this way.
This has worked fine for several months, until we performed an update of our Telerik libraries last week.


The XML the PersistenceManager produces, contains some type information concerning the types that were serialized to XML,
and contains lines like this:

<TI K="-134624143" N="Telerik.Windows.Controls.GridView.GridViewLengthConverter, Telerik.Windows.Controls.GridView, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />

After the Telerik libraries update, this causes an exception because we now use Telerik.Windows.Controls.GridView v2012... 
When PersistenceManager.LoadFromXml is called, the PersistenceFramework tries to load the Type,
resulting in a TypeLoadException:

Could not load file or assembly 'Telerik.Windows.Controls.GridView,
Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one
of its dependencies. The located assembly's manifest definition does not match
the assembly reference. (Exception from HRESULT: 0x80131040)


What is the best option to avoid this on Telerik updates?
Can we tell the Serializer not to Save the fully qualified type name to XML?


Thanks for your time,
Koen




Zarko
Telerik team
 answered on 11 Mar 2013
3 answers
311 views
Is there a way to provide a different style for the grid generated in a hierarchy. E.g. Can the parent grid use one style, while the child grid uses another?

Cheers

Justin
Nedyalko Nikolov
Telerik team
 answered on 11 Mar 2013
3 answers
317 views
The RadGridView removes the ColumnSortDescriptor when there is no data to display. The result is that when there is data again, it isn't sorted any more.

My specific case is as follows: I have two grids. The second grid shows the items from a List<> property of the selected item in the first grid. When the second grid is sorted (either because I added a ColumnSortDescriptor in the constructor or because the column was clicked in the GUI) and in the first grid a row is selected that doesn't have any items in the List, then the second grid shows no items (correctly) and the sorting arrow disappears. After a row is selected that does have items in the List, the second grid shows these items, but the sorting is gone.

Is there a way to make this sorting more persistent?

Thanks in advance,
  Herre

[WPF2012Q3]
Rossen Hristov
Telerik team
 answered on 11 Mar 2013
1 answer
161 views
Hi!
I want to hide the black border that appears, by default, on a selected cell of a RadGridView.

I don't know exactly wich style of the RadGridView I have to override.

Thanks in advance.
Goran
Top achievements
Rank 1
 answered on 11 Mar 2013
0 answers
148 views
Aggregation functions (Sum, Min, Max) do not work if type implements ICustomTypeDescriptor.
Same scenario with RadGridView works fine.
ICustomTypeDescriptor implementation.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
 
namespace HOME.Samples.TypeDescriber.Objects
{
    public class TestResultRowWrapper : Dictionary<string, double?>, ICustomTypeDescriptor
    {
        AttributeCollection ICustomTypeDescriptor.GetAttributes()
        {
            return new AttributeCollection(null);
        }
 
        string ICustomTypeDescriptor.GetClassName()
        {
            return null;
        }
 
        string ICustomTypeDescriptor.GetComponentName()
        {
            return null;
        }
 
        TypeConverter ICustomTypeDescriptor.GetConverter()
        {
            return null;
        }
 
        EventDescriptor ICustomTypeDescriptor.GetDefaultEvent()
        {
            return null;
        }
 
        PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty()
        {
            return null;
        }
 
        object ICustomTypeDescriptor.GetEditor(Type editorBaseType)
        {
            return null;
        }
 
        EventDescriptorCollection ICustomTypeDescriptor.GetEvents(Attribute[] attributes)
        {
            return new EventDescriptorCollection(null);
        }
 
        EventDescriptorCollection ICustomTypeDescriptor.GetEvents()
        {
            return new EventDescriptorCollection(null);
        }
 
        PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes)
        {
            var properties = Keys.Select(key => new TestResultPropertyDescriptor(key)).Cast<PropertyDescriptor>().ToList();
            return new PropertyDescriptorCollection(properties.ToArray());
        }
 
        PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties()
        {
            return ((ICustomTypeDescriptor)this).GetProperties(null);
        }
 
        object ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor pd)
        {
            return this;
        }
    }
}
TestResultPropertyDescriptor
using System;
using System.Collections.Generic;
using System.ComponentModel;
 
namespace HOME.Samples.TypeDescriber.Objects
{
    public class TestResultPropertyDescriptor : PropertyDescriptor
    {
        public TestResultPropertyDescriptor(string key)
            : base(key, null)
        {
        }
 
        public override Type ComponentType
        {
            get { return typeof (Dictionary<string, double?>); }
        }
 
        public override bool IsReadOnly
        {
            get { return false; }
        }
 
        public override Type PropertyType
        {
            get { return typeof (double?); }
        }
 
        public override bool CanResetValue(object component)
        {
            return false;
        }
 
        public override object GetValue(object component)
        {
            return ((Dictionary<string, double?>) component)[base.Name];
        }
 
        public override void ResetValue(object component)
        {
            ((Dictionary<string, double?>) component)[base.Name] = 0;
        }
 
        public override void SetValue(object component, object value)
        {
            ((Dictionary<string, double?>) component)[base.Name] = (double?) value;
        }
 
        public override bool ShouldSerializeValue(object component)
        {
            return false;
        }
    }
}
View XAML
<Window x:Class="HOME.Samples.Client.Wpf.View.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        xmlns:ViewModel1="clr-namespace:HOME.Samples.TypeDescriber.ViewModel;assembly=HOME.Samples.TypeDescriber"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d"
        d:DataContext="{d:DesignInstance Type=ViewModel1:MainWindowViewModel}">
    <Window.Resources>
        <Style x:Key="amountColumnStyle" TargetType="telerik:GridViewDataColumn">
            <Setter Property="FooterCellStyle">
                <Setter.Value>
                    <Style TargetType="telerik:GridViewFooterCell">
                        <Setter Property="FontWeight" Value="Bold"/>
                        <Setter Property="Background" Value="LightGray"/>
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="TextAlignment" Value="Right"/>
            <Setter Property="DataFormatString" Value="#,#;(#,#);0"/>
            <Setter Property="FooterTextAlignment" Value="Right"/>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <telerik:RadToolBar>
            <telerik:RadButton Click="RadButtonClick" Content="Sum"/>
        </telerik:RadToolBar>
        <telerik:RadTreeListView x:Name="grid" Grid.Row="1" AutoGeneratingColumn="RadTreeListViewAutoGeneratingColumn" ItemsSource="{Binding Items, Mode=OneTime}"
                             EnableColumnVirtualization="False" ShowColumnFooters="True"/>
    </Grid>
</Window>
View code
using System.Windows;
using HOME.Samples.TypeDescriber.Objects;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;
 
namespace HOME.Samples.Client.Wpf.View
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void RadTreeListViewAutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
        {
            if (!(e.ItemPropertyInfo.Descriptor is TestResultPropertyDescriptor))
            {
                return;
            }
            e.Column.Style = (Style) FindResource("amountColumnStyle");
            e.Column.AggregateFunctions.Add(new SumFunction
                                                {
                                                    ResultFormatString = "{0:#,#;(#,#);0}",
                                                });
            ((GridViewDataColumn) e.Column).DataFormatString = "#,#;(#,#);0";
        }
 
        private void RadButtonClick(object sender, RoutedEventArgs e)
        {
            grid.CalculateAggregates();
        }
    }
}
ViewModel
using System.Collections.Generic;
using HOME.Samples.TypeDescriber.Objects;
 
namespace HOME.Samples.TypeDescriber.ViewModel
{
    public class MainWindowViewModel
    {
        private readonly IEnumerable<TestResultRowWrapper> _items;
 
        public MainWindowViewModel()
        {
            _items = new[]
                         {
                             new TestResultRowWrapper {{"00:15", 10}, {"00:16", null}, {"00:17", 0}},
                             new TestResultRowWrapper {{"00:15", 3}, {"00:16", 9}, {"00:17", null}}
                         };
        }
 
        public IEnumerable<TestResultRowWrapper> Items
        {
            get { return _items; }
        }
    }
}
This behavior occurs only when AutoGenerateColumns is True.
Petr
Top achievements
Rank 1
 asked on 11 Mar 2013
1 answer
116 views
problem In short description:

I have my HTML string, with href(s) inside, for example:
<a href="cfb32e1b-1f4c-4ba0-b278-0ea89a1ea4e3" target="_blank"><span class="s_7EDD076B" dir="RTL">ארינה</span></a>

i do this flow:
var provider = new HtmlFormatProvider();
textCtrl.Document = provider.Import(text);

After i do it my HTML is changed by Telerik controls by removing dir="RTL" from my href(s).
So in UI these href(s) are displayed LTR, for example:
<a href="cfb32e1b-1f4c-4ba0-b278-0ea89a1ea4e3" target="_blank"><span class="s_7EDD076B">ארינה</span></a>
Iva Toteva
Telerik team
 answered on 11 Mar 2013
1 answer
161 views

Hi Telerik Team!

I’m evaluating your WPF control bundle for one of our new applications and have some problems regarding the backstage tab in combination with a WebBrowser control in the content area of my prototype. Although the backstage tab is active, the WebBrowser control is visible and overlaps my backstage-content. Is there a way how I can solve this problem?

Best regards,

Dominik

Kiril Vandov
Telerik team
 answered on 11 Mar 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
PersistenceFramework
DataPager
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?