Telerik Forums
UI for WPF Forum
1 answer
124 views
Hello Telerik team,

I am trying to bind my RowHeight property on the RadTreeListView to the FontSize. 

The reason I am doing this is that the user can change the FontSize at the application level using a setting on the menu and setting the RowHeight=20 (lets say) works for small fonts, but as the user increases the FontSize, the RowHeight hard set to 20 does not work well anymore as the content overflows

Any ideas on how to adjust the RowHeight property based on the FontSize property?

Thanks,
Kumar
Nick
Telerik team
 answered on 08 Feb 2012
3 answers
98 views
Hello,
I'm using Entity Framework to provide data to the treeview and I have a tree like this:
<CollectionViewSource x:Key="categoriesViewSource" d:DesignSource="{d:DesignInstance Model:Category, CreateList=True}" />

Assigning DataContext and so on, so everything works fine and correctly displays hierarchical data.

<telerik:RadTreeView HorizontalAlignment="Stretch" IsEditable="True" 
                                     ItemsSource="{Binding}" 
                                     Name="CategoryTreeView" 
                                     VerticalAlignment="Stretch" 
                                         SelectionChanged="CategoryTreeView_OnSelectionChanged" 
                                         KeyUp="CategoryTreeView_KeyUp"
                                         Edited="CategoryTreeView_Edited">
                        <telerik:RadTreeView.ItemEditTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding Name, Mode=TwoWay}"/>
                            </DataTemplate>
                        </telerik:RadTreeView.ItemEditTemplate>
                        <telerik:RadTreeView.ItemTemplate>
                            <HierarchicalDataTemplate ItemsSource="{Binding Subcategories}">
                                <TextBlock Text="{Binding Name}" />
                            </HierarchicalDataTemplate>
                        </telerik:RadTreeView.ItemTemplate>
                    </telerik:RadTreeView>

And I want to add root category programmatically. This is what I do:
Category parent = CategoryTreeView.SelectedItem == null 
                    ? null 
                    : _context.Categories.FirstOrDefault(
                            c => c.CategoryID == ((Category) CategoryTreeView.SelectedItem).CategoryID);
           
            Category newCategory = new Category
                                       {
                                           Name = "New category",
                                           ParentCategory = parent,
                                           ParentID = parent == null ? (Guid?) null : parent.CategoryID
                                       };
            _context.Categories.AddObject(newCategory);
Everything also works fine and child items are inserting to selected node. Works until I try to add a root node. When no selected item is available, this code won't work. New category adds to collection but never displays on tree. Can you please help me?
Thank you.
Petar Mladenov
Telerik team
 answered on 08 Feb 2012
2 answers
263 views
Hi,
  I need to create GridView with Header & other rows with rounded corners with shadow effect to it & also its should be flexible for all resolution. Please find the attached image for the requirement.

Thank U
Selva
Selva M
Top achievements
Rank 2
 answered on 08 Feb 2012
7 answers
214 views
I have the need to extend the DatePicker. I try to do this as I have done when I have extended the standard WPF controls (e.g. TextBox), but I have some problems. I can't make my extended control use its own template.

The control has this code:
public class DatePickerExtended : RadDatePicker
{
    static DatePickerExtended()
    {
        //Make sure the style in Themes/Generic.xaml is used.
        DefaultStyleKeyProperty.OverrideMetadata(typeof(DatePickerExtended), new FrameworkPropertyMetadata(typeof(DatePickerExtended)));
    }
}

Then I have a folder in the root called "Themes" which contains a file called "Generic.xaml". This XAML file contains the template that i want to apply to the control:
<Style TargetType="{x:Type local:DatePickerExtended}" x:Key="{x:Type local:DatePickerExtended}">
    <!-- A bunch of setters, including for the Template property. -->
</Style>

But the template is never applied. Instead the default template for the DatePicker is used, and I don't now how to replace this with my own...

So the question is: How can I make my custom control inheriting from DatePicker use a custom template?
prithu
Top achievements
Rank 1
 answered on 08 Feb 2012
2 answers
111 views
Hello,

Right now my grid is as this image shows: http://j.mp/xyQpwB, but I want to apply the color to all the "black bar".

I have the following code:

<Window x:Class="WpfApplication2.MainWindow"
        Title="MainWindow"
        Height="350"
        Width="525"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Window.Resources>
        <SolidColorBrush x:Key="GridView_HeaderBackground"  Color="LightBlue" />
        <Style TargetType="telerik:GridViewHeaderCell">
            <Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}"/>
        </Style>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView
            Name="radGridView1"
            ShowGroupPanel="False"
            RowIndicatorVisibility="Collapsed"
            >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                    Header="One"
                    Width="100"
                    />
            </telerik:RadGridView.Columns>         
        </telerik:RadGridView>
    </Grid>
</Window>

How can I achieve this?

Thanks,
Joan

Joan
Top achievements
Rank 1
 answered on 08 Feb 2012
1 answer
80 views
Hello
   I'm using RadGridView with RadContextMenu and commads. How can I determine which item/which row got the click for the context menu?
Dimitrina
Telerik team
 answered on 08 Feb 2012
1 answer
92 views
Hi, I have a chart in a view that I would like to use to display 3 different types of data in different instances of the view ...so in one instance the view may be displayed to show Commission and in another  scenario the view may be used to display "Volume"  etc... I have one view which represents the chart and a view model that is used to define the data item to display (among other things) ...I would basically like to set one of the item mappings at runtime (but obviously I am using MvvM).

This is my series definition
                        <telerik:SeriesMapping>
                            <telerik:SeriesMapping.SeriesDefinition>
                                <telerik:PieSeriesDefinition 
                                    LegendDisplayMode="DataPointLabel"
                                    ShowItemLabels="False" 
                                    ShowItemToolTips="True">
                                    <telerik:PieSeriesDefinition.Appearance>
                                        <telerik:SeriesAppearanceSettings ></telerik:SeriesAppearanceSettings>
                                    </telerik:PieSeriesDefinition.Appearance>
                                </telerik:PieSeriesDefinition>
                            </telerik:SeriesMapping.SeriesDefinition>
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="Commission" />
                            <telerik:ItemMapping DataPointMember="LegendLabel" FieldName="Symbol" />
                        </telerik:SeriesMapping>

and I was hoping to be able to do this (where the DataFieldName would be set in the view model depending on what that particular view instance should show  

<telerik:ItemMapping DataPointMember="YValue" FieldName="{Binding ElementName=radChart1, Path=DataContext.DataFieldName}" />

I get an error in Visual Studio, something about a null value. I have tried a number of  options for the binding but it doesn't seem to work so maybe it's not possible 


My question is should I be able to do this and if not do you have any suggestions on how to achieve what I am trying to do.

Thanks in advance
Yavor
Telerik team
 answered on 08 Feb 2012
1 answer
153 views
I am developing a WPF application to be able to run in remote desktop sessions or terminal server... In this scenario, the animations of my RadControl must be disabled in order to improve performance's application. I've tried many options but can not find ... What I can do? 

Other options that I thought: controlling the speed or framerate. 

Thanks in advance any help.

Regards, Pablo
Maya
Telerik team
 answered on 08 Feb 2012
1 answer
370 views
I'm trying to open a RadWindow in my Caliburn.Micro project, but I'm having trouble tying the dialog's View to the ViewModel.

In my ViewModel I open the dialog using:
var radWindowViewModel = new MyViewModel();
var radWindow = new RadWindow
    {
      Width = 400,
      Height = 150,
      Content = ViewLocator.LocateForModelType(typeof(MyViewModel), null, radWindowViewModel)
   };
radWindow.ShowDialog();

The RadWindow is opened, but in it is displayed: "Cannot find view for MyNameSpace.MyViewModel.

Alternatively, when I set RadWindow.Content the following way:
Content = ViewLocator.LocateForModel(radWindowViewModel, null, null)

then I see the correct View, but the View's DataContext is never set.

Does anyone know what I'm doing wrong?
Erik
Top achievements
Rank 1
 answered on 07 Feb 2012
3 answers
257 views
Do you agree that the icons/buttons in the RadRichText-Ribbon are more blurry then the icons/buttons in other Ribbons?
You also see the difference in the Teleriks WPF-Controls-Example - application.
Robert
Top achievements
Rank 1
 answered on 07 Feb 2012
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?