Telerik Forums
UI for WPF Forum
3 answers
136 views
I'm trying to use the RadMaskedDateTimeInput control, using a mask of "g", which provides date and time input with the AM/PM indicator. The AM/PM indicator can be changed using the up/down arrows when SpinMode is enabled but there is no way to change the AM/PM value using the keyboard. Do you have any solution or it is impossible for this component to do this?

Thx in advance

Davide
Pavel R. Pavlov
Telerik team
 answered on 07 Oct 2014
1 answer
164 views
Hi,

I have an issue with the RadGridView when used with NHibernate and Lazy loading.

When the page initially loads the gridview appears empty, but if I scroll data appears; this is aldo tru for paging with the RadDataPager, the first page appears empty but if you move to the second page then back, the data can be seen.

I am using the MVVM pattern and exposing an instance of VirtualQueryCollectionView to the view; if I put a break point on the property, I can see it being hit when the grid binds to the ViewModel. Looking inside the instance of the VirtualQueryCollection, I can see my data in the QueryableSourceCollection property, but the results view shows an IEnumerable filled with nulls.

A simplified view of my code would be something like:

View

<telerik:RadGridView x:Name="Grid" ItemsSource="{Binding MyDataCollection}">

ViewModel

protected MyViewModel(MyDataRepository repository)
{
   Repository = repository;
   GetMyData()
}
 
public VirtualQueryableCollectionView MyDataCollection { get; set; }
 
private void GetMyData()
{
   MyDataCollection= new VirtualQueryableCollectionView(Repository.GetMyData() {LoadSize = 50, VirtualItemCount = 4000})
}

Repository

public IQueryable<MyData> GetMyData ()
{
   var session = Session.SessionFactory.OpenSession()
   return session.Query<MyData>()
                          .Where(a => Property1.Contains(a.Value));
 
}


Any advice would be more than welcome, however I am stuck with NHibernate and must use lazy loading because of the amount of data.

Thanks In advance.


Paul.
Dimitrina
Telerik team
 answered on 07 Oct 2014
1 answer
130 views
Hello.

I'm using 'RadCartesianChart' as multi vertical axis.

I have problems.

'RadCartesianChart.HorizontalAxis' is used DateTimeContinuousAxis.

This is updated each 1sec. And other RadDataView is using 'LegendItems' of this chart.

Currently, graph of chart is changed.

But, MultiVertical & RadDataView is not updated data.

I want to update date about upper control.

What should I do?

If possible, please provide me about sample project.


Petar Marchev
Telerik team
 answered on 07 Oct 2014
1 answer
132 views
Hello!

I found neither explanation in documentation nor sample about AutoInsertHyperlinks property.

How does it work?

For example:

Document = new RadDocument();
 
const string input = @"
sdfsdf
sdf
sdf
s";
var editor = new RadDocumentEditor(Box.Document);
editor.Insert(input);

RadRichTextBox show this as plain text.

What behaviour of AutoInsertHyperlinks property is standard?

And how I can use advantages of this property right?

Thank you.
Aylin
Telerik team
 answered on 07 Oct 2014
1 answer
233 views
I need that my Diagram makes zoom and it occupies all Grid where is stayed when I execute my application. I have saved the coordinates of shapes in a database, but these coordinates correspond to one type of screen, and if someone execute the application in an other screen to other size, I want that the Diagram makes zoom automatic to fill all screen. It's possible?
Martin Ivanov
Telerik team
 answered on 07 Oct 2014
1 answer
4.1K+ views
I am attempting to bind a GridViewComboBoxColumn's item source found in a child grid to a property in the data context of the parent row. I believe I need to use a relative source and find an ancestor; however, I am not sure what the ancestor type should be. I was hoping there was something similar to a ListBoxItem type but I have not found one.

Here is my Grid:
<telerik:RadGridView Name="ParentGrid" ItemsSource="{Binding ParentItemSource}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewComboBoxColumn Name="Parent Attribute"></telerik:GridViewComboBoxColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView Name="ChildGrid" ItemsSource="{Binding Values}">
                        <telerik:GridViewComboBoxColumn Name="Parent Value" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ???}}, Path=ParentAttribute.Values}"></telerik:GridViewComboBoxColumn>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>

Here are my classes:

public class MyAttribute
   {
       public string Name { get; set; }
       public MyAttribute ParentAttribute { get; set; }
       public ObservableCollection<MyValue> Values { get; set; }
   }
 
   public class MyValue
   {
       public string Name { get; set; }
       public string Value { get; set; }
   }

What I would like to see happen is when the user changes the ParentAttribute (through the Parent Attribute combo box column), the ItemsSource of the Parent Value column in the child grid will be bound to the ParentAttribute.Values field.


 
Boris
Telerik team
 answered on 07 Oct 2014
3 answers
406 views
Hi,

I'm using the latest version of Telerik and I have a problem opening a PDF file. I created a USerControl which containe a RadPdfViewer and I am unable to load a document PDF file from disk.

Here is the piece of code I use to load my document:

            PdfDocumentSource doc = new PdfDocumentSource(new System.Uri(@"d:\document.pdf"));
            this.Viewer.Document = doc.Document;

The "doc.Document" are always null?!?

Thank's
Alain
Todor
Telerik team
 answered on 07 Oct 2014
1 answer
146 views
http://stackoverflow.com/questions/15950458/wpf-data-binding-of-a-ribbon-control

WPF 4.5  Ribbon is ok.


but, RadRibbonView is error (error.jpg)

How fix error.


# Full source

<Window x:Class="TelerikRibbon.MainWindow"
                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"
                Title="MainWindow" Height="350" Width="525" Name="wind">

    <Window.Resources>

        <DataTemplate x:Key="MyButtonTemplate">            
            <telerik:RadRibbonButton Text="{Binding Header}" Background="Beige" />
        </DataTemplate>
        
        <DataTemplate x:Key="MySplitButtonTemplate">
            <telerik:RadRibbonSplitButton Text="{Binding Header}" Background="Yellow" />
        </DataTemplate>
        
        <DataTemplate x:Key="buttonTempl">
            <ContentControl x:Name="cc" Content="{Binding}"  ContentTemplate="{DynamicResource MySplitButtonTemplate}" />
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Items.Count}" Value="0">
                    <Setter TargetName="cc" Property="ContentTemplate" Value="{DynamicResource MyButtonTemplate}"/>
                </DataTrigger>      
            </DataTemplate.Triggers>
        </DataTemplate>
        
        <Style TargetType="RibbonGroup" x:Key="groupStyle">
            <Setter Property="Header" Value="{Binding Header}"/>
            <Setter Property="ItemsSource" Value="{Binding Items}"/>
            <Setter Property="ItemTemplate" Value="{StaticResource buttonTempl}"/>
        </Style>
        <Style TargetType="RibbonTab" x:Key="tabStyle">
            <Setter Property="Header" Value="{Binding Header}"/>
            <Setter Property="ItemsSource" Value="{Binding Items}"/>
            <Setter Property="ItemContainerStyle" Value="{StaticResource groupStyle}"/>
        </Style>

        <Style TargetType="telerik:RadRibbonGroup" x:Key="groupStyleForRad">
            <Setter Property="Header" Value="{Binding Header}"/>
            <Setter Property="ItemsSource" Value="{Binding Items}"/>
            <Setter Property="ItemTemplate" Value="{StaticResource buttonTempl}"/>
        </Style>
        <Style TargetType="telerik:RadRibbonTab" x:Key="tabStyleForRad">
            <Setter Property="Header" Value="{Binding Header}"/>
            <Setter Property="ItemsSource" Value="{Binding Items}"/>
            <Setter Property="ItemContainerStyle" Value="{StaticResource groupStyleForRad}"/>
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Ribbon ItemContainerStyle="{StaticResource tabStyle}" ItemsSource="{Binding ElementName=wind, Path=child}"/>
        <!--<telerik:RadRibbonView Grid.Row="1" ItemContainerStyle="{StaticResource tabStyleForRad}" ItemsSource="{Binding ElementName=wind, Path=child}"/>-->
    </Grid>

</Window>

==================

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

        public ObservableCollection<AppAction> child
        {
            get
            {
                ObservableCollection<AppAction> reVal = new ObservableCollection<AppAction>();
                reVal.Add(
                    new AppAction()
                    {
                        Header ="File",
                        Items = new ObservableCollection<AppAction>() { 
                new AppAction() { Header ="Font", Items = new ObservableCollection<AppAction>() { 
                    new AppAction() { Header ="Arial" }, 
                    new AppAction() { Header ="Segoe UI", Items = new ObservableCollection<AppAction> () {
                            new AppAction() { Header = "..." }
                        } }, 
                    new AppAction() { Header ="Tahoma" } } }, 
                new AppAction() { Header ="Other", Items = new ObservableCollection<AppAction>() { 
                    new AppAction() { Header ="Colse" } } } }
                    });

                reVal.Add(
                    new AppAction()
                    {
                        Header ="View",
                        Items = new ObservableCollection<AppAction>() { 
                new AppAction() { Header ="A", Items = new ObservableCollection<AppAction>() { 
                    new AppAction() { Header ="AButton" } } }, 
                new AppAction() { Header ="B", Items = new ObservableCollection<AppAction>() { 
                    new AppAction() { Header ="BButton" } } }, 
                new AppAction() { Header ="C", Items = new ObservableCollection<AppAction>() { 
                    new AppAction() { Header ="CButton" } } } }
                    });
                return reVal;
            }
        }
    }

    public class AppAction : INotifyPropertyChanged
    {
        public ObservableCollection<AppAction> Items { get; set; }

        string header;
        public string Header
        {
            get { return header; }
            set { header = value; OnPropertyChanged("Header"); }
        }

        public AppAction()
        {
            Items = new ObservableCollection<AppAction>();
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
    }


Kiril Vandov
Telerik team
 answered on 07 Oct 2014
2 answers
221 views
Hi,

I have defined a custom tooltip for RadTreeView. Also I have used HierarchicalDataTemplate for my RadTreeView. Code is as shown below.

 <telerik:RadTreeView Margin="8" IsDragDropEnabled="True"  Name="CollExperimentTreeView"  SelectedItem="{Binding ActiveExp, Mode=TwoWay}"
     SelectionMode="Single" IsSingleExpandPath="False" IsLineEnabled="True"   VerticalAlignment="Stretch"
       temTemplate="{StaticResource TreeViewTemplate}"  ItemsSource ="{Binding TreeViewCollection,  Mode=TwoWay}" />

Custom tooltip and  HierarchicalDataTemplate  defined as below:

 <UserControl.Resources>
        <Style TargetType="{x:Type telerik:RadTreeViewItem}">
            <Setter Property="ToolTip" >
                <Setter.Value>
                    <ToolTip>
                        <ToolTip.Content>
                            <StackPanel Orientation="Vertical">
                                <StackPanel Orientation ="Horizontal">
                                    <TextBlock Text="Started:   " />
                                    <TextBlock Text="{Binding StartDate}" />
                                </StackPanel>
                                <StackPanel Orientation ="Horizontal">
                                    <TextBlock Text="Last Changed:   " />
                                    <TextBlock Text="{Binding LastAccess}" />
                                </StackPanel>
                                <TextBlock Text="{Binding Description}" />
                            </StackPanel>
                        </ToolTip.Content>
                    </ToolTip>
                </Setter.Value>
            </Setter>
        </Style>
        <HierarchicalDataTemplate x:Key="TreeViewTemplate" ItemsSource="{Binding Path=Experiments}">
            <TextBlock VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  Text="{Binding Name}" />              
        </HierarchicalDataTemplate>
    </UserControl.Resources>

I do not want to display tooltip for those nodes that shows TextBlock containing Name,( HierarchicalDataTemplate )  

Please help

Thanks
Divya
Top achievements
Rank 1
 answered on 07 Oct 2014
3 answers
222 views
I have using a radribbon view in my wpf application.I need to change the color of the active tab(1) and the tab pane(2).Please see the attached file.
here is my code


  
<Window
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="13*"/>
            <RowDefinition Height="19*"/>
        </Grid.RowDefinitions>
 
        <telerik:RadRibbonView  VerticalAlignment="Top" Background="#FF09587E" MinimizeButtonVisibility="Visible" BorderBrush="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}" Foreground="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Grid.RowSpan="2">
            <telerik:RadRibbonTab Header="RibbonTab" Background="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}"  OpacityMask="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
                <telerik:RadRibbonGroup Header="TEEEEE"/>
            </telerik:RadRibbonTab>
        </telerik:RadRibbonView>
 
    </Grid>
</Window>
Arun
Top achievements
Rank 1
 answered on 07 Oct 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
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?