Telerik Forums
UI for WPF Forum
0 answers
78 views
Hi,

I have installed the Q1 2013 for WPF controlls pack but i cant see TelerikCommon.dll to add the reference. can any one please let me know how to add reference.

Environment - VSTS 2012 premium with Q1 2013 pack for WPF controlls.
 
I Tried recording the WPF applications with rad grid.  I added the references Telerik.Windows.Controls.dll and It is showing as WPFButton rather than RadButton as shown below.

void RecordedMethod1()

{

#region Variable Declarations

WpfButton uIBtnButton = this.UINAFTAWindow.UINAFTAExporterGroup.UITxtExporterCustom.UIBtnButton;

#endregion

 
// Click 'btn' button

Mouse.Click(uIBtnButton, new Point(15, 8));
}

Please let me know what and all references to be added to get RADControlls using coded ui tests

-Sandeep






  
Sandeep
Top achievements
Rank 1
 asked on 11 Mar 2013
7 answers
103 views
Hi,

I have licensed version of VSTS Premium 2012 installed in my machine....
And i need to automate (using Coded UI) Windows based application(WPF) application having Rad Controls in it.
 whether Q3 2012 package supports VSTS 2012 Premium?
If so can you send me the link where i can download Q3 2012?


-Namitha
Namitha
Top achievements
Rank 1
 answered on 09 Mar 2013
0 answers
110 views
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinitions Width = "300" />
<ColumnDefinitions />
</Grid.ColumnDefinitions>
<telerik:RadPanelBar Grid.Column = "0" VerticalAlignment = "Stretch" ExpandMode = "Single">
<telerik:RadPanelBarItem>
<telerik:RadPanelBarItem.Header> <TextBlock Text = "Panel 1" /> </telerik:RadPanelBarItem.Header> <StackPanel VerticalAlignment = "Top">
<telerik:RadButton Name="Button1" Content = "Customer" Height = "50" />
<telerik:RadButton Name="Button2" Content = "Order" Height = "50" />
</StackPanel>
</telerik:RadPanelBarItem>
</telerik:RadPanelBar>

<ContentControl x:Name = "ContentContainer Margin = "8" Grid.Column = 1" />
</Grid>

Well, as you see I have RadPanelBar. When I select RadPanelBarItem I want to load some user control in ContentControl. In this example when I click "Button1" I want to load in ContentControl "Customer" UserControl, which I created, when I click "Button2" I want to load "Order" UserControl.


Can you help me how to do that??




Mask
Top achievements
Rank 1
 asked on 08 Mar 2013
2 answers
81 views
I'm using version 2012.3.1129.40 of the Telerik controls for WPF.  I have a RadGridView control in one window which uses the CountAggregateFunction:
<telerik:RadGridView AutoExpandGroups="False"
                     AutoGenerateColumns="False"
                     CanUserDeleteRows="False"
                     CanUserFreezeColumns="False"
                     CanUserInsertRows="False"
                     CanUserResizeColumns="True"
                     CanUserSortColumns="True"
                     DataLoadMode="Synchronous"
                     EnableColumnVirtualization="True"
                     EnableRowVirtualization="True"
                     FontSize="16"
                     FontWeight="Bold"
                     Grid.Column="0"
                     Grid.Row="0"
                     IsReadOnly="True"
                     ItemsSource="{Binding Path=HotLists, RelativeSource={RelativeSource AncestorType={x:Type cs:HotListManager}}}"
                     Name="HotListGrid"
                     RowIndicatorVisibility="Collapsed"
                     ScrollViewer.CanContentScroll="True"
                     ScrollViewer.HorizontalScrollBarVisibility="Auto"
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     SelectionChanged="HotListGrid_SelectionChanged"
                     SelectionUnit="FullRow"
                     ShowColumnFooters="True"
                     ShowGroupPanel="False"
                     ToolTip="Hot Lists">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding Name      , Mode=OneWay}"
                                     Header="Hot List"
                                     Width="*">
            <telerik:GridViewDataColumn.AggregateFunctions>
                <telerik:CountFunction Caption="Count: " ResultFormatString="{}{0:n0}" />
            </telerik:GridViewDataColumn.AggregateFunctions>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding ListType  , Mode=OneWay}"
                                     Header="List Type"
                                     Width="Auto" />
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding LastUpdate, Mode=OneWay, Converter={StaticResource DateConverter}}"
                                     Header="Last Update"
                                     MinWidth="160"
                                     Width="Auto" />
        <telerik:GridViewImageColumn DataMemberBinding="{Binding Status    , Mode=OneWay, Converter={StaticResource DeviceStatuses}}"
                                     Header="Status"
                                     ImageStretch="None"
                                     Width="95" />
        <telerik:GridViewDataColumn  Header="Entries"
                                     TextAlignment="Right"
                                     MinWidth="125"
                                     Width="Auto">
            <telerik:GridViewDataColumn.DataMemberBinding>
                <Binding Path="EntryCount"
                         Mode="OneWay"
                         Converter="{StaticResource LongConverter}"
                         ConverterParameter="#,##0" />
            </telerik:GridViewDataColumn.DataMemberBinding>
            <telerik:GridViewDataColumn.AggregateFunctions>
                <telerik:SumFunction ResultFormatString="{}{0:n0}" />
            </telerik:GridViewDataColumn.AggregateFunctions>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

When I was running VS2010, this compiled fine.  However, after upgrading to VS 2012, I get the following error for both of the Aggregate Functions:

The specified value cannot be assigned to the collection. The following type was expected: "AggregateFunction".

The thing is the compiled code runs fine.  It's just an error that shows up in the design pane and doesn't stop the compile code from running.

How do I fix this problem?

Tony
Top achievements
Rank 1
 answered on 08 Mar 2013
1 answer
213 views
Hello,
I'm seeing an issue with the RadDropDownButton and am wondering curious if there is a work around for my scenario. When focus is on a RadDropDownButton pressing 'Enter' or 'Space' normally causes the button to display the DropDownContent; what I'm seeing is this keyboard functionality stops working after the following steps.

1. User clicks the RadDropDownButton. This causes the DropDownContent to display as expected.
2. User clicks the RadDropDownButton again. This closes the DropDownContent to hide as expected and focus is once again on the button itself.

Unfortunately it is at this point that 'Enter' and 'Space' seem to no longer work. Even after tabbing off of the control and returning the keyboard functions do not work. Interestingly pressing 'Space' actually changes the button visual to the 'Pressed' state but the DropDownContent is not displayed. Any ideas to get the keyboard functionality work would be greatly appreciated. We are currently using assemblies version 2012.2.912.40. Thanks much for any feedback!

Below is the code for a small test app that exhibits the behavior outlined above.

MainWindow.xaml.cs

using System.Windows;
 
namespace DropDownButtonKeyBehavior
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            DataContext = new ViewModel();
        }
    }
}


MainWindow.xaml


<Window x:Class="DropDownButtonKeyBehavior.MainWindow"
        xmlns:commands="clr-namespace:Microsoft.Practices.Prism.Commands;assembly=Microsoft.Practices.Prism"
        Title="MainWindow" Height="400" Width="200">
     
    <Window.Resources>
        <DataTemplate x:Key="DropDownContent">
            <Grid Background="Orange" Height="300" Width="300">
                <Grid Margin="5">
                     
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>         
                         
                     <telerik:RadDatePicker />
                      
                    <Button Name="Save" Grid.Row="1" Content="OK" HorizontalAlignment="Right" Width="105" />
                     
                </Grid>        
            </Grid>
        </DataTemplate>
    </Window.Resources>
     
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition/>     
            <RowDefinition/>     
        </Grid.RowDefinitions>
 
        <telerik:RadDropDownButton Content="Click Me For Popup" IsOpen="{Binding IsExpanded}" Background="Gray" HorizontalAlignment="Center" VerticalAlignment="Center"  Height="90" Width="90" commands:Click.Command="{Binding ExpandCommand}" commands:Click.CommandParameter="{Binding}">
            <telerik:RadDropDownButton.DropDownContent>
                <ContentControl ContentTemplate="{StaticResource DropDownContent}" DataContext="{Binding}" Content="{Binding}" />
            </telerik:RadDropDownButton.DropDownContent>
        </telerik:RadDropDownButton>
         
        <TextBox x:Name="FocusHolder" Grid.Row="1"/>
     
    </Grid>
</Window>



ViewModel.cs


using System;
using System.ComponentModel;
 
using Microsoft.Practices.Prism.Commands;
 
namespace DropDownButtonKeyBehavior
{
    public class ViewModel : INotifyPropertyChanged
    {
        #region ViewModel Members
         
        private DelegateCommand<object> mExpandCommand;
        public DelegateCommand<object> ExpandCommand
        {
            get
            {
                return mExpandCommand ?? ( mExpandCommand = new DelegateCommand<object>( _OnExpandCommandExecuted ) );
            }
        }
 
        private bool mIsExpanded;
        public bool IsExpanded
        {
            get
            {
                return mIsExpanded;
            }
            set
            {
                if( mIsExpanded != value )
                {
                    mIsExpanded = value;
                    OnPropertyChanged( "IsExpanded" );
                }
            }
        }
 
        #endregion ViewModel Members
 
        #region Ëvents
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        #endregion Ëvents
 
        #region Private Members
 
        private void _OnExpandCommandExecuted( object obj )
        {
            IsExpanded = true;
        }
 
        #endregion Private Members
 
        #region Protected Members
 
        protected virtual void OnPropertyChanged( string propertyName )
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if( handler != null )
            {
                handler( this, new PropertyChangedEventArgs( propertyName ) );
            }
        }
 
        #endregion Protected Members
 
    }
}

Zarko
Telerik team
 answered on 08 Mar 2013
1 answer
163 views
Hello, is it possible to place a custom control in a cell? Maybe a tree control or a combobox, or even a control I make that contains numerous controls.

Thanks
Scott
Andrew
Telerik team
 answered on 08 Mar 2013
1 answer
85 views
Hi !

I'm trying telerik charts and I wanted to test the performance. I saw the sample with 15000 points and I wanted to do the same with much more. Unfortunately, my computer got very hard to print a 10000 points line. I guess something is wrong with my code compared to the sample one but I don't really realise what.

class DataListViewModel : ViewModelBase
{
    private RadObservableCollection<int> dataList;
    private Random random = new Random((int) DateTime.Now.Ticks);
 
    public DataListViewModel()
    {
        this.Data = this.FillRandomlyList();
    }
 
    public RadObservableCollection<int> Data
    {
        get { return dataList; }
        set
        {
            if (value != dataList)
            {
                dataList = value;
                this.OnPropertyChanged("Data");
            }
        }
    }
 
    private RadObservableCollection<int> FillRandomlyList()
    {
        var res = new RadObservableCollection<int>();
 
        for (int i = 0; i < 10000; i++)
        {
            res.Add(random.Next(500));
        }
 
        return res;
    }
}

<Window x:Class="PerfTest.MainWindow"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadCartesianChart Margin="12,12,270,12">
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5">
                    <telerik:CartesianChartGrid.MajorXLineStyle>
                        <Style TargetType="Line">
                            <Setter Property="Shape.Stroke" Value="Gray" />
                        </Style>
                    </telerik:CartesianChartGrid.MajorXLineStyle>
                    <telerik:CartesianChartGrid.MajorYLineStyle>
                        <Style TargetType="Line">
                            <Setter Property="Shape.Stroke" Value="Gray" />
                        </Style>
                    </telerik:CartesianChartGrid.MajorYLineStyle>
                </telerik:CartesianChartGrid>
            </telerik:RadCartesianChart.Grid>
 
 
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis Visibility="Hidden"/>
            </telerik:RadCartesianChart.HorizontalAxis>
 
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:CategoricalAxis Title="Test2" Visibility="Visible" IsInverse="True" />
            </telerik:RadCartesianChart.VerticalAxis>
 
 
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior />
                <telerik:ChartSelectionBehavior />
            </telerik:RadCartesianChart.Behaviors>
 
 
            <telerik:RadCartesianChart.Series>
                <telerik:LineSeries Stroke="IndianRed" CategoryBinding="X" ValueBinding="Y"
                                    ItemsSource="{Binding Path=Data}" RenderMode="Light" >
                    <telerik:LineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="DeepPink" Height="5" Width="5" />
                        </DataTemplate>
                    </telerik:LineSeries.PointTemplate>
                </telerik:LineSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
    </Grid>
</Window>

Does someone have an idea ?
Thank you !

Edit : It does the same without PointTemplate
Petar Kirov
Telerik team
 answered on 08 Mar 2013
7 answers
622 views
Hi

I am trying to show the detailvisibility from a row after filling up the gridview.
but the row i receive row=... is always nothing.
I found the code to retrieve the row in an other forumthread.
but it is not working.

I work with the latest version of the controls.

Dim dt As datatable
  
dt = getdatatable.defaultview
Me.radDataPager.Source = dt
radDataPager.MoveToLastPage()
             
Dim row As Telerik.Windows.Controls.GridView.GridViewRow
row = Me.radGridView.ItemContainerGenerator.ContainerFromIndex(radGridView.Items.Count - 1)
row.DetailsVisibility = Visibility.Visible

Thanks

Kristof
Sajid Ali
Top achievements
Rank 2
 answered on 08 Mar 2013
2 answers
276 views
Esc doesn't close the window, why? 

<telerik:RadButton Content="Cancel" Command="telerik:WindowCommands.Close" telerik:RadWindow.ResponseButton="Cancel" Width="70"/>
Martin
Top achievements
Rank 2
 answered on 08 Mar 2013
1 answer
413 views

After reading posts, looking at examples and trying everything I can think of I've finally decided to post.
The busyIndicator on my view doesn't show until after the work is done.  Sometimes it never shows.  I have a grid with multiple aggregate functions.  It seems like IsBusy is set to true, data is retrieved, IsBusy is set to false, and the UI is locked until the aggregates have completed their calculation.  Is there a better time to set IsBusy=false, like some event on the grid?  I tried binding BusyIndicator.IsBusy to RadGridView.IsBusy, but it didn't make any difference. What I want, is to call the method below, immediately show the busy indicator, get the data, and hide the inidicator.  The SetIsBusy method is called as part of a Task (TaskFactory.StartNew), thus the need for the Dispatcher to set IsBusy = value.  But still, the inidicator does not immediately show.  I have the DisplayAfter property set to 0. 

What is the most reliable way to immediately show the busy indicator before loading the grid and the proper way to hide it after the aggregates have completed computation?


public
void SetIsBusy(bool value, Func<ReadOnlyObservableCollection<TResult>> executeSearch)

    {

        Application.Current.Dispatcher.Invoke(new Action(() =>

        {

            IsBusy = value;

        }), DispatcherPriority.Send, null);

        if (this._IsBusy)

        {

            var backgroundWorker = new BackgroundWorker();

            backgroundWorker.DoWork += new DoWorkEventHandler((object sender, DoWorkEventArgs e) =>

            {

                e.Result = executeSearch();

            });

            backgroundWorker.RunWorkerCompleted += OnExecuteSearchCompleted;

            backgroundWorker.RunWorkerAsync();

        }

    }

Ivo
Telerik team
 answered on 08 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
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?