Telerik Forums
UI for WPF Forum
1 answer
131 views
When adding a GridViewHyperlinkColumn to a GridView I expect the links to adapt to the current theme. I'm currently using Expression Dark and the links are vivid blue. Not so nice...

I consider this a bug. Your links should adapt to the current theme!

I tried overriding the style...

<Grid.Resources>
  <Style TargetType="{x:Type telerikGrid:HyperlinkButton}">
  <Setter Property="Foreground" Value="White" />
  </Style>
</Grid.Resources>

<telerik:GridViewHyperlinkColumn Header="Link" />

Doesn't work.
Vanya Pavlova
Telerik team
 answered on 18 Mar 2013
2 answers
65 views
Hi,
Im having troubles when having two dataseries in chart.
The series have different start and end dates that do not intersect.

The problem is that mars displays twice and the months seem to fall in wrong month (see attachment)
In the picture the blue (history) series should start in November and end in March.
The green (2013) series should start in April and end in December.

Here is the code that creates the series.
private DataSeries createDataSeries(List<ChartData> data, string legendLabel = "")
        {
            DataSeries series              = new DataSeries();
            BarSeriesDefinition definition = new BarSeriesDefinition();
            definition.ShowItemToolTips    = true;
            definition.ShowItemLabels      = false;
            series.Definition              = definition;
            series.LegendLabel             = legendLabel;
            foreach (ChartData item in data)
            {
                DataPoint dataPoint   = new DataPoint();
                dataPoint.YValue      = item.Value;
                dataPoint.XValue = item.Caption.ToOADate();
                dataPoint.IsDateTime = true;
                dataPoint.LabelFormat = "MMM";
                series.Add(dataPoint);
                count++;
            }
            return series;
        }

Can you help me you  ?
-k
Kristjan Einarsson
Top achievements
Rank 1
 answered on 18 Mar 2013
3 answers
144 views
Hi

 I am using Docking and all my RadPanel's have content controls that support scrollbars except for one RadPane.  I can get scrollbars by using the microsoft scrollviewer but my whole screen looks weird because one panel has a different style than all the others.  It seems that this defeats the purpose of using themes.  If there are xaml styles already built for this could they be provided with detail instructions on how to incorporate.  I have limited xaml experience and zero Blend experience.  I use third-party controls so I can concentrate on the c# part of the app without having to worry to much about xaml. 

Thanks
Rich
Masha
Telerik team
 answered on 18 Mar 2013
2 answers
377 views
Additional information: A 'MultiBinding' cannot be set on the 'DataMemberBinding' property of type 'GridViewHyperlinkColumn'. A 'MultiBinding' can only be set on a DependencyProperty of a DependencyObject.

I run into this pretty much everywhere in Telerik components. MultiBinding is never supported :(

<telerik:GridViewHyperlinkColumn.DataMemberBinding>
<MultiBinding StringFormat="{}{0}x{1}">
    <Binding Path="X" />
    <Binding Path="Y" />
</MultiBinding>
</telerik:GridViewHyperlinkColumn.DataMemberBinding>
Kristoffer
Top achievements
Rank 1
 answered on 18 Mar 2013
5 answers
497 views

I am using Telerik WPF Q3 2012.

I am following the example in http://www.telerik.com/help/wpf/raddataform-customized-fields.html

Since I can only upload images, I am including the text of MainWindow here (see below).

Summary;

  • When I use the standard DataFormDataField with Label and DataMemberBinding, things are good (I can see data and it is read only until I click Edit).
  • When I use the DataFormDataField.ContentTemplate as per the example, I see a blank label and blank text field. I can not change the data
  • When I tried DataFormDataField.Content, I can see the data but it is always writable (even before I click the edit button).

I would like to get the DataFormDataField.ContentTemplate working so I can create the field layout that I want. I think I am missing something.

Please help

Thank you
Mark

------------MainWindow.xaml.cs ----------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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;

namespace Example
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            MyDataForm.ItemsSource = GetData();
        }
        private ObservableCollection<TestData> GetData()
        {
            ObservableCollection<TestData> result = new ObservableCollection<TestData>();

            TestData a = new TestData()
            {
                Name = "Hello",
                Remark = "Where are you?",
                Comment = "Bye"
            };

            result.Add(a);
            return result;
        }

        private void MyDataForm_EditEnded_1(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndedEventArgs e)
        {
            TestData a = MyDataForm.CurrentItem as TestData;
            // Notice that a.Remark is not changed event if you edit data in the remarks field
        }
    }
    public class TestData
    {
        public String Name { get; set; }
        public String Remark{ get; set; }
        public String Comment { get; set; }
    }
}

----------------- MainWindow.xaml ---------------

 

<Window x:Class="Example.MainWindow"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.Resources>
            <DataTemplate x:Key="MyDataTemplate">
                <StackPanel>
                   
                    <!-- Basic definition -->
                    <telerik:DataFormDataField Label="Name" DataMemberBinding="{Binding Name}" ToolTip="Basic Layout" />
                   
                    <!-- Based on Custom Fields example, but nothing is displayed -->
                    <telerik:DataFormDataField ToolTip="Nothing is displayed"  >
                        <telerik:DataFormDataField.ContentTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical">
                                    <TextBox Text="Remarks"  Background="Green"/>
                                    <TextBox Text="{Binding Remarks, Mode=TwoWay}" />
                                </StackPanel>                               
                            </DataTemplate>
                        </telerik:DataFormDataField.ContentTemplate>
                    </telerik:DataFormDataField>
                   
                    <!-- Another Attempt, but it is readable before click Edit button -->
                    <telerik:DataFormDataField Label="Comment" ToolTip="Always Editable" >
                        <telerik:DataFormDataField.Content>
                            <TextBox Text="{Binding Comment, Mode=TwoWay}" />
                        </telerik:DataFormDataField.Content>
                    </telerik:DataFormDataField>

                </StackPanel>
            </DataTemplate>
        </Grid.Resources>

        <!-- Metadata information -->
        <telerik:RadDataForm x:Name="MyDataForm"
                             AutoGenerateFields="False"
                             ReadOnlyTemplate="{StaticResource MyDataTemplate}"
                             EditTemplate="{StaticResource MyDataTemplate}"
                             CommandButtonsVisibility="Edit,Commit, Cancel"
                             EditEnded="MyDataForm_EditEnded_1">
        </telerik:RadDataForm>

    </Grid>
</Window>

 

Ivan Ivanov
Telerik team
 answered on 18 Mar 2013
3 answers
429 views
Hi,

I was using 2012.1 version of WPF.
Now am planning to upgrade to 2013 Q1 (Am using 2013.1.220.40 version).
Am using a RibbonBar in the old version. Since I can't find RibbonBar in the new release, am converting it to RibbonView. Should I convert?

If Yes, then I was using TabStripPanel as below,

xmlns:Telerik_Windows_Controls_RibbonBar_Primitives="clr-namespace:Telerik.Windows.Controls.RibbonBar.Primitives;assembly=Telerik.Windows.Controls.RibbonBar"

<telerikNavigation:RadTabControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <Telerik_Windows_Controls_RibbonBar_Primitives:TabStripPanel
IsItemsHost="True" SeparatorOpacityThreshold="3"
VariablePaddingLength="15" />

                                    </ItemsPanelTemplate>
                                </telerikNavigation:RadTabControl.ItemsPanel>

After Converting to RibbonView, below is my code

    xmlns:Telerik_Windows_Controls_RibbonBar_Primitives="clr-namespace:Telerik.Windows.Controls.RibbonView.Primitives;assembly=Telerik.Windows.Controls.RibbonView"

<telerikNavigation:RadTabControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <!--<Telerik_Windows_Controls_Primitives:TabStripPanel
IsItemsHost="True" SeparatorOpacityThreshold="3"
VariablePaddingLength="15" />-->
                                        <Telerik_Windows_Controls_Primitives:TabStripPanel
IsItemsHost="True" Opacity="3" />
                                    </ItemsPanelTemplate>
                                </telerikNavigation:RadTabControl.ItemsPanel>

After this change, my RadRibbonTab items are not getting displayed.

Below are my questions,

1. I can't find SeparatorOpacityThreshold="3" VariablePaddingLength="15" in RibbonView TabStripPanel.
Is this the reason?
2. Doesn't the TabStripPanel work in RadRibbonView? If not, how will i display RadRibbonTab Items in a RibbonView?

Cheers
VS
Top achievements
Rank 1
 answered on 18 Mar 2013
2 answers
454 views
Hi!

I'm using RadTabControl as a Prism region and Tab items are successfully created. I have a Shell window which has a RadTabControl. Can I somehow get the view/viewmodel of the selected TabItem (tab's content) when TabControl's selected item changes so that I could call a method of that view model?

All of this is because I'm using PRISM RegionNavigationService in the Shell's viewmodel and I want each tab to be able to publish their NavigationService via EventAggregator event when tab is selected.

Other ways of doing this are also accepted of course :)

Br,

Kalle
Kalle
Top achievements
Rank 1
 answered on 16 Mar 2013
4 answers
724 views
Hello Telerik Team,
I have one more stupid question about GridView component. Our application have a main window with menu toolbar and frame which is filled by some content (page with gridview) which is selected by some button or menu item. When I click on the button (menu item), I would like to show my data grid in content frame, however grid loading time seems to me quite long. First, i thought it is caused by cell templates/metro style/disabled virtualization/placing into grid without fixed size ... , but then a make a simplification and application behaves exactly the same. It means, that I have approximatelly at least 2-3s data grid loading time after click on the button even if I display only few records (about 3 columns and 40 rows). It can be quite annoying for our users, thus i would like to ask You, if there is some technique to decrease this loading time or You can identify some fault I made in the code??? I made a simplification of our project, but because i cannot attach compressed source codes, i try to add some code in this post. It seems to me, that i have used all possible actions described in your "performance guide" or those described in forums (default theme, no cell templates, virtualization, fixed size, read only, simple binding, ...).

MainVindow.xaml
<Window x:Class="SimpleGrid.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="280" />
        </Grid.RowDefinitions>
        <StackPanel  Grid.Row="0">
            <Button Content="Create grid" x:Name="button1" Grid.Row="0" Click="button1_Click"/>          
        </StackPanel>
        <Frame x:Name="Frame1" Background="Black" Grid.Row="1"  Height="280" Width="500"/>
         
    </Grid>
</Window>

MainWindow.xaml.cs
namespace SimpleGrid
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Page p = new Grid();
            this.Frame1.Content = p;        
        }
       
    }
}

Grid.xaml (grid page to be inserted)
<Page x:Class="SimpleGrid.Grid"
      xmlns:my="clr-namespace:SimpleGrid"
      mc:Ignorable="d"
      d:DesignHeight="280" d:DesignWidth="500"
    Title="Grid">
    <Page.Resources>
        <my:MyViewModel x:Key="MyViewModel"/>       
    </Page.Resources>
     
     <Grid DataContext="{StaticResource MyViewModel}"  Height="280" Width="500">
 
            <telerik:RadGridView
                                Name="clubsGrid"
                                ItemsSource="{Binding Clubs}"
                                AutoGenerateColumns="False"        
                                ShowGroupPanel="False"
                                IsReadOnly="True"
                                MaxHeight="280"
                                MaxWidth="500"
                                EnableColumnVirtualization="True"
                                EnableRowVirtualization="True"
                                CanUserFreezeColumns="False"
                                RowIndicatorVisibility="Collapsed"
                                CanUserResizeColumns="False">
 
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Width="155" IsGroupable="False" IsFilterable="False" IsSortable="False"/>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}" Header="Est." Width="180" IsGroupable="False" IsFilterable="False" IsSortable="False"/>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"  Header="Stadium" Width="155" IsGroupable="False" IsFilterable="False" IsSortable="False"/>                   
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
     </Grid>
</Page>

Data are binded from MyViewModel.cs + Clubs.cs which is used in your examples  (322627_RadGridView-WPF-AR-20).


George
Top achievements
Rank 1
 answered on 16 Mar 2013
3 answers
89 views
print for  Diagram  didnot print as shapes loacation , it always print from page start
how i can solve it
Ahmed
Top achievements
Rank 1
 answered on 15 Mar 2013
2 answers
99 views
Is it possible with RadDocking to do this?   Windows start out four floating (ToolWindow) windows all the same sized squares.  The docking area is made up of four equally sized squares.   The user can essentially snap the floatings window into one of those four squares, or leave it floating.  So the key point is the ToolWindow never loses its size.   Right now I have them set to 400x400.  

The idea is the user has a dashboard and can snap in window/user controls or leave them floating.
Tina Stancheva
Telerik team
 answered on 15 Mar 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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?