Telerik Forums
UI for WPF Forum
1 answer
81 views
Hi ,

I was trying to import the data using RTFFormatProvider.import(string) method.
It is taking so much time to execute this.
The parameter which i was passing has more than 5Lakhs characters.
Do we have any alternative or something else to improve this performance.

Note:I am getting data from the above method but the only thing is taking so much time.

Could you pls throw your thoughts on this.
Todor
Telerik team
 answered on 05 Dec 2014
1 answer
133 views
Hi ,

I was trying to import the data using RTFFormatProvider.import(string) method.
It is taking so much time to execute this.
The parameter which i was passing has more than 5Lakhs characters.
Do we have any alternative or something else to improve this performance.

Note:I am getting data from the above method but the only thing is taking so much time.

Could you pls throw your thoughts on this.
Todor
Telerik team
 answered on 05 Dec 2014
1 answer
121 views
Hello Telerik

I would like to publish some source code examples in my Bog, among other things with Telerik-Controls. But of course I do not want to use the regular Telerik Dlls. Is there a link to download your demo dlls, which you also get when creating a test account.

Greetings Uwe
Dimitrina
Telerik team
 answered on 04 Dec 2014
1 answer
211 views
Hi,

I want to insert a row to a specific index which the user chooses, how can i do it? i see that adding a new row is or in the to or at the button not in the muddle of the grid, 

thanks,
Rachel.
Boris
Telerik team
 answered on 04 Dec 2014
3 answers
275 views
Hello, I want to reference the default template of the MilestoneContainer but I don't achieve this.
the goal is to use the default template and override when a dataTrigger is firing
I try to only define the data trigger
<Style BasedOn="{StaticResource ResourceKey={x:Type telerik:MilestoneContainer}}" TargetType="{x:Type telerik:MilestoneContainer}">

                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Converter={StaticResource ObjectAndTypeToVisibilityConverter}, ConverterParameter={x:Type vm:GanttTaskModelePlanningFamille}}" Value="True">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <Rectangle Width="3"
                                                   Height="24"
                                                   Fill="{TemplateBinding Background}" />
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
It's no working, trigger have no action
I try to reference the default template in my style definition (to force the trigger)
<Setter Property="Template" Value="{StaticResource MilestoneContainerTemplate}" />
But still not working, the resource is not know
I also try to do reference at resource using the telerik dll, but the import failed (build failed)
<ResourceDictionary Source="pack://application:,,,/Telerik.Windows.Controls.GanttView;component/Telerik.Windows.Controls.GanttView.xaml" /> 

Have you any idea how I can solve my problem ?

Thanks






Masha
Telerik team
 answered on 04 Dec 2014
3 answers
212 views
I came across a strange case when I was writing code for saving FilterDescriptors settings for RadDataFilter. The default value for string filter editor is OperatorValueFilterDescriptorBase.UnsetValue, the FilterDescriptor.Value is equal to OperatorValueFilterDescriptorBase.UnsetValue (FilterDescriptor .Value == OperatorValueFilterDescriptorBase.UnsetValue). When I save and read this value from isolated storage is not equal to OperatorValueFilterDescriptorBase.UnsetValue. See example bellow.

The following example is completely useless but it shows error.

MainWindow.xaml:
<Window x:Class="TestTelerikWpfApp.MainWindow"
        xmlns:local="clr-namespace:TestTelerikWpfApp"
        Title="MainWindow" Height="300">
    <Window.Resources>
    </Window.Resources>
    <StackPanel>
        <TextBox telerik:PersistenceManager.StorageId="textBox" />
        <StackPanel Orientation="Vertical">
            <telerik:RadButton Content="Save" Click="SaveButton_Click" />
            <telerik:RadButton Content="Read" Click="ReadButton_Click" />
        </StackPanel>
    </StackPanel>
</Window>

MainWindow.xaml.cs
namespace TestTelerikWpfApp
{
    using System.Windows;
    using System.Windows.Controls;
    using Telerik.Windows.Persistence.Services;
    using Telerik.Windows.Persistence.Storage;
 
    public partial class MainWindow : Window
    {
        private IsolatedStorageProvider isoProvider;
 
        public MainWindow()
        {
            InitializeComponent();
 
            ServiceProvider.RegisterPersistenceProvider<ICustomPropertyProvider>(typeof(TextBox), new UnsetValuePropertyProvider());
 
            isoProvider = new IsolatedStorageProvider();
        }
 
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            isoProvider.SaveToStorage();
        }
 
        private void ReadButton_Click(object sender, RoutedEventArgs e)
        {
            isoProvider.LoadFromStorage();
        }
    }
}

For one TextBox I save or read data to isolated storage.

UnsetValuePropertyProvider.cs:
namespace TestTelerikWpfApp
{
    using Telerik.Windows.Data;
    using Telerik.Windows.Persistence.Services;
 
    class UnsetValuePropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo("UnsetValue", typeof(UnsetValueProxy))
            };
        }
 
        public void InitializeObject(object context)
        {
        }
 
        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }
 
        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return new UnsetValueProxy() { Value = OperatorValueFilterDescriptorBase.UnsetValue };
        }
 
        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            var unsetValueProxy = value as UnsetValueProxy;
            var isUnsetValueSame = unsetValueProxy.Value == OperatorValueFilterDescriptorBase.UnsetValue; // isUnsetValueSame = false !!!
        }
    }
}

UnsetValueProxy.cs:
namespace TestTelerikWpfApp
{
    class UnsetValueProxy
    {
        public object Value { get; set; }
    }
}

In ProvideValue method I pass to proxy object OperatorValueFilterDescriptorBase.UnsetValue value and in RestoreValue unsetValueProxy.Value is not equal to OperatorValueFilterDescriptorBase.UnsetValue and it should be. See also locals tab in debug mode (example.png).
Pawel
Top achievements
Rank 1
 answered on 04 Dec 2014
4 answers
208 views
Hi,

What are the localization strings to datetimepicker - navigation popup controls (Close-button, Clock) ?

I'm using RadControls for WPF (WPF40_2011_2_0712)

Regards,
Auvo
Yana
Telerik team
 answered on 04 Dec 2014
0 answers
212 views
I'd like to filter out hyperlinks when the user pastes into a RadRichTextBox editor control.   We are using RichTextBoxUI.dll from UI for WPF version 2014.2.617.40.

The examples found the following threads set e.Cancel = true to cancel the paste operation. 
e.Cancel is not visible in Telerik.Windows.Controls.RichTextBoxUI.DLL v2014.2.617.40 
How can the paste command be cancelled?  For example, cancel any paste command with an image in it.

The second related thread has this sample code to remove hyperlinks.
void radRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{    
   if (e.Command is PasteCommand)    
    {        
              DocumentFragment fragment = ClipboardEx.GetDocument();        
              if (fragment != null)        
               {            
                        TxtFormatProvider provider=new TxtFormatProvider();            
                        string plainText = provider.Export(fragment.ToDocument());            
                        this.radRichTextBox.InsertFragment(new DocumentFragment(provider.Import(plainText)));
                        e.Cancel = true;        
                }    
    }
}

Related threads:
- How to paste plain text http://www.telerik.com/forums/paste-plain-text
- How to remove hyperlinks http://www.telerik.com/forums/remove-hyperlinks-when-executing-pastecommand
- Preventing paste of images http://www.telerik.com/forums/limiting-the-radrichtextbox (Silverlight)

​
C
Top achievements
Rank 1
 asked on 03 Dec 2014
4 answers
116 views
Dear support,

is there a way to validate the users input? For example I only want to accept inputs of CellValueType.Number. Is it possible?

Thanks in advance

Marcus
Marcus
Top achievements
Rank 1
 answered on 03 Dec 2014
4 answers
265 views
We have noticed that rectangular shapes is incorrectly rendered on
resize. Following code expected to add to the diagram resizable straight
rectangle:

 

           
diagram.AddShape(new RadDiagramShape

                            
{

                                
Geometry = geometry,

                                 BorderBrush
= Brushes.Green,

                                 StrokeThickness
= thickness,

                                 Position
= new Point(50, 50),

                                 Background
= Brushes.Transparent

                            
});

 

           
Instead it draws rectangle with excluded corners.

Moreover if rectangle is been resized user can see strange effect when set and configuration of excluded
corners are changing. See it in action on this video: https://www.youtube.com/watch?v=dK4mXmlEOhc

We are using Telerik WPF
2013.3.1016.40

How resolve this error?
It depends on RadiusX, RadiusY (e.g. there are less cut corners when both set to 0.009), but never completely resolved.

 

Please help us to workaround
this problem in version we use.
Martin Ivanov
Telerik team
 answered on 03 Dec 2014
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?