Telerik Forums
UI for WPF Forum
0 answers
112 views

I'm having trouble entering Korean in the RichTextBox demo.

I have a problem with the latest Windows 11 version (probably with the latest version of Microfost Korean IME), [22H2 22621.1413]

This is not a problem with the WPF default richtextbox control.

 

Is there a workaround?

kim
Top achievements
Rank 1
 asked on 05 Apr 2023
1 answer
147 views

Hi,

In my application I used windows 8 theme but in some controls I used office_blue. Now I need to change color patterns of my application and I choose a green main color for windows 8 theme, but I can't change the controls with office_blue because it is not in the list of themes in ColorThemeGenerator. Maybe office_blue comes from office theme, but it is not in the list too.  I choose the office styles because of not flat bar in panel bar control.

Thank you

Luigi

Stenly
Telerik team
 answered on 04 Apr 2023
1 answer
224 views

Programmatically i'm selecting cells in RadGridView based on row and column. Search is done by column name and cell value. Grid records binded to the model by record properties. In my case column name could be different from record' property name, ex. translated to another language. Im wonder if there are a way to handle internaly record's column names but show on the grid custom names instead?

Binding is done by behavior:RadGridCustomBindingBehavior.Columns="{Binding GridColumns}", so [DisplayName("CustomColumnName")] is not applyed to the grid

Thank you

Martin Ivanov
Telerik team
 answered on 03 Apr 2023
0 answers
165 views
I see documentation for how to create a custom tagger, I'm just curious if anyone on the forums has already started one for Markdown syntax?
Joshua
Top achievements
Rank 2
 asked on 03 Apr 2023
0 answers
135 views

I feel that this is probably a property somewhere but I can't seem to find it.
I'm using RadDocking and I can drag a tab away so that it is floating.

When I'm dragging it back I only want to be able to drag it to the tabs area (centre of the compass)
I'm guessing that there's a property to stop/block a pane being dropped at the left, top, right or bottom.

What is the property that I'm missing?

I've tried IsLeftIndicatorVisible but it still shows a drop location at the left of the pane (hides it on the compass only)

Thanks

Paul
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 31 Mar 2023
0 answers
161 views

Hi,

Maybe I found a strange bug in RadListBox (2023 R1). I guess it is very hard to reply because I use it in a very complex way but maybe you could figure out the cause of problem.
My radlistbox is bound to a ObservableCollection of objects (we can name it List), and it is refreshed every time the user change the tab in raddocking. RadListbox is only one, while tab is multiple. It works in this context.

In my application I can "close the project", operation that implies the reset of every controls in the window, List is now clear, but the instance is still live.
I can "reopen the project" and the original tabs. In this context in many combination of tab open and close I get the following exception:

NsModules.App::AppDomainUnhandledException - System.ArgumentException: An item with the same key has already been added. Key: DeltaOhm.NsModules.Model.NsCursor
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Telerik.Windows.Automation.Peers.RadListBoxAutomationPeer.CreateItemAutomationPeer(Object item)
   at System.Windows.Automation.Peers.ItemsControlAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
   at System.Windows.Automation.Peers.ItemsControlAutomationPeer.UpdateChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.ContextLayoutManager.fireAutomationEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at NsModules.App.Main()

I replaced RadListBox with system ListBox and the problem disappeared

Thank you

Luigi

Luigi
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 31 Mar 2023
1 answer
544 views

I have a GridViewDataColumn and I want to add a filter option to this column.

The value of this column is if of type enum.

I would appreciate help with how to add filtering to this column.

<telerik:GridViewDataColumn Header="Status" CellStyle="{StaticResource StatusCellStyle}"/>

        <Style x:Key="StatusCellStyle" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <TextBlock Text="{Binding Status}" >
                            <TextBlock.Style>
                                <Style TargetType="TextBlock">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Status}" Value="{x:Static Status.Completed}">
                                            <Setter Property="Foreground" Value="Green"/>
                                        </DataTrigger>

                                        <DataTrigger Binding="{Binding Status}" Value="{x:Static Status.Pending}">
                                            <Setter Property="Foreground" Value="Red"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBlock.Style>
                        </TextBlock>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
Stenly
Telerik team
 answered on 31 Mar 2023
1 answer
509 views

Hi, 

I am using a RadGridView to bind a DataTable. In that table I have dynamically generated columns. That's why I chose to set AutoGenerateColumns=true. 

I am now looking for a way to style the cells in depending on the properties of the object within the cell of the DataTable.

What I tried until now:

The first method seem the most promissing to me, so here is some code for that:


<UserControl.Resources>
        <Style x:Key="PilotStyle"
               TargetType="telerik:GridViewCell">
            <Setter Property="Background"
                    Value="Magenta" />
        </Style>
        <Style x:Key="ExpansionStyle"
               TargetType="telerik:GridViewCell">
            <Setter Property="Background"
                    Value="Aqua" />
        </Style>
        <valueConverters:RodTimeTypeConverter x:Key="converter" />
        <local:RodTableCellStyleSelector x:Key="selector"
                                         ConditionConverter="{StaticResource converter}">
            <local:RodTableCellStyleSelector.Rules>
                <local:ConditionalStyleRule Style="{StaticResource PilotStyle}">
                    <local:ConditionalStyleRule.Value>
                        <system:Boolean>True</system:Boolean>
                    </local:ConditionalStyleRule.Value>
                </local:ConditionalStyleRule>
                <local:ConditionalStyleRule Style="{StaticResource ExpansionStyle}">
                    <local:ConditionalStyleRule.Value>
                        <system:Boolean>False</system:Boolean>
                    </local:ConditionalStyleRule.Value>
                </local:ConditionalStyleRule>
            </local:RodTableCellStyleSelector.Rules>
        </local:RodTableCellStyleSelector>
    </UserControl.Resources>


<telerik:RadGridView  Grid.Row="1"
                                  CanUserSortColumns="False"
                                  CanUserSelectColumns="False"
                                  CanUserReorderColumns="False"
                                  CanUserDeleteRows="False"
                                  CanUserGroupColumns="False"
                                  CanUserSelect="False"
                                  IsFilteringAllowed="False"
                                  ShowColumnSortIndexes="False"
                                  ShowGroupPanel="False"
                                  RowHeight="45"
                                  AutoGeneratingColumn="GridViewDataControl_OnAutoGeneratingColumn"
                                  ItemsSource="{Binding RodTimesTable.DefaultView}">
                <telerik:RadGridView.Resources>
                    <Style TargetType="{x:Type TextBlock}">
                        <Setter Property="FontSize"
                                Value="20" />
                    </Style>

                </telerik:RadGridView.Resources>
            </telerik:RadGridView>


public class RodTableCellStyleSelector : StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            var conditionValue = this.ConditionConverter.Convert(item, null, null, null);
            foreach (var rule in this.Rules.Where(rule => Equals(rule.Value, conditionValue)))
            {
                return rule.Style;
            }

            return base.SelectStyle(item, container);
        }

        List<ConditionalStyleRule> rules;
        public List<ConditionalStyleRule> Rules
        {
            get
            {
                return this.rules ??= new List<ConditionalStyleRule>();
            }
        }

        public IValueConverter ConditionConverter { get; set; }
    }
    public class ConditionalStyleRule
    {
        public object Value { get; set; }

        public Style Style { get; set; }
    }



private void GridViewDataControl_OnAutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
        {
            var grid = (RadGridView)sender;
            var dataGrid = (grid.ItemsSource as DataView)?.Table;
            e.Column.Header = dataGrid?.Columns[e.Column.Header.ToString()].Caption;
            if (e.Column.Header != null && (e.Column.Header.ToString().StartsWith("Pilot") || e.Column.Header.ToString().StartsWith("Expansion")) )
            {
                e.Column.CellStyleSelector = (StyleSelector)this.FindResource("selector");
            }
        }

I would really appreciate any help.

 

Thanks in advance.

Stenly
Telerik team
 answered on 31 Mar 2023
1 answer
126 views

Hi,

What I'm tryin to do is create an App that starts hidden (without a RadWindow) and when you click on a context menu of NotifyIcon it shows a RadWindow. I've tried several options and none work correctly.

What would be the best approach for this scenario?

 

Thanks

Martin Ivanov
Telerik team
 answered on 30 Mar 2023
0 answers
132 views
We are using RadSemicircleNorthGauge and RadProgressBar, and we would like to update the look and feel, but I don't really know what changes have been made since 2017.   Perhaps there are new controls we should use or updated properties on the existing ones.  Can you point me to the right place to get this information?
Brett
Top achievements
Rank 1
 asked on 29 Mar 2023
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?