Telerik Forums
UI for WPF Forum
1 answer
147 views
Here's my situation (simplified):  I want to bind a collection of user controls to a combo box, but I only want to see the Name of the user controls displayed in the list and displayed as the selected item.

So I have essentially done the following in code: 
var collection = new ObservableCollection<MyUserControl>();
// Add some items to collection here
myRadComboBox.ItemsSource = collection;

And my XAML looks something like the following:
<telerik:RadComboBox SelectionBoxTemplate="{StaticResource MyUserControlDataTemplate}" ItemTemplate="{StaticResource MyUserControlDataTemplate}" />

With the static resource defined as...
<DataTemplate x:Key="MyUserControlDataTemplate" >
    <TextBlock Text="{Binding Name}"/>
</DataTemplate>

And when I run the app, and select an item from the drop down, the visual content of the user control is what shows up in the selection box -- not the name.  It appears that when the data bound to ItemsSource is a collection of UserControls, the specified ItemTemplate will be honored, but not the SelectionBoxTemplate.  I have tried to simplify this as much as possible, but I just cannot get it to work.

Fortunately, when I set the ItemsSource property of my RadComboBox to a collection of some other object which had a "Name" property (without making any other changes to the XAML), I got exactly what I expected to see -- the content of the object's Name property showed up in the selection box.

Please tell me that what I'm seeing is not the expected behavior when binding to a collection of user controls!
Yana
Telerik team
 answered on 18 Oct 2011
1 answer
350 views
Hi,

My requirement is to set the visibility of RadTreeViewItem. For this sample shared at the http://www.telerik.com/community/forums/wpf/treeview/radtreeviewitem-visibility.aspx post helped me. I modified this sample to incorporate my requirement. I added one more property in BusinessItem for Visibility and bind it with the RadTreeViewItem. But problem is that RadTreeViewItem shows expander button (on left side) even if all its children are set to Collapsed.
I also need to hide expander button for a RadTreeViewItem if all its children are collapsed.


Thanks and Regards,
Bala,
Petar Mladenov
Telerik team
 answered on 18 Oct 2011
1 answer
107 views
Hello,

Is it possible to disable spelling check in print document?

I prepare data by RadDocument and assign to RadRichTextBox(RadRichTextBox.1Document).
and then give it to print.

now i select Cute PDF Writer rather then selecting Printer.

It gives Rad under line(spel error) in a some of content.


Interesting thing is that it gives on some of pages only. i.e. page no. 4,7,9 etc....

Help me!!

Thanks in advance!!
Iva Toteva
Telerik team
 answered on 18 Oct 2011
1 answer
105 views
I have an InformationLayer that contains points through a LocationCollection property in a view model. When I call the Clear() method on the LocationCollection, the lines on the map don't go away (even if I zoom in or out). My InformationLayer XAML looks like the following. As mentioned, MyPolyline is a LocationCollection:

<telerik:InformationLayer>
    <telerik:MapPolyline Points="{Binding MyPolyline}" Fill="Transparent" Stroke="Teal" StrokeThickness="1" />
</telerik:InformationLayer>

It appears I'm running version 2011.2.920.40. I have confirmed the MyPolyline.Count property is 0 after calling the Clear() method, but as mentioned, the lines on the map don't go away.
Andrey
Telerik team
 answered on 18 Oct 2011
1 answer
263 views
Based on a recent response, I now understand that you use the WPF Image class for rendering the underlying image specified in the UriImageProvider. However, on large images I run into performance issues. Normally, I can use something like: 

RenderOptions.SetBitmapScalingMode(oImage, BitmapScalingMode.LowQuality)

But I am not sure how to do this when working with the UriImageProvider.

Thanks,
Seth

Andrey
Telerik team
 answered on 18 Oct 2011
3 answers
196 views
when a gridview's vertical scrollbar is visible, if you just scroll to the bottom and clicked some grouping headers to collapse or expand the group as you will, after clicked some times, there would be a blank margin bettwen the header row and the first group, sometimes the grouping indicator(the triangle shape) also in wrong status.
Vera
Telerik team
 answered on 18 Oct 2011
1 answer
104 views
Hi,

In my scenario, the user will select a list of slots by holding left mouse button and Ctrl key from the keyboard. Once the mouse button is up the selected slots will be set as working hours for the respective resource. And the background color of the slots should be changed to some other color. How to achieve this? Any Help...

Regards,
Jeyakumar
Pana
Telerik team
 answered on 18 Oct 2011
1 answer
210 views
hello, i have one main menuitem with submenuitems. how can i open / expand the submenu automatically on
right mouse click? the property issubmenuopen is readonly.
thanks for help ...


Yana
Telerik team
 answered on 18 Oct 2011
2 answers
226 views
Hi All,
I have inserted an image into RadRichTextBox...Can i access the path of this image, the location from where i inserted it? Is there some Property to access path of inserted image(s)?

Iva Toteva
Telerik team
 answered on 18 Oct 2011
1 answer
182 views
I am using SortDescriptor  for multi column sorting in TreeListView. My requirement is there is a context menu appearing on columns cells with option like "Sort Ascending" & "SortDescending". When user right click on any cell then i find the corresponding column and add to SortDescriptor. So now when i add the column to SortDescriptor then the column header is highlighted with a small tringle. This is working fine for multiple columns.

My Problem is suppose I have 10 columns out of which I have added three columns to SortDescriptor and now 3 column header are highlighted. This is done by right click context menu. Now user directly click on 4th column header to sort. In that case the previous 3 columns are removed from SortDescriptor automatically and the user clicked column only highlighted. In my case I need to show all those 4 columns highlighted with 4 values in SortDescriptor. Please help me how I will be able to do.

Thanks
Ivan Ivanov
Telerik team
 answered on 18 Oct 2011
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?