Telerik Forums
UI for WPF Forum
3 answers
138 views
How to ?

I'm Using Ok But It's Impossible.

OK                                                  
Cancel                                                                               Cancel
DataForm_MoveCurrentToFirst First
DataForm_MoveCurrentToPrevious Previous
DataForm_MoveCurrentToNext Next
DataForm_MoveCurrentToLast Last
DataForm_AddNew Add
DataForm_BeginEdit Edit
DataForm_Delete Delete

Dimitrina
Telerik team
 answered on 08 Oct 2013
1 answer
96 views
Hi,
sorry about the silly question.. but, How can I change the verticalAlignment on the  DisplayName property?
Thanks

<telerik:PropertyDefinition Binding="{Binding DateTo}"
                                                            OrderIndex="4"
                                                            GroupName="Filters"
                                                            DisplayName="Date To"
                                                            />
Ivan Ivanov
Telerik team
 answered on 08 Oct 2013
1 answer
112 views
Hello,
I use the Telerik WPF Controls as a trial with a Visual Studio 2012 Professional. So far it's me, unfortunately, not been able to create a simple application window.

I use the RadWindow control. But whenever I run the program, it will run in a separate window that displays below a deactivated navigationbar.

How can I display only the pure application window without this will be shown again in a window?
Kalin
Telerik team
 answered on 07 Oct 2013
3 answers
215 views
We are using version 2009.1.526.35 of the GridView control. Because of our project timeline and for regression reasons, we are unable to upgrade to the newest version of RadGridView at this time. However, it is on our list of tasks once it becomes feasible. We are experiencing an issue where the RadGridView hangs and pegs the CPU at 50% forever in certain circumstances. We would like to know the following:

1) Is this issue fixed in the current version of the control.
2) Is there a workaround for the version of the control we have.

The issue is triggered when there are just enough items in the grid that the grid is full and the last item is even clipped slightly by the bottom of the grid. There are no vertical scrollbars yet. Our testers found the problem by opening a page with a grid that had enough items to produce a scrollbar. Then, when you maximize the screen and the result is a grid that is just full without scrollbars, the application hangs and the CPU is pegged at 50%. We isolated this to the grid by deleting one row from the database and observing the problem no longer occurs. It is the exact number of items in the grid causing the issue. Could you answer our 2 questions listed above? Thanks.
rthorat
Top achievements
Rank 1
 answered on 07 Oct 2013
0 answers
303 views

I have a enum type, and want to display it in column with image, and filter it with description. I directly convert enum type to image path, and can display it in column, but can not filter it. I convert enum type to a class with properties, such as image path, description, but can not binding it correctly.

<Window x:Class="TrafficLight.MainWindow"
        xmlns:local="clr-namespace:TrafficLight" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="600">
 
    <Window.Resources>
        <local:LightConvert x:Key="Converter"/>
        <local:LightStringConvert x:Key="StringConverter"/>
        <local:LightWrpper x:Key="LightWrpper"/>
 
        <DataTemplate x:Key="ImageCellTemplate">
            <Image Height="16" Width="16" HorizontalAlignment="Center" Source="{Binding SouthNorthLight, Converter={StaticResource ResourceKey=Converter}}"/>
        </DataTemplate>
 
        <DataTemplate x:Key="LightListTemplate">
            <StackPanel Orientation="Horizontal">
                <Image HorizontalAlignment="Center" VerticalAlignment="Center" Height="16" Width="16" Source="{Binding ImagePath}"/>
                <TextBlock Text="{Binding Description}" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="5,0,2,0" />
            </StackPanel>
        </DataTemplate>
         
    </Window.Resources>
 
    <Window.DataContext>
        <local:LightViewModel/>
    </Window.DataContext>
    <Grid>
 
        <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding LightCollection}">
            <telerik:RadGridView.Columns>
                 
                <telerik:GridViewDataColumn Header="Location"
                                            IsReadOnly="True"
                                            DataMemberBinding="{Binding Location}"/>
 
                <telerik:GridViewImageColumn Header="South North Light"
                                             IsReadOnly="True"
                                             ImageHeight="16"
                                             ImageWidth="16"
                                             ImageStretch="Uniform"
                                             IsFilterable="False"
                                             DataMemberBinding="{Binding SouthNorthLight, Converter={StaticResource StringConverter}}"/>
 
                <telerik:GridViewComboBoxColumn Header="South North Light"
                                                IsFilterable="False"
                                                FilterMemberPath="Description"
                                                DataMemberBinding="{Binding SouthNorthLight, Converter={StaticResource Converter}}"
                                                ItemsSource="{Binding Path=LightWrpperList, Source={StaticResource LightWrpper}}"
                                                ItemTemplate="{StaticResource LightListTemplate}"/>
 
                <telerik:GridViewImageColumn Header="East West Light"
                                             IsReadOnly="True"
                                             ImageHeight="24"
                                             ImageWidth="24"
                                             ImageStretch="Uniform"
                                             FilterMemberPath="Description"
                                             SortMemberPath="Description"
                                             DataMemberBinding="{Binding EastWestLight, Converter={StaticResource Converter}}">
                    <telerik:GridViewImageColumn.CellTemplate>
                        <DataTemplate>
                            <Image HorizontalAlignment="Center" Source="{Binding Path=ImagePath}"/>
                        </DataTemplate>
                    </telerik:GridViewImageColumn.CellTemplate>
                </telerik:GridViewImageColumn>
 
                <telerik:GridViewComboBoxColumn Header="South North Light"
                                                IsFilterable="True"
                                                FilterMemberPath="Description"
                                                DataMemberBinding="{Binding SouthNorthLight, Converter={StaticResource Converter}}"
                                                CellTemplate="{StaticResource ImageCellTemplate}"
                                                ItemsSource="{Binding Path=LightWrpperList, Source={StaticResource LightWrpper}}"
                                                ItemTemplate="{StaticResource LightListTemplate}"/>
                 
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
</Window>
 
 
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows.Data;
 
namespace TrafficLight
{
    public enum Light
    {
        Green,
        Red,
        Yello,
    }
 
    public class Lights
    {
        public Light SouthNorthLight { get; set; }
 
        public Light EastWestLight { get; set; }
 
        public string Location { get; set; }
    }
 
    public class LightViewModel
    {
        public ObservableCollection<Lights> LightCollection { get; private set; }
 
        public LightViewModel()
        {
            LightCollection = new ObservableCollection<Lights>();
 
            LightCollection.Add(new Lights() { SouthNorthLight = Light.Green, EastWestLight = Light.Red, Location = "The 5th St" });
            LightCollection.Add(new Lights() { SouthNorthLight = Light.Red, EastWestLight = Light.Green, Location = "St John Rd" });
            LightCollection.Add(new Lights() { SouthNorthLight = Light.Yello, EastWestLight = Light.Red, Location = "Sents Rd" });
        }
    }
 
    public class LightWrpper
    {
 
        public static List<LightWrpper> LightWrpperList { get; private set; }
 
        public static LightWrpper Red { get; private set; }
        public static LightWrpper Green { get; private set; }
        public static LightWrpper Yello { get; private set; }
 
        static LightWrpper()
        {
            Red = new LightWrpper() { Light = Light.Red, ImagePath = "Images/Red.png", Description = "Red Light On" };
            Green = new LightWrpper() { Light = Light.Green, ImagePath = "Images/Green.png", Description = "Green Light On" };
            Yello = new LightWrpper() { Light = Light.Yello, ImagePath = "Images/Yello.png", Description = "Yello Light On" };
 
            LightWrpperList = new List<LightWrpper>();
            LightWrpperList.Add(Red);
            LightWrpperList.Add(Green);
            LightWrpperList.Add(Yello);
        }
 
        public Light Light { get; private set; }
        public string ImagePath { get; private set; }
        public string Description { get; private set; }
    }
 
    [ValueConversion(typeof(Light), typeof(LightWrpper))]
    public class LightConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return LightWrpper.Yello;
            }
 
            var light = (Light)value;
            switch (light)
            {
                case Light.Green:
                    return LightWrpper.Green;
                case Light.Red:
                    return LightWrpper.Red;
                default:
                    return LightWrpper.Yello;
            }
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return Light.Yello;
            }
 
            var light = (LightWrpper)value;
            switch (light.Light)
            {
                case Light.Green:
                    return Light.Green;
                case Light.Red:
                    return Light.Red;
                default:
                    return Light.Yello;
            }
        }
    }
 
    [ValueConversion(typeof(Light), typeof(string))]
    public class LightStringConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var light = (Light)value;
            switch (light)
            {
                case Light.Green:
                    return "Images/Green.png";
                case Light.Red:
                    return "Images/Red.png";
                default:
                    return "Images/Yello.png";
            }
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
 
}






Yu
Top achievements
Rank 1
 asked on 07 Oct 2013
6 answers
121 views
Hi I have notebook with touch sreen (win 8) and when I touch and move with my finger above RadTreeViewItem (or RadTreeView) my application crash. I do not have implemented DragAndDrop.
Jiri
Top achievements
Rank 1
 answered on 07 Oct 2013
5 answers
102 views
Hi
I created a pivotgrid and this my localdatasourceprovider.
How can I change the row order? For example by another field "Sequential"..
Now it orders by "CategoryDescription"
Thanks

 <pivot:LocalDataSourceProvider x:Key="LocalDataProvider" >
            <pivot:LocalDataSourceProvider.RowGroupDescriptions>                 <pivot:PropertyGroupDescription PropertyName="CategoryDescription" CustomName="CategoryDescription" />                             </pivot:LocalDataSourceProvider.RowGroupDescriptions>             <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>                 <pivot:PropertyGroupDescription PropertyName="BreakdownStepContextCode"></pivot:PropertyGroupDescription>                             </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>             <pivot:LocalDataSourceProvider.AggregateDescriptions>                 <pivot:PropertyAggregateDescription PropertyName="CompletedStepsCount" CustomName="P" />             </pivot:LocalDataSourceProvider.AggregateDescriptions>         </pivot:LocalDataSourceProvider>

Rosen Vladimirov
Telerik team
 answered on 07 Oct 2013
11 answers
747 views
Greetings,

I have recently upgraded to the newest RAD Controls for WPF and discovered problem with Drag & Drop. It is not working after upgrade.
I have made small project to verify that problem is not in our code and when I use dlls of version "2012.3.1129.40" it is working without problem. When I use dlls of version 2013.2.0611.40 it is not working. Could you help me out?

In attachement I sent a small WPF project.  You can see that in xaml I aneble dragging on each item in RadTreeView and in the code you can see that I add handlers for Drag & Drop operations. When drop occurs I add info about it to the listbox. For old dlls it works but for new ones it does not.

Xaml:
<Window x:Class="TelerikWpfApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Grid>
<telerik:RadTreeView Height="250" HorizontalAlignment="Left" Margin="10,10,0,0" Name="radTreeView1" VerticalAlignment="Top" Width="150">
<telerik:RadTreeView.Resources>
<Style TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True"></Setter>
</Style>
</telerik:RadTreeView.Resources>
<telerik:RadTreeViewItem DropPosition="Inside" Header="Item 1" />
<telerik:RadTreeViewItem DropPosition="Inside" Header="Item 2" />
<telerik:RadTreeViewItem DropPosition="Inside" Header="Item 3" />
<telerik:RadTreeViewItem DropPosition="Inside" Header="Item 4" />
<telerik:RadTreeViewItem DropPosition="Inside" Header="Item 5" />
</telerik:RadTreeView>
<ListBox Height="287" HorizontalAlignment="Left" Margin="166,12,0,0" Name="listBox1" VerticalAlignment="Top" Width="134" />
</Grid>
</Window>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Telerik.Windows.Controls;
using Telerik.Windows.DragDrop;

namespace TelerikWpfApplication
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();

DragDropManager.AddDragInitializeHandler(radTreeView1, OnDragInitialize, true);
DragDropManager.AddDragEnterHandler(radTreeView1, OnDragEnter, true);
DragDropManager.AddDropHandler(radTreeView1, OnDrop, true);
}

private void OnDragInitialize(object sender, DragInitializeEventArgs e)
{
// get zone
RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;
object data = item.Item;

e.AllowedEffects = DragDropEffects.Move;
}

private void OnDragEnter(object sender, Telerik.Windows.DragDrop.DragEventArgs args)
{

}

private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs args)
{
listBox1.Items.Add("Dropped to: " + args.Source.ToString());
}
}
}
Dušan
Top achievements
Rank 1
 answered on 07 Oct 2013
4 answers
310 views
Hi,

I am trying to use dynamic BackstageItems. But how can i define a correct DataTemplate where all Bindings work?

Her my code...
<telerik:RadRibbonWindow 
    x:Class="WpfRibbonBackstage.MainWindow"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
 
        <Grid.Resources>
 
            <DataTemplate x:Key="BackstageSmallButtonTemplate">
 
                <telerik:RadRibbonBackstageItem Header="{Binding Text}"
                                                IsDefault="{Binding IsDefault}"
                                                IsSelectable="{Binding IsSelectable}"
                                                IsGroupSeparator="{Binding IsGroupSeparator}"
                                                CloseOnClick="{Binding CloseOnClick}"/>
 
            </DataTemplate>
 
        </Grid.Resources>
 
        <telerik:RadRibbonView   x:Name="Ribbon"
                                Title="Test"
                                ApplicationButtonContent="FILE"
                                ApplicationButtonVisibility="Visible"
                                 >
             
            <telerik:RadRibbonTab Header="Home"></telerik:RadRibbonTab>
 
            <telerik:RadRibbonView.Backstage>
 
                <telerik:RadRibbonBackstage ItemsSource="{Binding BackstageItems}"
                                            ItemTemplate="{StaticResource BackstageSmallButtonTemplate}"
                                            SelectedItem="{Binding SelectedBackstageItem}">
 
                </telerik:RadRibbonBackstage>
 
            </telerik:RadRibbonView.Backstage>
 
        </telerik:RadRibbonView>
 
 
    </Grid>
</telerik:RadRibbonWindow>

The Header binding works, but all other not!
Waht is wrong?


Thomas
Top achievements
Rank 1
 answered on 07 Oct 2013
1 answer
138 views
I've recently undertaken a project using an older version of RadControls and I'm really struggling in my attempt to customize the 3d pie chart. For reference, the developer machine has the Q1 2011 RadControls for WPF installed on it.

What I'm trying to do is style the item labels in some way that they don't overlap, or barring that, add some customized tooltips that display the label data. I've done a ton of research and playing around with custom styles, but:

A: 3d Pie labels/tooltips on this version appear to be Un-stylable or
B: I'm way off on attempts to restyle.

The latter seems unlikely since I was able to restyle the labels on a 2d pie chart using the same static resource, but I haven't found any documentation explicitly stating that the labels in this chart are not able to be styled.

Is there any older documentation available that could help me figure this out?

Also, I'm using MVVM format so code behind solutions are not very practical.
Evgenia
Telerik team
 answered on 07 Oct 2013
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?