Telerik Forums
UI for WPF Forum
5 answers
1.0K+ views
Hi,

using an attached behavior I tried to set the focus on a RadMaskedTextInput.
It didn't work as expected and so I tried to set it manually.

Doing this I found that IsFocused is not accessible as Dependency Property.
The question now - how to handle focusing in MVVM with RadMaksedTextInput.

My normal code looks something like this:
<TextBox Text="{Binding FirstName}" myExt:FocusExtension.IsFocused="{Binding IsFirstNameFocused}"...

Thanks
Manfred
Petar Mladenov
Telerik team
 answered on 24 Jul 2014
4 answers
162 views
We are running into several issues with the RTB regarding IMEs. Is there anyone out there that is using the RTB in an IME environment? Telerik claims to support the Microsoft IME (which is terribly shortsighted because it is for the most part terrible) but even that crashes. Looking for anybody who has found workarounds, we have a global application and are at the brink of moving to a different solution if we can't solve the IME problems. I have put the suggestions into Telerik's system to support other IME's.

Here are our issues (both replicated in the WPF demos with the Microsoft IME):
1. Application crashes if the first character entered uses the shift modifier.
2. If the last character is a double quote it will delete the previous character.

Other random crashes:
Parameter name: insertIMETextCommandContext ---> System.ArgumentNullException: Value cannot be null.
Parameter name: insertIMETextCommandContext
at Telerik.Windows.Documents.UI.CaretTextInputHandler.HandleTextInsertedWithIme(RadDocument document, String text, TextInsertedEventArgs e)
at Telerik.Windows.Documents.UI.Caret.OnTextInput(TextCompositionEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.TextCompositionManager.UnsafeCompleteComposition(TextComposition composition)
at System.Windows.Documents.ImmComposition.RaiseTextInputEvent(FrameworkTextComposition composition, String compositionString)
at System.Windows.Documents.ImmComposition.OnWmImeChar(IntPtr wParam, Boolean& handled)
at System.Windows.Documents.ImmComposition.ImmCompositionFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

----

This is one that our Russian users get a lot:

Parameter name: collection ---> System.ArgumentNullException: Value cannot be null.
Parameter name: collection
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Telerik.Windows.Automation.Peers.GridViewRowAutomationPeer.GetChildrenCore()
at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdatePeer(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Todor
Telerik team
 answered on 24 Jul 2014
4 answers
270 views
Hi,
I hope that You can help me with one really annoying error. If I replace:
<dHTML:HtmlDataProvider x:Name="HtmlDataProvider1"  RichTextBox="{Binding ElementName=richTextBox1}" Html="{Binding HeaderText, Mode=TwoWay}"  />
with:
<dXAML:XamlDataProvider x:Name="XamlDataProvider1" RichTextBox="{Binding ElementName=richTextBox1}" Xaml="{Binding HeaderText, Mode=TwoWay}"  />

i get, when app starts, error:

XamlParseErrorOccurred:

Data at the root level is invalid. Line 1, position 1.
in usercontrol header i have:
xmlns:dHTML="clr-namespace:Telerik.Windows.Documents.FormatProviders.Html;assembly=Telerik.Windows.Documents.FormatProviders.Html"
xmlns:dXAML="clr-namespace:Telerik.Windows.Documents.FormatProviders.Xaml;assembly=Telerik.Windows.Documents.FormatProviders.Xaml"

This is happening every time I start app, but if I undo changes, everything is again OK. This was working without problems few days ago. But, on the other side, same syntax working in other usercontrol.
Can You help?
Best Regards
Nebojsa Danilovic
Petya
Telerik team
 answered on 24 Jul 2014
2 answers
171 views
I am working on a component that guides the user through a series of steps in a workflow. If you refer to AllMinimized.PNG you can see how it currently looks when no TileViewItem is in the maximized state. Expanding the first item entitled "Strategy Selection" will result in the layout shown in TileSelected.PNG. All minimized tiles have shifted over one space to the left to take up the space left behind by expanding "Strategy Selection".

Instead of having the tiles slide over, I would prefer to insert a new tile at the same location of the one that is currently open that says "You are Here" to indicate to the user where they are relative to the established workflow as they should be completed one at a time. I have two classes that represent RadTileViewItems that should be used as these placeholder tiles and ones that represent the actual content, however I'm having trouble setting up an appropriate Style Selector or Data Template Selector that can appropriately render the right appearance. I want the Placeholder items to remove the ability for the user to expand or select them in any way as they are visually there only to remind the user where they are in the workflow. I looked at this forum post which is accomplishing something similar:  http://www.telerik.com/forums/604424-radtileviewitem-style but styles are hard coded as opposed to utilizing some kind of style/template selector so that I can switch based on the underlying data context.
Jesse
Top achievements
Rank 1
 answered on 23 Jul 2014
3 answers
169 views
Hi,

I'd like to know what is the criteria for items' vertical placement when the timeline item source is organized by groups. In my current scenario I would not like to have any group with a height greater than the rest. I thought, from observations, that this situation only occurred when the items' period overlapped, but apparently that is not all there is to it.

Also, in case I do have items with overlapping periods in the same group, is there a way to order them vertically? I'm attaching a picture to better describe my question: in this case, the second group occupies a larger area because one of its items got placed in a different height! Thanks in advance.

Regards,
Takeshi
Fernando
Top achievements
Rank 1
 answered on 23 Jul 2014
6 answers
145 views
Hello, i have found a interesting sample (Baseline_WPF)  in the xaml-sdk-master file.
My problem is i need this solution for my Project but this is coded in VB.NET and i
can't translate the c# code correctly because there a lot of special features inside like
yield operations. Please can you help me to translate this sample to VB.NET.

Greetings, Robert ....
Polya
Telerik team
 answered on 23 Jul 2014
1 answer
149 views
Hi,
how can I style the first and last days in the selected range?
Something like in this picture.
Thanks.
Kalin
Telerik team
 answered on 23 Jul 2014
5 answers
203 views
Hi,

I have a RadGridView that I want to implement databinding based on the cells selected in a column.  Currently, the row data is bound to the ItemsSource for databinding on the rows.  I want to be able to allow the user to select multiple cells within a column and once the user changes the value in one cell, the change will be applied to all the other cells selected in the column.   How can I implement that?  I have enabled SelectionMode=Extended and SelectionUnit=Cell to allow selection(s).

Thank you,
Robert Quan
Yoan
Telerik team
 answered on 23 Jul 2014
2 answers
120 views
Hello, I would like to perform Drag & Drop function from one ListBox to another ListBox as documented in this link:
http://www.telerik.com/help/wpf/radlistbox-features-dragdrop.html

However, it is not working for me. I'm able to drag items, but nothing happens while dropping. Maybe the documentation is clear enough of the necessary configurations needed for the ListBox which you want to drag items from, and the ListBox which you want to drop items to.

Here are my codes:
(ListBox I want to drag from)
<telerik:RadListBox Margin="5,5,5,5" Grid.Column="0" Grid.Row="3"
                                    x:Name="listBoxItems" HorizontalAlignment="Left" VerticalAlignment="Top" Width="250"
                                    ItemsSource="{Binding}" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                                    ItemTemplate="{StaticResource ListBoxCustomTemplate}" SelectionMode="Multiple"
                                    TextPath="Serial">
                    <telerik:RadListBox.DragVisualProvider>
                        <telerik:ScreenshotDragVisualProvider />
                    </telerik:RadListBox.DragVisualProvider>
                    <telerik:RadListBox.DragDropBehavior>
                        <telerik:ListBoxDragDropBehavior />
                    </telerik:RadListBox.DragDropBehavior>
                     
                </telerik:RadListBox>

(ListBox I want to drag to)
<telerik:RadListBox Grid.Row="0" Grid.Column="2" Margin="0, 5, 5, 5"
                x:Name="listBoxIssue" HorizontalAlignment="Left" VerticalAlignment="Top"
                Height="690" Width="793" ItemsSource="{Binding}" ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                                    ItemTemplate="{StaticResource ListBoxCustomTemplate}">
                <telerik:RadListBox.DragVisualProvider>
                    <telerik:ScreenshotDragVisualProvider />
                </telerik:RadListBox.DragVisualProvider>
                <telerik:RadListBox.DragDropBehavior>
                    <telerik:ListBoxDragDropBehavior />
                </telerik:RadListBox.DragDropBehavior>
            </telerik:RadListBox>
Kalin
Telerik team
 answered on 23 Jul 2014
1 answer
254 views
What is the correct way use a "DataColumn" object to tell the RadGridView which column to bind to? I can get it to bind using the "ColumnName" property on the column, but I would rather bind on the DataColumn object itself.

Here is a test program to demonstrate the problem

<Window x:Class="RadGridViewTest.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"
                xmlns:radGridViewTest="clr-namespace:RadGridViewTest"
                Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <radGridViewTest:ContextData x:Key="ContextData"/>
    </Window.Resources>
     
    <Grid DataContext="{StaticResource ContextData}">
        <telerik:RadGridView ItemsSource="{Binding Path=ExampleTable}"
                             AutoGenerateColumns="True"
                             ShowGroupPanel="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ExampleColumn}" Header="Via property"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Example}" Header="Via Column Name"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

​
using System.Data;
using System.Windows;
 
namespace RadGridViewTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
 
    public class ContextData
    {
        public ContextData()
        {
            ExampleTable = new StrongNamedDataTable();
 
            var row = ExampleTable.NewRow();
            row[ExampleTable.ExampleColumn] = "Test Data";
            ExampleTable.Rows.Add(row);
        }
 
        public StrongNamedDataTable ExampleTable { get; set; }
    }
 
    public class StrongNamedDataTable : DataTable
    {
        public StrongNamedDataTable()
        {
            ExampleColumn = this.Columns.Add("Example");
        }
 
        public DataColumn ExampleColumn { get; private set; }
    }
}


The column that I set via the property did not work, but the one referencing the column name and the auto generated column both worked. What is the correct way to reference a column using the property?
Yoan
Telerik team
 answered on 23 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?