Telerik Forums
UI for WPF Forum
10 answers
176 views

Your Q1 2016 example references the "MyFilterDescriptorBindingBehavior" in the "Example.xaml" file of the "DataFilter.Default Filter Editors" example.  However, that is nowhere to be found.

I need to add a FilterDescriptor using code that is displayed in the control for the user to interact with.  This seems like the example that would cover the scenario but the documentation is incomplete.  Can you help me with this?

 Joel

Stefan
Telerik team
 answered on 06 Mar 2018
1 answer
117 views
I want to have a slightly different edit behavior depending on what the edit trigger is, e.g. F2/click vs just typing. Is there anyway to determine this information with the objects and events available?
Vladimir Stoyanov
Telerik team
 answered on 06 Mar 2018
1 answer
133 views

I have a RadTreeView built using Hierarchical self-referenced data, positioned within a popup. There is an EventToCommandBehaviour built within the Tree exactly as:https://www.telerik.com/forums/doubleclick-in-mvvm-databound-treeview

I am getting no response at all from the event, if I change the control to a ListBox then the event triggers?

Can anyone shed any light on what could be happening.

I have tried various EventName's [Selected, MouseLeftButtonUp, ItemClick, ItemDoubleClick...] nothing triggers it on the RadTreeView

Positioning the Tree directly onto the Page, outside of the Popup - there is still no response to the Event.

 

Martin Ivanov
Telerik team
 answered on 06 Mar 2018
1 answer
208 views

Hello! Team,

We have a WPF window in which we're using multiple RichTextBoxes (RTB). We encountered an object reference error while editing text in one of the rtb. Stack trace log attached.

Date Time : 2/27/2018 2:22:12 PM ,
User Name : XXXXXXXX,
NameSpace : Telerik.Windows.Documents.UI ,
Class Name : Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter ,
Method Name : UpdateCaretStyle ,
Exception Message : Object reference not set to an instance of an object. ,
Error Trace :    at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretStyle()
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretSize()
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnCaretLocationChanged()
   at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChangedActionInternal()
   at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChanged()
   at Telerik.Windows.Documents.DocumentPosition.OnLocationChanged(Boolean changesCursorInitialLocation)
   at Telerik.Windows.Documents.DocumentPosition.CallOnPositionChanged(Boolean changesCursorInitialLocation)
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.SetDocumentPosition(DocumentPosition documentPosition, Point position, Boolean moveToNextIfOutOfBox)
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position, UIElement originalSource, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseLeftButtonDownOnPosition(Point position, UIElement originalSource, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) Inner Exception:
SourceFilePath: c:\Builds\13\AppPath\App.xaml.cs

 

RTB configuration:

<telerik:RadRichTextBox x:Name="txtContent" IsFocusable="True" PreviewKeyDown="txtContent_PreviewKeyDown"
                         AutomationProperties.AutomationId="{Binding TagValue,StringFormat=Comment_{0},RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
                         BorderThickness="0" BorderBrush="White" IsSpellCheckingEnabled="True"
                         DocumentInheritsDefaultStyleSettings="True"
                         GotFocus="txtContent_GotFocus" LostFocus="txtContent_LostFocus"
                         DocumentContentChanged="txtContent_DocumentContentChanged"
                         HorizontalContentAlignment="Left"  IsContextMenuEnabled="True"         
                         MouseLeave="txtContent_MouseLeave"
                         PreviewMouseRightButtonDown="txtContent_PreviewMouseRightButtonDown"
                         KeyDown="txtContent_KeyDown"
                         Background="Transparent" FontFamily="Georgia (Body)"
                         IsSelectionMiniToolBarEnabled="False"
                         AcceptsReturn="True" ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ScrollViewer.HorizontalScrollBarVisibility="Auto" Tag="{Binding TagValue}"
                         MouseMove="txtContent_MouseMove" >
</telerik:RadRichTextBox>

 

Another issue with this exception is that we're not able to isolate exact steps to reproduce the issue.

As is seen in the logs the exception is not coming from any of our custom methods, its coming from some inbuild dll method of telerik. So, please suggest what could be causing this issue.

 

Regards

Tushar

Tanya
Telerik team
 answered on 06 Mar 2018
1 answer
152 views

I have many merged cells (ex:B12:B17).

When I fill it a wrap text and it will resize the height to every rows in meged cell.

It will make many blank in cell.

May I ask how solve this problem?

thank you.

東祐
Top achievements
Rank 1
 answered on 06 Mar 2018
3 answers
208 views

This can be seen in the examples, if you have a GridViewToggleRowDetailsColumn then you have a column with plus or minus in it for expanding/collapsing the row. The issue I'm having is that often the click is being missed as it seems you have to click exactly on the text, not just anywhere in the cell. I've seen you can make the details expand on selection, but I don't really want to do this, I'd rather the user clicks on the expansion cell. 

Is there any way to make the whole of the cell clickable?

Interestingly enough I've noticed that the expansion for hierarchical grids is clickable anywhere, but because I've got multiple child details I wanted to have tabs.

Yoan
Telerik team
 answered on 05 Mar 2018
4 answers
797 views
Hello,
I'm trying to get the NumericUpDown to tab to the next control when the user presses Enter.  Handling the KeyUp or KeyDown event with the following code does not work: 
(sender as RadNumericUpDown).MoveFocus(new TraversalRequest(System.Windows.Input.FocusNavigationDirection.Next));
e.Handled = true;

Any suggestions?

 

 



Dinko | Tech Support Engineer
Telerik team
 answered on 05 Mar 2018
2 answers
116 views

DateTimePicker ClockItemsSource doesn't show the time span 23:59:59 the Time popup shows upto 22:00:00

 

 RadDateTimePickerObj.ClockItemsSource = new List<TimeSpan> {
                new TimeSpan(0,0,0),              new TimeSpan(1, 0, 0),                new TimeSpan(2, 0, 0),            new TimeSpan(3,0,0),                new TimeSpan(4,0,0)
                ,new TimeSpan(5,0,0),new TimeSpan(6,0,0),new TimeSpan(7,0,0),new TimeSpan(8,0,0),new TimeSpan(9,0,0),new TimeSpan(10,0,0)
            ,new TimeSpan(11,0,0)
            ,new TimeSpan(12,0,0),new TimeSpan(13,0,0),new TimeSpan(14,0,0),new TimeSpan(15,0,0),new TimeSpan(16,0,0),new TimeSpan(17,0,0),new TimeSpan(18,0,0),new TimeSpan(19,0,0),
            new TimeSpan(20,0,0),new TimeSpan(21,0,0),new TimeSpan(22,0,0),new TimeSpan(23,59,59)
            };

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Mar 2018
0 answers
113 views

Hi,

I am working on a large-scale WPF application using Telerik Controls and seeing a problem that my TextBox input is not being saved when I click my RadButton to save.  The problem is tied to the fact that the TextBox never looses focus and I'm typing in an input and just clicking Save afterwards.  Since the Textbox doesn't loose focus the property is never updated.  I know that a possible fix is to add UpdateSourcetrigger=PropertyChanged to my TextBox's Binding but since I have this occurring all over the application, it would be hard to accomplish.   I want a generic solution that allows me to save the content of my input even without having to tab out of the control.

Please advise possible solutions.

Thanks.

 

Here is wpf c# code on my MenuButton:

namespace Stream.WPF.Infrastructure.Controls
{
    using System.Windows;
    using System.Windows.Media;

    using Telerik.Windows.Controls;

    public class MenuButton : RadButton
    {
        public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
            "ImageSource",
            typeof(ImageSource),
            typeof(MenuButton),
            new UIPropertyMetadata(default(ImageSource)));

        public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(
            "Label",
            typeof(string),
            typeof(MenuButton));

        public ImageSource ImageSource
        {
            get
            {
                return (ImageSource)this.GetValue(ImageSourceProperty);
            }

            set
            {
                this.SetValue(ImageSourceProperty, value);
            }
        }

        public string Label
        {
            get
            {
                return (string)this.GetValue(LabelProperty);
            }

            set
            {
                this.SetValue(LabelProperty, value);
            }
        }
    }
}

And in my XAML I am using it like this:

 <customControls:MenuButton Grid.Column="1" Content="{x:Static resources:ProperNameResources.Overview}" Margin="30,2,30,2" Background="#005A8B"
                                   Command="{Binding Owner.SelectedTourSheetViewModel.ShowOverviewCommand}"
                                   Visibility="{Binding Owner.SelectedTourSheetViewModel.IsOverviewDisplayed, Converter={StaticResource InverseBoolToVisibilityConverter}}"/>

 

 

sam
Top achievements
Rank 1
 asked on 02 Mar 2018
1 answer
178 views

Hi all,

I've got a requirement to modify the styling of rich text that's pasted into my radrichtextbox. The following code works, but it hangs the UI when it's run on the main thread, and ClipboardEx.GetDocumentFromClipboard is unhappy when it's not run on the main thread ( something like this https://stackoverflow.com/questions/15913275/backgroundworker-and-clipboard )

Has anybody found a way around this?

 

        private void EditorTextBoxCommandExecuting(object sender, CommandExecutingEventArgs e)
        {
            if (e.Command is PasteCommand)
            {
                DocumentFragment fragment = ClipboardEx
                        .GetDocumentFromClipboard(
                            "RadDocumentGUID"); //copy pasting from a RadRichTextBox, keep the paragraphs as they are
                RemoveStylingFromFragment(fragment);
                Editor.InsertFragment(fragment);

       }

}

                


Tanya
Telerik team
 answered on 02 Mar 2018
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?