Telerik Forums
UI for WPF Forum
1 answer
175 views
Hello,

I created a user control and changed it into a RadWindow. The application is using the Windows 8 touch theme with an implicit style. The libarary version is Telerik 2014 Q3.

The Visual Studio 2013 Designer shows either an empty window or a null reference exception when I have set references to Telerik Libraries in a custom folder. The Window is shown properly when the Telerik libraries are loaded from the installation folder. 

I have used the technique as mentioned in: http://www.telerik.com/help/wpf/radwindow-how-to-use-radwindow-as-user-control.html  The exception is shown in the designer when the style is applied to the window via Style ="{DynamicResource RadWindowStyle}" instead of setting it in App.xaml. The theme xaml files are loaded from the Theme dll.

Kind regards,
Bert



Kalin
Telerik team
 answered on 11 Nov 2014
3 answers
97 views
After a simple replace of the DLLs and clean solution, rebuild, nothing works.


WTF!!!  No menu, no buttons, not one single Rad control is visible.
Eric
Top achievements
Rank 1
 answered on 11 Nov 2014
19 answers
291 views
Hi Team,

We are using the Telerik controls in our application and to test the application we are using Coded UI Test 2012.

We were able to record actions on the controls placed inside the RadPaneGroup. But the playback is failing.
For the button inside the RadPaneGroup, CUIT is identifying the button control with the following hierarchy:
--->MainWindow
--->Rad Split Container
---> Rad Pane Group --->Button But it is failing to playback actions on the button. Following is the exception message with which the CUIT is failing:

---------------------------------------------------------------------------------------------------------
<<Result Message: >>
Test method CodedUITestProject2.CodedUITest1.CodedUITestMethod1 threw exception: 
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: 
TechnologyName:  'UIA'
ControlType:  'Button'
AutomationId:  'test'
 Search may have failed at 'Rad Pane Group' TabList as it may have virtualized children. If the control being searched is descendant of 'Rad Pane Group' TabList then including it as the parent container may solve the problem. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
 --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__d()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass11.<GetProperty>b__10()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
   at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)
   at CodedUITestProject2.UIMap.RecordedMethod7() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\UIMap.Designer.cs:line 136
   at CodedUITestProject2.CodedUITest1.CodedUITestMethod1() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\CodedUITest1.cs:line 34

---------------------------------------------------------------------------------------------------------

This is a blocking issue. Any help in automating on the controls placed inside the RadPaneGroup is greatly appreciated.

Regards,
Rajesh.

Posted on Nov 15, 2012 (permalink)

We are using the Telerik controls in developing our application. We were using Coded UI Test to test our application.

Deak
Top achievements
Rank 1
 answered on 11 Nov 2014
1 answer
192 views
Hi,
 
I have RadRichTextBox on my WPF Window. I am using MVVM design pattern and have binding in my View for this RadRichTextBox using TxtDataProvider as below:

<Window.DataContext>
        <local:vmRichTextBox />
    </Window.DataContext>
    <Grid>
        <telerik:RadRichTextBox x:Name="rchTextBox" Width="210" Height="150">
        </telerik:RadRichTextBox>
        <telerik:TxtDataProvider RichTextBox="{Binding ElementName= rchTextBox}"  Text="{Binding Path= MessageToSend, Mode= TwoWay, UpdateSourceTrigger= PropertyChanged}"></telerik:TxtDataProvider>
    </Grid>

Here Binding works perfect. Now, I would like the user to enter 120 characters only in above RadRichTextBox in a manner  that whenever user enters 121st character the foregoround color of this character and exceeding characters changes to Red while typing itself. The first 120 characters will have default  foreground color.
Please let me know how to implement this functionality with this RadRichTextBox in MVVM asap.

Thanks
Petya
Telerik team
 answered on 11 Nov 2014
4 answers
387 views
I need to have the Richtextbox display a transparent background and border when IsEnabled is set to true.  After fumbling around for a few hours I am unable to get the control to cooperate.

Any help would be appreciated.
Todor
Telerik team
 answered on 11 Nov 2014
1 answer
215 views
Hi,  

In most use-cases, I enjoy the fact that a RadGridView cell which fails validation will "trap" the user's focus, and require the user to fix the cell contents.  However, in the current project I am working on, I need to allow the user to switch focus simply by mouse-click (currently if the user enters an invalid cell, they must hit esc first), even out of cells which have failed validation.

How do I get this behavior?  

Thanks,
Dustin
Boris
Telerik team
 answered on 10 Nov 2014
1 answer
182 views
Hi,

I implemented a search functionality with the PDF Viewer control. The user have the flexibility to do a findfirst, findlast, findprior, findnext and depending on what the user did, I highlight the searchtext corresponding on which action the user did. I would like to know how to scroll to the matching text I found to have it in the visible portion of the viewer.

Thank's
Alain
Deyan
Telerik team
 answered on 10 Nov 2014
2 answers
410 views
Hello,

I create dynamically my columns through an attached property and can't seem to set the string format for my columns. I would like my number have the format 1234.00 > 1,234.00

How to do that ?

I tried with:
in my .xaml:

<telerik:RadGridView  x:Name="RadGridView1"    
                              ItemsSource="{Binding ResultsViewModelList}" AutoGenerateColumns="False"  
                              custom:GridViewDataColumnsBehavior.BindableColumns="{Binding ColumnCollection}"
...
    
in my view model :
 // Toggle Column
GridViewToggleRowDetailsColumn gridRowToggle = new GridViewToggleRowDetailsColumn();
ColumnCollection.Add(gridRowToggle);

//data column
GridViewDataColumn column =
new GridViewDataColumn();
 string columnName = "column1";
 column.Header = columnName;
 column.UniqueName = columnName;
 column.DataMemberBinding = new Binding("ResultDataDictionary[" + columnName + "]");
 column.DataMemberBinding.StringFormat = "0:N"//also tried with N , {0:N}, ...
//also tried > column.DataFormatString = "0:N";
 column.DataType = typeof(double);
 
ColumnCollection.Add(column);

in GridViewDataColumnsBehavior:

public static readonly DependencyProperty BindableColumnsProperty =
            DependencyProperty.RegisterAttached("BindableColumns",
                                                typeof(ObservableCollection<GridViewColumn>),
                                                typeof(GridViewDataColumnsBehavior),
                                                new UIPropertyMetadata(null, BindableColumnsPropertyChanged));
 
        private static void BindableColumnsPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            RadGridView RadGridView = source as RadGridView;
            ObservableCollection<GridViewColumn> columns = e.NewValue as ObservableCollection<GridViewColumn>;
            RadGridView.Columns.Clear();
            if (columns == null)
            {
                return;
            }
            foreach (GridViewColumn column in columns)
            {
                RadGridView.Columns.Add(column);
            }
 
.....

Dimitrina
Telerik team
 answered on 10 Nov 2014
1 answer
824 views
I want to bind a RadGridView and a RadDataForm to the same collection of items and they should synchronize like in your WPF demo application. When I bind the ItemsSource property directly to my ICollectionView property in the ViewModel everything works fine. But when I create a CollectionViewSource bound to that property and use this resource as ItemsSource both controls do not show the data. Why is that not possible? I want to add sorting and grouping and CollectionViewSource seems to be the right way. Here's my code:

​
01.<Window x:Class="WpfApplication1.MainWindow"
04.        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
05.        Title="MainWindow">
06.    <Window.Resources>
07.        <CollectionViewSource x:Key="MySource" Source="{Binding ItemsView}" />
08.    </Window.Resources>
09.    <Grid>
10.        <StackPanel>
11.            <StackPanel Orientation="Horizontal" Height="200" Margin="10">
12.                <!-- binding directly to property ItemsView in DataContext/ViewModel ... WORKING -->
13.                <telerik:RadGridView AutoGenerateColumns="True" ItemsSource="{Binding ItemsView}" Width="200" />
14.                <telerik:RadDataForm AutoGenerateFields="True" ItemsSource="{Binding ItemsView}" Width="200" />
15.            </StackPanel>
16.            <StackPanel Orientation="Horizontal" Height="200" Margin="10">
17.                <!-- binding to CollectionViewSource ... NOT working -->
18.                <telerik:RadGridView AutoGenerateColumns="True" ItemsSource="{Binding Source={StaticResource MySource}}" Width="200" />
19.                <telerik:RadDataForm AutoGenerateFields="True" ItemsSource="{Binding Source={StaticResource MySource}}" Width="200" />
20.            </StackPanel>
21.        </StackPanel>
22.    </Grid>
23.</Window>
Dimitrina
Telerik team
 answered on 07 Nov 2014
5 answers
348 views
I have DB table Vehicle and I am using EF4. So I got a partial class Vehicle to map with the db table.
Vehicle is a master table. It has a detail table Fault.  1 vehicle could have many faults.

I am trying to get the count of fault associated with vehicle. So I created one customized property for Vehicle class. FaultCount.

Partial Class Vehicle
{

    public global::System.Int32 FaultCount
        {
            get
            {
                CCF20Entities ccf20Ent = new CCF20Entities();
                return ccf20Ent.Faults.Where(f => f.IsActive && f.FaultType == "Vehcile" && f.VehicleID== this.VehicleID).Count();
            }

        }

}
Everything works fine. I got the data I want and populate the grid. But when I try to sort the column, I get the exception.

"The specified type member 'FaultCount' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."

Any help?

Thx,
David
Dimitrina
Telerik team
 answered on 07 Nov 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?