Telerik Forums
UI for WPF Forum
5 answers
222 views
Hi Team,'

Could you please help me out, How Can I create a Custom Editor for rendering the Items in the RadPropertyGrid, I want a behaviour similiar to ITypeEditor of Codeplex propertyGrid.

1) I load the property Grid with the objects that are created on runtime.
2) I want to  create a button  adjacent to  those properties in the propertyGrid which are boolean only.

Please help me out.
Ivan Ivanov
Telerik team
 answered on 04 Jun 2014
3 answers
556 views
On a Cartesian chart (bar chart,) with certain values, the vertical axis is not starting at zero. Attached are two images. One shows the values formatted by default. The other is the values formatted as an integer. Note that the chart formatted as an integer is repeating values. The repetition is the ultimate problem, but I think it is the result of another problem (the vertical axis not starting at zero) or at least they are related in some manner.

Any suggestions? 
Petar Marchev
Telerik team
 answered on 04 Jun 2014
2 answers
194 views
In Diagram, I need select multi-object and show a mouse right  context menu, and then copy or paste them. is there any template or style can help to do this
rui
Top achievements
Rank 1
 answered on 04 Jun 2014
1 answer
147 views
The below is my XAML code:

<Window x:Class="CrmActivityTimer.SetRegardingEntities"
        Title="SetRegardingEntities" Height="337" Width="439"
        DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Window.Resources>
        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowDrag" Value="True"/>
        </Style>
    </Window.Resources>
    <Grid>           
        <telerik:RadListBox ItemsSource="{Binding MetaData.RetrievedEntityMetaDatas}" HorizontalAlignment="Left" Height="190"
                            Margin="10,57,0,0" VerticalAlignment="Top" Width="182" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                            DisplayMemberPath="DisplayName.UserLocalizedLabel.Label" AllowDrop="True">
            <telerik:RadListBox.DragVisualProvider>
                <telerik:ListBoxDragVisualProvider />
            </telerik:RadListBox.DragVisualProvider>
            <telerik:RadListBox.DragDropBehavior>
                <telerik:ListBoxDragDropBehavior />
            </telerik:RadListBox.DragDropBehavior>
        </telerik:RadListBox>
        <telerik:RadListBox HorizontalAlignment="Left" Height="190" Margin="239,57,0,0" VerticalAlignment="Top" Width="182"
                            ItemsSource="{Binding MetaData.SavedEntityMetaDatas}" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                            DisplayMemberPath="DisplayName.UserLocalizedLabel.Label" AllowDrop="True">
            <telerik:RadListBox.DragVisualProvider>
                <telerik:ListBoxDragVisualProvider />
            </telerik:RadListBox.DragVisualProvider>
            <telerik:RadListBox.DragDropBehavior>
                <telerik:ListBoxDragDropBehavior />
            </telerik:RadListBox.DragDropBehavior>
        </telerik:RadListBox>  
    </Grid>
</Window>

I have followed the guide from the documentation at http://www.telerik.com/help/wpf/radlistbox-features-dragdrop.html, but it does not work. I can pickup an item from the left list, but I cannot drop it in the right list. It appears like on this image: http://i.stack.imgur.com/ADgPS.png. I also cannot reorder the ones on the left. it shows where I want to drop it, but it does not change anything. This is my code-behind:

public partial class SetRegardingEntities
    {
        public SetRegardingEntitiesMetaData MetaData { get; set; }
        public SetRegardingEntities()
        {
            MetaData = new SetRegardingEntitiesMetaData();
            InitializeComponent();
            IEnumerable<string> regardingTargets = CrmConnector.GetServiceAppointmentRegardingTargets();
            List<EntityMetadata> regardingmetadataList = new List<EntityMetadata>();
            foreach (string regardingTarget in regardingTargets)
            {
                regardingmetadataList.Add(CrmConnector.GetMetaDataForEntityName(regardingTarget));
            }
            MetaData.RetrievedEntityMetaDatas = regardingmetadataList.OrderBy(metadata => metadata.DisplayName.UserLocalizedLabel.Label).ToList();
        }
 
        private void btnSaveBetreft_onclick(object sender, RoutedEventArgs e)
        {
            List<string> regardingTargetsList = MetaData.SavedEntityMetaDatas.Select(savedEntityMetaData => savedEntityMetaData.LogicalName).ToList();
            SettingsSaver.SaveRegardingList(regardingTargetsList);
            ActivityTimerContainer activityTimerContainer = new ActivityTimerContainer();
            activityTimerContainer.Show();
            Close();
 
        }
    }
 
    public class SetRegardingEntitiesMetaData : INotifyPropertyChanged
    {
        private List<EntityMetadata> _retrievedEntityMetadatas;
        private List<EntityMetadata> _savedEntityMetadatas;
 
        public List<EntityMetadata> RetrievedEntityMetaDatas
        {
            get { return _retrievedEntityMetadatas; }
            set
            {
                if (_retrievedEntityMetadatas == value)
                {
                    return;
                }
                _retrievedEntityMetadatas = value;
                OnPropertyChanged();
            }
        }
 
        public List<EntityMetadata> SavedEntityMetaDatas
        {
            get { return _savedEntityMetadatas; }
            set
            {
                if (_savedEntityMetadatas == value)
                {
                    return;
                }
                _savedEntityMetadatas = value;
                OnPropertyChanged();
            }
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        private void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

The EntityMetaData object is from the Dynamics CRM 2011 SDK.
Kalin
Telerik team
 answered on 04 Jun 2014
1 answer
108 views
I have a TreeListView with a IsExpandedBinding to my view model (TwoWay).
Before I show the tree the first time, I expand a couple of nodes programmatically to show the tree initially in a state which is most useful for the customer. Due to UI virtualization I noticed that some of the nodes which I expanded programmatically get collapsed again which causes a not desired initial view of my tree. If I switch off UI virtualization, everything works as expected, BUT this is not acceptable since I will have up to 100.000 rows in my tree.
Any thoughts on how to solve this problem?

Thanks,
Markus
Yoan
Telerik team
 answered on 04 Jun 2014
1 answer
96 views
In my RadGridView I define common style for all items via RowStyle. Unfortunately, it works properly only for 1,3,5.... - ItemsSource's items with odd numbers.
What am I missing?
Aleksandr
Top achievements
Rank 1
 answered on 04 Jun 2014
1 answer
173 views
Hi,

we have an encoding problem in a autocompletenbox. As you can see on the attached file all "ä", "ü", "ö", "ß", are something like
a "?". We bind a txt-file to the autocompletebox.
using (StreamReader reader = new StreamReader(file, System.Text.Encoding.UTF8))
{
    string line;
    Int32 i = 0;
    while ((line = reader.ReadLine()) != null)
    {
        i++;
        string[] tmp = line.Split(';');
        vartab.Add(new Vartab(tmp[1], tmp[0], i));
    }
}

How can we solve this problem?

Thanks a lot
Best Regrads from Austria
Rene
Rosen Vladimirov
Telerik team
 answered on 03 Jun 2014
4 answers
241 views
I'm using DropDownButton in TabControl TabItem header with UserControl as DropDownContent.
When DropDown opens and i'm clicking on UserControl elements for example trying to resize OutlookBar or clicking other elements - DropDown always closes.
This problem does not show itself when using DropDownButton on clear Form as usual, but not when in TabItem header as Style.
Also i have Rotation problems. You can see that UserControl in upper ToggleButton is rotated like a crazy.

Here is Window xaml:
<Window
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="MainWindow"
    xmlns:me="clr-namespace:WpfApplication1"
    Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <Style x:Key="ClosableStyle" TargetType="telerik:RadTabItem">
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=TwoWay}" Grid.Column="0"></TextBlock>
 
                            <telerik:RadDropDownButton Width="30" Height="30" x:Name="MachinesKnopka3" Margin="5,0,0,0" DropDownButtonPosition="Right" DropDownIndicatorVisibility="Visible" DropDownPlacement="Right" DropDownHeight="600" DropDownWidth="800" Grid.Column="1" Padding="0" ClickMode="Release" IsOpen="False">
                                <telerik:RadDropDownButton.LayoutTransform>
                                    <RotateTransform Angle="-90"/>
                                </telerik:RadDropDownButton.LayoutTransform>
                                
                                <telerik:RadDropDownButton.DropDownContent>
                                    <me:UserControl1></me:UserControl1>
 
                                </telerik:RadDropDownButton.DropDownContent>
                            </telerik:RadDropDownButton>
                        </Grid>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
 
        <telerik:RadTabControl ItemContainerStyle="{StaticResource ClosableStyle}" TabOrientation="Horizontal" TabStripPlacement="Left"   FlowDirection="LeftToRight" Align="Right"  Grid.Row="1" DropDownDisplayMode="Visible" telerik:StyleManager.Theme="Vista" AllowDragReorder="True">
            <telerik:RadTabControl.Background>
                <LinearGradientBrush EndPoint="0.504,1.5" StartPoint="0.504,0.03">
                    <GradientStop Color="#FFB7B7B7" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="0.567"/>
                </LinearGradientBrush>
            </telerik:RadTabControl.Background>
 
            <telerik:RadTabItem Header="Tab1"/>
            <telerik:RadTabItem Header="Tab2"/>
        </telerik:RadTabControl>
 
 
 
    </Grid>
</Window>


Here is UserControl:
<UserControl x:Class="UserControl1"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid VerticalAlignment="Stretch" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <telerik:RadOutlookBar HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0">
                <telerik:RadOutlookBarItem Header="Online Games">
                    <TextBlock>BattleField IV</TextBlock>
                </telerik:RadOutlookBarItem>
                <telerik:RadOutlookBarItem Header="Social Network">
                    <TextBlock>FaceBook</TextBlock>
                </telerik:RadOutlookBarItem>
            </telerik:RadOutlookBar>
             
            <TextBox  Grid.Column="1">Text1</TextBox>
        </Grid>
    </Grid>
</UserControl>

Pov Ser
Top achievements
Rank 1
 answered on 03 Jun 2014
1 answer
190 views
As I can see during debug, Telerik.Windows.DragDrop.DragEventArgs has a private field eventArgs which has a field KeyStates. But since Telerik DragEventsArgs hide eventArgs I cannot access KeyStates property.
How am I supposed to figure out if any modifier keys were pressed at the moment of any DragDropManager's events?
Polya
Telerik team
 answered on 03 Jun 2014
1 answer
221 views
I'm using the StyleSelectors_WPF example.  I'm able to conditionally set both the shape and the connector.  However, I'd also like SettingsPaneView to be set based on the ShapeType I've selected.  Do you have an example of how to do this?

I'm currently using this style for everything.  However, it should only apply to my GroupNode where I have ID and Description.  Now, when I have a PersonNode, I need it to display ID, FirstName and LastName fields.  Thanks in advance for your help:

<Style TargetType="extensions:SettingsPaneView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="extensions:SettingsPaneView">
                    <Border Background="{TemplateBinding Background}"
                            BorderThickness="1"
                            BorderBrush="{StaticResource SettingsPaneBorderBrush}">
 
                        <GroupBox
                            Header="Group Properties">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="26"/>
                                    <RowDefinition Height="26"/>
                                </Grid.RowDefinitions>
 
                                <Grid
                                    Grid.Row="0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="125"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
 
                                    <Label
                                        Grid.Column="0"
                                        Content="ID:"
                                        HorizontalAlignment="Right"
                                        FontSize="12"
                                        Foreground="Black"/>
 
                                    <TextBox
                                        Grid.Column="1"
                                        Margin="10,0,10,0"
                                        extensions:SettingsPaneView.EditorPropertyName="DataContext.ID"
                                        extensions:SettingsPaneView.EditorItemType="Shapes, Custom"
                                        extensions:SettingsPaneView.EditorValue="{Binding Path=Text, Mode=TwoWay, RelativeSource={RelativeSource Self}}"/>
                                </Grid>
 
                                <Grid
                                    Grid.Row="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="125"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
 
                                    <Label
                                        Grid.Column="0"
                                        Content="Name:"
                                        HorizontalAlignment="Right"
                                        FontSize="12"
                                        Foreground="Black"/>
 
                                    <TextBox
                                        Grid.Column="1"
                                        Margin="10,0,10,0"
                                        extensions:SettingsPaneView.EditorPropertyName="DataContext.Description"
                                        extensions:SettingsPaneView.EditorItemType="Shapes, Custom"
                                        extensions:SettingsPaneView.EditorValue="{Binding Path=Text, Mode=TwoWay, RelativeSource={RelativeSource Self}}"/>
                                </Grid>
                            </Grid>
                        </GroupBox>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Milena
Telerik team
 answered on 03 Jun 2014
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
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
SplashScreen
Rating
Accessibility
Callout
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
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?