Telerik Forums
UI for WPF Forum
1 answer
81 views

Hi,

I've been looking to implement a change case command similar to what is currently found in Word, I found the following link indicating Telerik are looking to implement this and was wondering if there was any timeline/release date for this feature?

http://feedback.telerik.com/Project/143/Feedback/Details/159427-richtextbox-change-case-command

Kind regards,

Dipen

Todor
Telerik team
 answered on 30 Sep 2016
17 answers
761 views

Hello telerik community :o)

First of all, I am sorry for my english, I know this is not perfect, but I break my back to improve it. :)

I am currently working with the telerik Framework in WPF.

Here is the code (I had to change my variables name)

 <telerik:RadGridView Name="GridName" IsPropertyChangedAggregationEnabled="True" EnableColumnGroupsVirtualization="True" EnableColumnVirtualization="True" ItemsSource="{Binding PagedSource, ElementName=PagerName}" AutoGenerateColumns="False" IsBusy="{Binding IsLoading}" SelectedItem="{Binding SelectedIsinFromGrid}" Grid.Row="0">
                <telerik:RadGridView.Resources>
                    <Style TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource {x:Type telerik:GridViewRow}}" >
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Status}" Value="ACTIVE">
                                <Setter Property="Background" Value="{StaticResource GreenRessourceColor}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="DISABLE">
                                <Setter Property="Background" Value="{StaticResource RedRessourceColor}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Status}" Value="UNKNOW">
                                <Setter Property="Background" Value="{StaticResource YellowRessourceColor}" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </telerik:RadGridView.Resources>
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Header1" DataMemberBinding="{Binding Item1}" />
                    <telerik:GridViewDataColumn Header="Header2" DataMemberBinding="{Binding Item2}"/>
                    <telerik:GridViewDataColumn Header="Header3" DataMemberBinding="{Binding Item3}"/>
                    <telerik:GridViewDataColumn Header="Header4" DataMemberBinding="{Binding Status}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
            <telerik:RadDataPager Name="PagerName" Style="{StaticResource CustomDataPagerStyle}" Grid.Row="1" Source="{Binding ItemsListToDisplay}" PageSize="100" IsTotalItemCountFixed="False" />

The error:

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.GridView.GridViewRow', AncestorLevel='1''. BindingExpression:Path=IsPinned; DataItem=null; target element is 'GridViewPinButton' (Name=''); target property is 'IsPinned' (type 'Boolean')

The grid, the pager and the datas are well displayed with the right color, excepte that I have this error inside my VS output.

More information about the usage of this code.

This code is used inside a UserControl, this userControl is wrapped inside a RadPane then it is injected into a RadPaneGroup.

Why am I doing this? Because I am using prism to inject my modules on the fly into the mainRegion as a RadPane

The error occure only when I am moving the pane outside the RadPaneGroup

It is like I messed up with the RadGridView styleRow.

As you can see, I am not using directly the IsPinned property.

Any Idea?

Dilyan Traykov
Telerik team
 answered on 29 Sep 2016
9 answers
805 views

Hi,

   I have created a class Employee with Properties FirstName,LastName,Title, and Date of Birth. By default  I kept Browsable attribute value 'false' for FirstName Property. In the set block of Title and Date of birth I am trying to change the value of Browsable attribute value of firstName Property to true and false respectively. 

     It is changing the value to true and showing the FirstName Property while loading the grid.After that again if I edit DataOfBirth it is not hiding the property 'FirstName' even when i set browsable attribute value false.

 

I am using following code to modify the browsable attribute value:

   public void ModifyBrowsableAttributeOfProperty(string prop, bool value)
        {
            PropertyDescriptor descriptor = TypeDescriptor.GetProperties(this.GetType())[prop];

            BrowsableAttribute attribute = (BrowsableAttribute)descriptor.Attributes[typeof(BrowsableAttribute)];


            FieldInfo field_info = attribute.GetType().GetField("Browsable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.IgnoreCase);

            if ((Convert.ToBoolean(field_info.GetValue(attribute)) != value))
            {
                field_info.SetValue(attribute, value);
            }

        }

 

In simple words it is working only when we change while loading rest of the times when we change browsable Property value it is not refelecting in propertygrid.

 

Regards,

Nagasree.

     

 

Dilyan Traykov
Telerik team
 answered on 29 Sep 2016
5 answers
156 views

I have a RadCartesianChart with a vertical linear axis.

I want to be able to click on the axis and show a dialog.

I have got it working on the MouseLeftButtonUp event – but it only triggers when I click the labels – and not the background. I have tried to style the axis – but with no luck. 

 

/Flemming 

Martin Ivanov
Telerik team
 answered on 29 Sep 2016
1 answer
130 views

Hello,

 

I've created a custom resourcetype "rep" and subsequent resources (reps) that are currently different categories on my scheduleview. I now have the view that I want, but i don't know how to add data to the rep property of an appointment so it will be shown in the proper category. Unsure on whether to create my own custom appointments or if this can be bound as is.

 

Thanks

Kalin
Telerik team
 answered on 29 Sep 2016
1 answer
249 views

Hi. I have a RadTabControl, wich ContentTemplate is a static resource with a DataTemplate like this:

 

        <DataTemplate x:Key="TabItemContentTemplate" >
            <ContentControl prism:RegionManager.RegionName="{Binding RegionName}"/>
        </DataTemplate>

My item view model has a Header property and a RegionName property. All I want is to know the exactly moment all the templates are applied in the RadTabControl, so I can call the RegionManager to create a view inside.

I've tried RadTabControl.Loaded and may others, also have tried to locate ContentPresenter named ContentElement and attach to the Loaded event, but even there the content control is not yet created.

 

Any ideas? Thanks in advance.

 

David.

Kiril Vandov
Telerik team
 answered on 29 Sep 2016
1 answer
973 views

Hi,

I'm creating a ComboBox that contains a Dictionary<byte,string> (for ex.) and ClearSelectionbuttonVisibility = Visible.

It's all ok, but if I click on "Clear Selection", it gives me ad error (that I attached).

I had to declare my property SelectedItem as KeyValuePair<byte, string>.

Now, I think that the reason's error is that KeyValuePair<byte,string> is not nullable, then?

How can I do use Dictionary in this context?

<!--My ComboBox for Dictionary-->
<telerik:RadComboBox ItemsSource="{Binding MyItems}"
                     SelectedItem="{Binding SelectedItem,Mode=TwoWay}"
                     DisplayMemberPath="Value"
                     SelectedValuePath="Key"
                     Style="{StaticResource FieldLongComboBoxStyle}"/>
                      
 
<!--Style-->
<Style x:Key="FieldBaseComboBoxStyle" TargetType="telerik:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}">
    <Setter Property="Margin" Value="5"/>
    <Setter Property="ClearSelectionButtonVisibility" Value="Visible"/>
    <Setter Property="ClearSelectionButtonContent" Value="Clear selection"/>
    <Setter Property="TextSearchMode" Value="StartsWith"/>
    <Setter Property="EmptyText" Value="Valore non selezionato"/>
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Style.Triggers>
        <DataTrigger Binding="{Binding CantUpdateModel}" Value="True">
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="IsEditable" Value="False"/>
            <Setter Property="IsHitTestVisible" Value="False"/>
            <Setter Property="FontWeight" Value="Bold"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding CantUpdateModel}" Value="False">
            <Setter Property="IsReadOnly" Value="False"/>
            <Setter Property="IsEditable" Value="True"/>
            <Setter Property="IsHitTestVisible" Value="True"/>
            <Setter Property="FontWeight" Value="Normal"/>
        </DataTrigger>
    </Style.Triggers>
</Style>

Nasko
Telerik team
 answered on 29 Sep 2016
4 answers
161 views
I need to have multiple line spread to the depth of Z-Axis so that they don't overlap. Is Z-Axis supported by 3D chart? Can you give an simple example of this implementation? Your sample only shows 3D line but we need mutiple 2D lines spread to the depth of Z-Axis.

Thanks,
Jessica
 
Petar Marchev
Telerik team
 answered on 29 Sep 2016
2 answers
359 views

RadMaskedTextInput fails on cut using shift-del.

Just tried your R3 2016 demo and it also throws what seems to be the same exception.

System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))

 

01.System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
02.   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
03.   at System.Windows.Clipboard.Flush()
04.   at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
05.   at System.Windows.Clipboard.SetDataInternal(String format, Object data)
06.   at System.Windows.Clipboard.SetText(String text, TextDataFormat format)
07.   at System.Windows.Clipboard.SetText(String text)
08.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCopySelected(TextMode mode)
09.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCutSelected()
10.   at Telerik.Windows.Controls.RadMaskedInputBase.HandleCut()
11.   at Telerik.Windows.Controls.RadMaskedInputBase.OnApplicationCut(Object sender, ExecutedRoutedEventArgs e)
12.   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
13.   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
14.   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
15.   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
16.   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
17.   at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
18.   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
19.   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
20.   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
21.   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
22.   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
23.   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
24.   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
25.   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
26.   at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
27.   at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
28.   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
29.   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
30.   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
31.   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
32.   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
33.   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
34.   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
35.   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
36.   at System.Windows.Input.InputManager.ProcessStagingArea()
37.   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
38.   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
39.   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
40.   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
41.   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
42.   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
43.   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
44.   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
45.   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
46.   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
47.   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
48.   at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
49.   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
50.   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
51.   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
52.   at System.Windows.Application.RunDispatcher(Object ignore)
53.   at System.Windows.Application.RunInternal(Window window)
54.   at System.Windows.Application.Run(Window window)
55.   at System.Windows.Application.Run()

 

 

Chad
Top achievements
Rank 1
 answered on 28 Sep 2016
3 answers
173 views

First of all sorry if this question is already answered or it is very dummy.

 

I was using several RadTabControls in my application, but I've reached a point that I need to use a view model istead of a RadTabItem and create them in codebehind on certain conditions for one of the RadTabCotrols.

There is other function that does run through every RadTabControl retrieving all the RadTabItems by looking at the Item property. But it happens that one of my RadTabControls has a custom viewModel, so the cast to RadTabItem fails.

I suppose that it is very logical to get the ViewModel from Items property when you have defined to have a viewmodel and want to run over all items, but I wonder if there is a generic way (accessor, list) of getting just the RadTabItem control that wraps the custom viewmodel and use the same method of running through all RadTabItems for all RadTabControls.

 

Thanks in advance.

 

David.

David
Top achievements
Rank 1
 answered on 28 Sep 2016
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?