Telerik Forums
UI for WPF Forum
1 answer
320 views
I recently downloaded the free version of the WPF controls. Is there any significant difference between the free version and the version that you can purchase from Telerik?
Vlad
Telerik team
 answered on 08 Jul 2009
4 answers
92 views
is it possible to have non-rectangular tabs, which also overlap, like the ones in VS2008?

Steve
SteveL
Top achievements
Rank 2
 answered on 07 Jul 2009
7 answers
200 views
The online documentation for the gridview doesn't seem comprehensive.
Is there any documentation that cover all the details?

Thanks
L uke
Top achievements
Rank 1
 answered on 07 Jul 2009
1 answer
297 views
I can not seem to figure out how to add an icon to the RadTabItem.Header. To tell you the truth I couldn't figure out hwo to add one to the Standard windows TabControl either ;). I can easily do it in XAML, but I need to do it in the code behind for some dynamically created tabs.

Any pointer?

Thanks!
Miroslav
Telerik team
 answered on 07 Jul 2009
2 answers
176 views
I'd like to modify the template of the DatePicker but I'm not sure exactly the best way to go about it.  I know that currently if the user clicks on the already selected date then it sets the SelectedDate to null, but what I'd like is a button on the outside of the DatePicker that can be clicked to set the date to null.

So the control would look like

<Textbox with date><Button to bring up calendar><Button to set value to null>

The button would only be clickable when there is a date of course.

I'm considering just putting together a UserControl that has this functionality, but I was wondering if there's an easy way to do it using a DataTemplate.
Kaloyan
Telerik team
 answered on 06 Jul 2009
2 answers
127 views
If i have a trigger on IsEnabled in my LabelProperties style an bind that to a DependecyProperty in my ViewModel the Trigger will not 'fire' when i set the DataContext after InitilizeComponent only if i set it before. The problem with this is that IsEnable will  not work if i set the DataContext in xaml on a UserControl containing the gauge. I think that this is a faulty behavior because Minor/MajorTickStyle works if i set the DataContext after InitilizeComponent.

well this thread is useless without code so...

my usercontrol

<UserControl x:Class="WpfTest_Telerik.UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    Width="300" Height="300">  
    <UserControl.Resources> 
 
        <Style x:Key="MajorTickStyle" TargetType="{x:Type telerik:TickProperties}">  
            <Setter Property="Background" Value="White" /> 
            <Style.Triggers> 
                <Trigger Property="IsEnabled" Value="False">  
                    <Setter Property="Background" Value="Black" /> 
                </Trigger> 
            </Style.Triggers> 
        </Style> 
 
        <Style x:Key="LabelProperties" TargetType="{x:Type telerik:LabelProperties}">  
            <Setter Property="Foreground" Value="White" /> 
            <Style.Triggers> 
                <Trigger Property="IsEnabled" Value="False">  
                    <Setter Property="Foreground" Value="Black" /> 
                </Trigger> 
            </Style.Triggers> 
        </Style> 
 
    </UserControl.Resources> 
    <Grid> 
        <telerik:RadGauge> 
            <telerik:RadialGauge> 
                <telerik:RadialScale> 
                    <telerik:RadialScale.MajorTick> 
                        <telerik:TickProperties IsEnabled="{Binding Path=IsActive}" Style="{StaticResource MajorTickStyle}"/>  
                    </telerik:RadialScale.MajorTick> 
                    <telerik:RadialScale.Label > 
                        <telerik:LabelProperties IsEnabled="{Binding Path=IsActive}"  Style="{StaticResource LabelProperties}" /> 
                    </telerik:RadialScale.Label> 
                </telerik:RadialScale> 
            </telerik:RadialGauge> 
        </telerik:RadGauge> 
    </Grid> 
</UserControl> 

code behind

using System.Windows.Controls;  
 
namespace WpfTest_Telerik  
{  
    /// <summary>  
    /// Interaction logic for UserControl1.xaml  
    /// </summary>  
    public partial class UserControl1 : UserControl  
    {  
        public UserControl1()  
        {  
            // will work  
            //DataContext = new UserControl1ViewModel();  
            InitializeComponent();  
            // will not work  
            DataContext = new UserControl1ViewModel();  
        }  
    }  

my viewmodel

using System;  
using System.Windows;  
using System.Timers;  
using System.Windows.Threading;  
 
namespace WpfTest_Telerik  
{  
    public class UserControl1ViewModel : DependencyObject  
    {  
        private readonly Dispatcher _currentDispatcher;  
 
        public UserControl1ViewModel()  
        {  
            _currentDispatcher = Dispatcher.CurrentDispatcher;  
 
            var timer = new Timer(2000);  
            timer.Elapsed += TimerElapsed;  
            timer.Start();  
        }  
 
        void TimerElapsed(object sender, ElapsedEventArgs e)  
        {  
            Action x = () => IsActive = !IsActive;  
 
            _currentDispatcher.BeginInvoke(x);  
        }  
 
        public bool IsActive  
        {  
            get { return (bool)GetValue(IsActiveProperty); }  
            set { SetValue(IsActiveProperty, value); }  
        }  
 
        // Using a DependencyProperty as the backing store for IsActive.  This enables animation, styling, binding, etc...  
        public static readonly DependencyProperty IsActiveProperty =  
                DependencyProperty.Register("IsActive"typeof(bool), typeof(UserControl1ViewModel), new UIPropertyMetadata(false));  
    }  
Robert
Top achievements
Rank 1
 answered on 06 Jul 2009
1 answer
370 views
Hi Guys

I am very new to this WPF and Telerik. what i need is a very simple example of now get images to display in my grid. This my XAML code

<telerik:RadGridView Name="RadGridView1" Width="200" AutoGenerateColumns="False" >

 

 

<telerik:RadGridView.Columns>

 

 

 

 

<telerik:GridViewDataColumn DataType="Image" IsSortable="False" IsFilterable="False" UniqueName="ImageFile" HeaderText="Picture" Width="60" />

 

 

 

 

<telerik:GridViewDataColumn UniqueName="ShortName" HeaderText="Name" />

 

 

 

 

</telerik:RadGridView.Columns>

 

 

 

 

</telerik:RadGridView>

 

 

 

Then at runtime i bind to the grid with the following code

 

 

 


Dim Teammembers As IntyLibrary.TeammemberCollection = IntyLibrary.TeammemberCollection.GetTeamMembers

 

 

 

RadGridView1.ItemsSource = TeamMembers

I get all the data fine in the grid but i get the path name of the images, i need the grid to display the image.

 

 

Vlad
Telerik team
 answered on 06 Jul 2009
2 answers
279 views
I'm using a MVVM pattern to bind the column to a property on a viewmodel. When I enable grouping the combo boxes will now longer allow change of values. Also, the masked text box loses the text on grouping and sorting. Also on grouping a checkbox, if I give it a unique name it will not let me edit it, but if I don't give it a unique name I can't group on it.

FYI: After grouping then remove the grouping, the combo box property value is called 4 times on first select, then called twice on each change after that. Either case the property defaults back to the orignal value when control was created.

 Is it just me, or ithese real issues?

            <telerik:RadGridView  
                Name="RadGridPhoneList" HorizontalAlignment="Left"  
                IsReadOnly="True" 
                telerik:StyleManager.Theme="Simple"  
                RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"   
                ColumnsWidthMode="Fill"  
                CanUserFreezeColumns="False" 
                ItemsSource="{Binding Path=PersonPhoneViewModels}" 
            > 
                <telerik:RadGridView.Columns> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Phone Number"  
                        UniqueName ="PhoneNumber" 
                    > 
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <telerik:RadMaskedTextBox 
                                    x:Name="TextBoxNumber"  
                                    Mask="(###) ### - ####"  
                                    Width="100" 
                                    Value="{Binding Path=PhoneNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"             
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Extension"  
                        DataMemberPath="Extension" 
                        UniqueName ="Extension" 
                    /> 
                     
 
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Type"  
                        UniqueName ="PhoneType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneTypeOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                     
                     
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Provider"  
                        UniqueName ="PhoneProviderType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneProviderOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneProviderType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                                        
            <!-- allows gouping, but not edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"  
                        UniqueName="IsDefault"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
            <!-- does not allows gouping, but can edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Note"  
                        IsCustomSortingEnabled="True"  
                        IsFilterable="True"  
                        DataMemberPath="Note">                         
                    </telerik:GridViewDataColumn> 
                     
                </telerik:RadGridView.Columns> 
 
            </telerik:RadGridView> 
 




Pavel Pavlov
Telerik team
 answered on 03 Jul 2009
1 answer
179 views

 I want to be able to change the hierarchy in a treeview based on user request.  For example,  I have a List<vehicles> like this (below) that I want to show in a TreeView.

Ford       Red        2-door  2002
Ford       Blue       2-door  2003
Jeep      Silver     4-Door  2005
Toyota  Gray      4-door  2008
Jeep      White    Hatch    2004
Toyota  White    2-door  2001

No big deal until I want to change the grouping, that is, allow make or color or #-doors or year to be the first level in the hierarchy.  I don’t see any way to parameterize the binding source in the HierarchicalDataTemplate or use code-behind.  What I’d like to end up with is a treeview like this:

                + Ford
                                Red
                                Blue
                + Jeep
                                Silver
                                White
                +Toyota
                                Gray
                                White

Or, by a user selection, regroup the treeview to this:

                +Red
                                Ford
                +Blue
                                Ford
                + Silver
                                Jeep
                +Gray
                                Toyota
                +White
                                Jeep
                                Toyota

All the data is in a Collection (objects of class vehicle in my example) and ideally, I’d like to be able to group and sort that list using LINQ (perhaps).  Any change of implementing this with TreeView?

Valentin.Stoychev
Telerik team
 answered on 03 Jul 2009
5 answers
329 views
Hi,

I have a requirement to refresh the carousel control every minute with data. I am using a custom entity to populate the carousel with data and have defined a data template for the same.
I have managed to refresh the carousel - however, after refresh the same item should be at the centre of the carousel as before the refresh. I am using the below code to do the bring the item into view, but it doesnt seem to work.

Telerik.Windows.Data.

Record objRec = rdcTasks.SelectedRecord;

 

RadCarouselPanel panel = this.rdcTasks.FindCarouselPanel(); 
this.rdcTasks.ItemsSource = this.CreateItemSource();
panel.BringDataItemIntoView(objRec);

In debug mode when I check the value of objRec, it shows the correct data record. However, it does not bring it to the centre. 

Also, I need to set a different colour for the data record at the centre of the carousel. How can I achieve this?

Thanks in advance.

 

 

 

Milan
Telerik team
 answered on 03 Jul 2009
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?