Telerik Forums
UI for WPF Forum
2 answers
271 views

Hello,

I have been examining the Telerik source code and notice several anti-patterns related to automation peers. For several controls, the automation peers have function overrides that return unhelpful strings. One example is the RadGridViewAutomationPeer GetHelpTextCore method returns "RadGridView". Because of this, it's impossible to set help text for individual grids in XAML which is the default behavior of the GridViewDataControlAutomationPeer. Even though the RadGridViewAutomationPeer can be inherited from and its GetHelpTextCore method modified, not all Telerik automation peers are overridable. GridViewCell and GridViewRow for example require internally scoped properties and can't be overridden.

Right now I am able to bypass these issues by making the changes to the source code and recompiling it, but this is not a long term sustainable solution. Does Telerik have any sort of road map available for addressing automation peer issues?

Bryan
Top achievements
Rank 1
 answered on 05 Apr 2019
5 answers
242 views

Hi,

I was trying to add a qr into a RadFixedDocument like this

RadBarcodeQR qr = new RadBarcodeQR();
qr.Mode = QRClassLibrary.Modes.CodeMode.Byte;
qr.Text = documentHistory.SerialId.ToString();
qr.Width = 88;
qr.Height = 88;
using (MemoryStream stream = new MemoryStream())
{
      Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream, new PngBitmapEncoder());
 
      //RadFixedDocument
       document.InsertImage(stream, area);
}

 

I have the following error on this line: Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream, new PngBitmapEncoder());

Parameter value must be greater then 0. ParameterName: pixelWidth
 
   in System.Windows.Media.Imaging.RenderTargetBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat)
   in Telerik.Windows.Media.Imaging.ExportHelper.GetBitmapSource(FrameworkElement element, Double dpiX, Double dpiY)
   in Telerik.Windows.Media.Imaging.ExportHelper.GetElementImage(FrameworkElement element)
   in Telerik.Windows.Media.Imaging.ImageExporter.Export(FrameworkElement element, Stream stream, BitmapEncoder encoder)
   in Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)
   in MileClient.DocumentUserControl.ExportAndViewDocumentWithImageStamp(DocumentHistoryEntity documentHistory) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 714
   in MileClient.DocumentUserControl.OpenDocumentHistoryButton_Click(Object sender, RoutedEventArgs e) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 614
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   in System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   in System.Windows.Controls.Primitives.ButtonBase.OnClick()
   in System.Windows.Controls.Button.OnClick()
   in System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   in System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   in System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   in System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   in System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   in System.Windows.Input.InputManager.ProcessStagingArea()
   in System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   in System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   in System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   in System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   in MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   in System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Lance | Senior Manager Technical Support
Telerik team
 answered on 05 Apr 2019
2 answers
1.3K+ views

Hello

I use the GridView and I want to know how to select no cell when SelectionUnit = "FullRow" is set. Currently the row is selected, but also the clicked cell (is shown as selected). I'm using the Material-Theme and Version 19.1.220.

Thanks.

Alex
Top achievements
Rank 1
 answered on 05 Apr 2019
1 answer
448 views

Hi, I created a Validation Class and I using with a RadComboBox that is populated by MySQL but the validation doesn't work. When I populate by RadComboBoxItem it's work.

Validation.cs:

namespace Drex.Classes
{
    public class Validations : ViewModelBase, IDataErrorInfo
    {
        private string _NumeroProcesso;
        private DateTime? _Data;
        private Double? _AreaTerreno;
        private string _Parametro;
        private string _Interessado;
        private string _Endereco;
        private string _AutorProjeto;
        private string _ARTAutorProjeto;
        private string _ResponsavelExecucao;
        private string _ARTResponsavelExecucao;
        private string _ResponsavelAnalise;

        public string NumeroProcesso
        {
            get { return _NumeroProcesso; }
            set { _NumeroProcesso = value; this.OnPropertyChanged("NumeroProcesso"); }
        }

        public DateTime? Data
        {
            get { return _Data; }
            set { _Data = value; this.OnPropertyChanged("Data"); }
        }

        public Double? AreaTerreno
        {
            get { return _AreaTerreno; }
            set { _AreaTerreno = value; this.OnPropertyChanged("AreaTerreno"); }
        }

        public string Parametro
        {
            get { return _Parametro; }
            set { _Parametro = value; this.OnPropertyChanged("Parametro"); }
        }

        public string Interessado
        {
            get { return _Interessado; }
            set { _Interessado = value; this.OnPropertyChanged("Interessado"); }
        }

        public string Endereco
        {
            get { return _Endereco; }
            set { _Endereco = value; this.OnPropertyChanged("Endereco"); }
        }

        public string AutorProjeto
        {
            get { return _AutorProjeto; }
            set { _AutorProjeto = value; this.OnPropertyChanged("AutorProjeto"); }
        }

        public string ARTAutorProjeto
        {
            get { return _ARTAutorProjeto; }
            set { _ARTAutorProjeto = value; this.OnPropertyChanged("ARTAutorProjeto"); }
        }

        public string ResponsavelExecucao
        {
            get { return _ResponsavelExecucao; }
            set { _ResponsavelExecucao = value; this.OnPropertyChanged("ResponsavelExecucao"); }
        }

        public string ARTResponsavelExecucao
        {
            get { return _ARTResponsavelExecucao; }
            set { _ARTResponsavelExecucao = value; this.OnPropertyChanged("ARTResponsavelExecucao"); }
        }

        public string ResponsavelAnalise
        {
            get { return _ResponsavelAnalise; }
            set { _ResponsavelAnalise = value; this.OnPropertyChanged("ResponsavelAnalise"); }
        }


        public Validations(Processo_Type items, bool _selected)
        {
            if (_selected)
            {
                NumeroProcesso = items.Numero;
                Data = items.Data;
                AreaTerreno = 10.2;
                Parametro = "";
                Interessado = items.Interessado;
                Endereco = items.Endereco;
                AutorProjeto = items.AutorProjeto;
                ARTAutorProjeto = items.ARTAutorProjeto;
                ResponsavelExecucao = items.ResponsavelExecucao;
                ARTResponsavelExecucao = items.ARTResponsavelExecucao;
                ResponsavelAnalise = items.ResponsavelAnalise;
            }
            else
            {
                NumeroProcesso = null;
                Data = null;
                AreaTerreno = 0.0;
                Parametro = null;
                Interessado = null;
                Endereco = null;
                AutorProjeto = null;
                ARTAutorProjeto = null;
                ResponsavelExecucao = null;
                ARTResponsavelExecucao = null;
                ResponsavelAnalise = null;
            }
        }

        public string this[string columnName]
        {
            get
            {
                Debug.WriteLine(columnName);
                if ("NumeroProcesso" == columnName)
                {
                    if (String.IsNullOrEmpty(NumeroProcesso))
                    {
                        return "Favor informar o número do processo";
                    }
                }

                if ("Data" == columnName)
                {
                    if (!_Data.HasValue)
                    {
                        return "Favor informar a data do processo";
                    }
                }

                if ("AreaTerreno" == columnName)
                {
                    if ((AreaTerreno == 0.0) || (!AreaTerreno.HasValue))
                    {
                        return "Favor informar o total da área do terreno";
                    }
                }

                if ("Parametro" == columnName)
                {
                    if (String.IsNullOrEmpty(Parametro))
                    {
                        return "Favor informar um parâmetro";
                    }
                }

                if ("Interessado" == columnName)
                {
                    if (String.IsNullOrEmpty(Interessado))
                    {
                        return "Favor informar o nome do interessado";
                    }
                }

                if ("Endereco" == columnName)
                {
                    if (String.IsNullOrEmpty(Endereco))
                    {
                        return "Favor informar o endereço do projeto";
                    }
                }

                if ("AutorProjeto" == columnName)
                {
                    if (String.IsNullOrEmpty(AutorProjeto))
                    {
                        return "Favor informar o nome do autor do projeto";
                    }
                }

                if ("ARTAutorProjeto" == columnName)
                {
                    if (String.IsNullOrEmpty(ARTAutorProjeto))
                    {
                        return "Favor informar a ART do autor do projeto";
                    }
                }

                if ("ResponsavelAnalise" == columnName)
                {
                    if (String.IsNullOrEmpty(ResponsavelAnalise))
                    {
                        return "Favor informar o nome do responsável pela análise";
                    }
                }

                return "";
            }
        }

        public string Error
        {
            get { throw new NotImplementedException(); }
        }
    }

}

 

 

.xaml:

                <telerik:RadComboBox Text="{Binding Parametro, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}"
                                     x:Name="Parametro"
                                     VerticalAlignment="Center"
                                     HorizontalAlignment="Stretch" 
                                     HorizontalContentAlignment="Left"
                                     EmptyText="[selecione um parâmetro]" 
                                     IsEditable="True" 
                                     IsReadOnly="True"
                                     DataContext="{StaticResource Parametro_Call}" 
                                     ItemsSource="{Binding Parametros}"
                                     DisplayMemberPath="Parametro" 
                                     SelectedValuePath="IDParametro"/>

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Apr 2019
5 answers
132 views
I use RadCartesianChart3d to display a surface map with a lot of points.  Hundreds of thousands.  And it displays well but as you might imagine, it takes a long time for me to generate all of those points.   So I had an idea (what turned out to be a bad idea) that I would make things more efficient by changing my pixel type -- my class to which the chart binds --  from a class into a struct.  

Obviously, that failed.  The RadCartesianChart3D threw an exception with the text "Dynamic getter is not supported for value types.".  

And I get this.  Makes sense given how the chart works.  But it leads me to wonder:  Is there an alternative approach in Telerik world that would give me the efficiency I'm looking for?

It just seems that if there were some simpler version of the chart that could work with some a stock struct type with X,Y,Z double values, it would have to be a lot faster.  Not forcing the GC to track 200,000 garbage-collectible references seems like it would have to be a boost, no?

So is there such an alternative?  And if not, is this something that might even be on Telerik's radar for the future?

Or is my thinking wrong here and would such a chart *not* give m the performance improvement I expect (and if so, why not?)

Thanks,
Martin Ivanov
Telerik team
 answered on 05 Apr 2019
5 answers
313 views

I have a worksheet with a lot of protected cells that cannot be edited. I want the cells to be protected but I don't need a warning to popup everytime the user tries to edit a protected cell. I would prefer to not have any warning display and just have the action silently fail.

Is there anyway to suppress the error dialog when the user tries to modify one of these protected cells?

Chris
Top achievements
Rank 1
 answered on 04 Apr 2019
3 answers
242 views

Hi,

I use the Radmap Control for Displaying Floorplans which has no Coordinates.The floorplans are available in Maptiles so I implemented a custom map provider.

https://docs.telerik.com/devtools/wpf/controls/radmap/how-to/howto-custom-provider

The plan will now be displayed but it will be repeated infinitly. How can I prevent that?

best regards

Petar Mladenov
Telerik team
 answered on 04 Apr 2019
4 answers
145 views

Hello,

we are using the RadTileView-Control in our project.

After upgrade to Telerik Version 2019.1.220, an exception is thrown at each startup.

System.Windows.Markup.XamlParseException: Must create DependencySource on same Thread as the DependencyObject

We are using implicit styles (NoXaml version) with an active fluent style. Other styles (Crystal, etc.) seem not to be affected.

Please help!

regards,

Tobias

Yoan
Telerik team
 answered on 04 Apr 2019
2 answers
504 views
How can I configure the RowDetails to open only when I click on the plus symbol and not on the whole row ?

<telerik:RadGridView Grid.Row="0"
                             Name="DmsBatchRadGridView"
                             KeyDown="DmsBatchRadGridView_OnKeyDown"
                             RowDetailsVisibilityMode="VisibleWhenSelected"
                             Filtered="DmsBatchRadGridView_OnFiltered"
                             ItemsSource="{Binding CollectionViewDmsBatch}"
                             AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn ExpandMode="Multiple" />
                <telerik:GridViewDataColumn Header="Batch ID" IsReadOnly="True"
                                            DataMemberBinding="{Binding SYSDMSBATCH}" />
                <telerik:GridViewDataColumn Header="Request Datum" DataMemberBinding="{Binding REQDATE}"
                                            IsReadOnly="True"
                                            DataFormatString="dd.MM.yyyy" />
                <telerik:GridViewDataColumn Header="Request Zeit"
                                            IsReadOnly="True"
                                            DataMemberBinding="{Binding REQTIME, Converter={StaticResource ClarionTimeToDateTimeConverter}}"
                                            DataFormatString="HH:mm" />
                <telerik:GridViewDataColumn Header="Fehler / Akte" IsReadOnly="True"
                                            DataMemberBinding="{Binding FehlerProAkte}" />
                <telerik:GridViewDataColumn Header="UseCase" IsReadOnly="True" DataMemberBinding="{Binding Method}" />
                <telerik:GridViewCheckBoxColumn Header="Retry"
                                                EditTriggers="CellClick"
                                                AutoSelectOnEdit="True"
                                                DataMemberBinding="{Binding RETRYONEERROR, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IntToBoolConverter}}" />
                <telerik:GridViewCheckBoxColumn Header="Ignorieren"
                                                UniqueName="IgnoreColumn"
                                                EditTriggers="CellClick"
                                                AutoSelectOnEdit="True"
                                                DataMemberBinding="{Binding IGNORONEERROR, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IntToBoolConverter}}">
                    <telerik:GridViewCheckBoxColumn.HeaderCellStyle> ....................


Dilyan Traykov
Telerik team
 answered on 04 Apr 2019
4 answers
222 views
Hi!

When creating a Rad Diagram shapes (Rectangle, Circle etc..) with "No fill" [only outline] Is it possible to make it selectable only by the outline, rather than selecting it inside the shape? [Same Behaviour as Microsoft PPT].

~ We Can add the Cursor behavior for the entire rad diagram but not for the outline/inside the shape.

I've added a screenshot demonstrating the behavior.


Thanks!
Martin Ivanov
Telerik team
 answered on 04 Apr 2019
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?