Telerik Forums
UI for WPF Forum
1 answer
239 views

Hi everybody
I need to list a series of tools in a radcombobox where each color has a color associated with it.
The class of the tool is:
  public partial class ToolType
     {
         public int ToolTypeId {get; set; }
         public string Description {get; set; }
         public int Color {get; set; }
         public RecordState RecordState {get; set; }
         public string MachineryCode {get; set; }
         public int OwnerId {get; set; }

     }
where necessarily I had to transform the color to integer to be able to memorize it in SQL.

So I created a class to be able to use it in my RadCombobox to highlight on each item the color associated with my tool.

  public partial class ToolTypeForCmb
     {
         public int ToolTypeId {get; set; }
         public string Description {get; set; }
         public Brush Color {get; set; }
     }

So in my Xaml I created the RadCombobox:

 

<telerik:RadComboBox x:Name="cmbToolTypeForLoad" ItemsSource="{Binding ToolTypeForCmb}" DisplayMemberPath="Description"  Margin="46,29,0,0"      HorizontalAlignment="Left" VerticalAlignment="Top" Width="421"  Height="48"  >
                    <ComboBoxItem>
                        <Style TargetType="ComboBoxItem">
                            <Setter Property="Background" Value="{Binding Color}"/>
                        </Style>
                    </ComboBoxItem>
 </telerik:RadComboBox>

 

 

 

 

 List<ToolType> toolTypes = toolTypeService.GetAll(MachineryCode);
            List<ToolTypeForCmb> toolTypeForCmb = new List<ToolTypeForCmb>();
            foreach (ToolType toolType in toolTypes)
            {
                ToolTypeForCmb ttfcmb = new ToolTypeForCmb();
                ttfcmb.Color = UtilityService.ConvertIntToColorBrush(toolType.Color);
                ttfcmb.Description = toolType.Description;
                ttfcmb.ToolTypeId = toolType.ToolTypeId;
                toolTypeForCmb.Add(ttfcmb);
            }
            cmbToolTypeForLoad.ItemsSource = toolTypeForCmb;

 

 

 

 

Gianfranco
Top achievements
Rank 1
 answered on 29 Oct 2019
2 answers
269 views

Is possible add a custom sort for children? Or sort just parents?

Omar
Top achievements
Rank 1
 answered on 28 Oct 2019
1 answer
98 views

It happens only on some of our client's computers even for the simplest demo. I can't repeat it in development  environment.

The OS is Windows 7 x64, .net framework version is 4.7.2.

The operation triggers the error is just dropping down and select items. 

I think the problem happens when rendering the selectionbox.

Dilyan Traykov
Telerik team
 answered on 28 Oct 2019
6 answers
288 views
Hello.
My problem is that i cannot move selected item when click up/down keyboard button like:
   private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Down)
            ...
}

Is there any way to move selection when I press up/down button?

Thanks in advance,
Regards
Dilyan Traykov
Telerik team
 answered on 28 Oct 2019
2 answers
114 views

Hello,

I have a GridView with a DataPager for a VirtualQueryableCollectionView. The Collection View refreshes data on ItemLoading event from a paginated WebService.

If I apply a filter the pagination disappears, it keeps only the first page, with the right data (the WebService manages filters too).

What could cause this unexpected behavior?

Thank you in advance.

Matteo

Vladimir Stoyanov
Telerik team
 answered on 28 Oct 2019
6 answers
987 views

I noticed that the SelectionChanged event fires the first time a selection is made, but not on subsequent selections.

1) Start with no selections

2) Select an item.  SelectionChanged gets fired

3) Select more items.  SelectionChanged does not fire.

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 28 Oct 2019
1 answer
132 views

Hi,

I am trying to use "pinned rows" as well as a "row details" button/column but the two don't appear to be compatible when a row is pinned. Is this correct/standard behaviour?

Many thanks.

 

M.Young

Dimitar Dinev
Telerik team
 answered on 28 Oct 2019
1 answer
301 views
I'm trying to change the highlight color when a user hover's over the tile with their mouse. the WPF Demo Tiles have a border highlight and not a complete tile highlight on a MouseOver event. How exactly does one achieve this?
Vladimir Stoyanov
Telerik team
 answered on 28 Oct 2019
4 answers
272 views

Hello,

In some uses, they are not useful.

Petar Mladenov
Telerik team
 answered on 28 Oct 2019
3 answers
138 views

Hello,

In the SyntaxEditor, When I press Ctrl+F, enter text and click "Find All", nothing happens, even if the text is in the source file.

Dilyan Traykov
Telerik team
 answered on 25 Oct 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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?