Telerik Forums
UI for WPF Forum
2 answers
294 views

Hi,

I am trying to conditionally format the contents of merged cells. For this I have implemented a MergedCellStyleSelector as per the examples. The setters all work as expected except for setting the foreground color. If I look at the live visual tree in VS I can see that the data gets presented in a text block which does not inherit from the foreground property set on the conditional style.

public class MergedSlotStyleSelector : StyleSelector
{
    public override Style SelectStyle(object item, DependencyObject container)
    {
        var info = item as MergedCellInfo;
        var cell = container as GridViewMergedCell;
        var column = cell.DataColumn;
        var ctx = cell.DataContext as MainViewModel;
        var vm = ctx.SectionElements.OrderBy(o=>o.Sequence).ToArray()[info.VerticalStart];
 
        var baseStyle = Application.Current.Resources["GridViewMergedCellStyle"] as Style;
        var background = new SolidColorBrush(Telerik.Windows.Controls.FluentPalette.Palette.AccentColor);
        var foreground = new SolidColorBrush(Telerik.Windows.Controls.FluentPalette.Palette.PrimaryMouseOverColor);
        var style = new Style(typeof(GridViewMergedCell), baseStyle);
        style.Setters.Add(new Setter(GridViewMergedCell.VerticalContentAlignmentProperty, VerticalAlignment.Center));
        style.Setters.Add(new Setter(GridViewMergedCell.HorizontalContentAlignmentProperty, HorizontalAlignment.Right));
        if (vm.IsRulingSegment)
        {
            style.Setters.Add(new Setter(GridViewMergedCell.BackgroundProperty, background)); //<-- THIS WORKS
            style.Setters.Add(new Setter(GridViewMergedCell.ForegroundProperty, foreground)); //<-- THIS DOES NOT WORK
            style.Setters.Add(new Setter(GridViewMergedCell.FontWeightProperty, FontWeights.Bold)); //<-- THIS WORKS
        }
        return style;
    }
}
Renier Pretorius
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 16 Mar 2020
1 answer
130 views

Hi Telerik team,

I have a special case where it is required to find a row number automatically and later on save it to respective binded property.

I have gone through some of examples to find row indexes but can you please guide me how to set them to respective fields.

Vladimir Stoyanov
Telerik team
 answered on 13 Mar 2020
1 answer
297 views

I am trying to validate a Textbox that will hold an IP Address. I have a working example that works as expected

 

 <telerik:RadMaskedTextInput ValidationRegex="{x:Static maskedInput:ValidationHelper.IP}" x:Name="hueIpAddress" Height="23" Margin="203,39,0,0" VerticalAlignment="Top" Width="120" HorizontalAlignment="Left" 
                                    EmptyContent="Enter IP Address"
                                    InputBehavior="Insert"                 
                                    Mask="{Binding Path=Text, ElementName=Mask, Mode=TwoWay}"
                                    IsClearButtonVisible="False"
                                    SelectionOnFocus="CaretToEnd"
                                    TextMode="PlainText" 
                                    UpdateValueEvent="ProperyChanged"     />

 

But no matter what I do, I cannot get an event to fire when the value is updated. I have tried ValueChanged and ValueChanging, but none fire as expected, and I am not interested in playing the PreviewTextInput/KeyDown game which is unreliable. I want to be able to update a label on my page with the current value of the text box, and doing it via the handle method as I will need to do other stuff as well. 

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Mar 2020
2 answers
264 views

I need the time interval to be 1 minute. This makes the dropdown unusable. How can I disable or just remove the dropdown completely so it works like the old WinForms time picker? I saw this:

https://www.telerik.com/forums/how-to-remove-the-drop-down-button

but it's pretty old and I don't really want to mess with Expression Blend (if it even still exists?). I would also need the cursor keys and mouse wheel to increment/decrement the current value.

Or is it better to just try make the NumericUpDown work like a TimePicker?

Jason D
Top achievements
Rank 1
Veteran
 answered on 11 Mar 2020
5 answers
176 views

Hello,

As you can see in the attached screenshot, the first row has not a top red line.

Vicky
Telerik team
 answered on 11 Mar 2020
3 answers
147 views

Created the visual studio project with
telerik:RadRichTextBoxRibbonUI and System.Windows.Controls.RichtextBox

How can we communicate between above two components.

Dimitar
Telerik team
 answered on 11 Mar 2020
1 answer
131 views

Created one Visual studio project with telerik Richtextbox
Trying to compose in Telugu language using IME keyboard but the cursor is jumping ahead.

The following problem is solved for Devanagari script.

Please go thru the following link for your reference,
https://www.telerik.com/forums/silverlight-richtextbox-unicode-issue 

Dimitar
Telerik team
 answered on 11 Mar 2020
1 answer
204 views

So I have the honor to write the first post on this board. :-)

I like the new TaskBoard component. What I would like to do is show the tags together with an icon and I can't find a solution for that. Also I can't find a way to define the colour of the tags. Is there a template that I can modify? Any hint would be nice!

Regards
Heiko

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Mar 2020
1 answer
279 views
I'm working on WPF app with RadTabControl as Prism region and I don't find solution that fully works as expected.
I have region adapter for tab control, close buttons on tabs, but if I close tab, my region adapter doesn't dispose view model attached by Prism to tab item, it is not garbage collected, so I have memory leaks. 
Can someone attache sample project that works?
Vladimir Stoyanov
Telerik team
 answered on 10 Mar 2020
1 answer
432 views

Hi

 

I have a 3 monitor setup.

When my application opens on the first monitor the splash screen is shown on the second one.

Is there a way to control this?

 

/Flemming

Vladimir Stoyanov
Telerik team
 answered on 10 Mar 2020
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?