I have a FilePathPicker with the FilePath property set to a two-way binding to a view-model property. Whenever (in code-behind) I set the corresponding bound property (and then Raise a PropertyChanged notification for it), the FilePath in the text box does not update, no matter what the UpdateSourceTrigger. I cannot understand why.
I went and wrote a test application and reproduced the same effect. Isn't the FilePath property supposed to work as a two-way binding?
Here is the XAML binding.
<tk:RadFilePathPicker FilePath="{Binding ReportHeaderImagePath, Mode=TwoWay}" IconVisibility="Collapsed"/>
And here is the bound property in the ViewModel
private string _reportHeaderImagePath;public string ReportHeaderImagePath{ get => Settings.ReportHeaderImagePath; set { _reportHeaderImagePath = value; RaisePropertyChanged(nameof(ReportHeaderImagePath)); }}
When my code sets this ReportHeaderImagePath property to null or string.Empty, I can see the value being set in the debugger and I can see the PropertyChanged event being raised. But still the editor in the RadFilePathPicker does not change. The previous path stays there. I have to either manually edit it or click the little "X" button inside it.
I have tried setting the Binding's UpdateSourceTrigger value all possible choices Default, LostFocus, PropertyChanged and even Explicit. Nothing works.
What am I missing?
The SyntaxEditor is great! I'd like to use it inside a LayoutControl though, basically like this:
<telerik:RadLayoutControl >
<telerik:LayoutControlGroup Orientation="Vertical">
<telerik:LayoutControlGroup Orientation="Horizontal">
<telerik:LayoutControlSplitter />
<telerik:RadSyntaxEditor />
</telerik:LayoutControlGroup>
<telerik:LayoutControlSplitter />
</telerik:LayoutControlGroup>
</telerik:RadLayoutControl>
I have that working with a fixed size editor, but it would be much nicer if the editor resized when the splitters were moved. However, if I don't make the editor fixed size I get the error "Placing RadSyntaxEditor in a panel or control that measures it with infinite height is not supported unless height is set to the control".
Is there a work-around for this? If not, could you add support in a future release?
Regards,
Georg
Hello,
I have a problem with the RadMaskedTextInput-Control.
When I set the UpdateValueEvent-Property to LostFocus, then the input isn't converted to UpperCase anymore.
My xaml looks like this:
<telerik:RadMaskedTextInput Width="140" Height="22" IsClearButtonVisible="False" InputBehavior="Replace" Mask=">X8" SelectionOnFocus="Unchanged" TextMode="MaskedText" UpdateValueEvent="LostFocus" Value="affeaffe"/>
I defined a ValidationRule to allow only Hex-Value for Input:
public class HexToken : ITokenValidationRule { public bool IsRequired { get { return false; } } public bool IsValid(char ch) { return ValidChars.Contains(ch); } public char Token { get { return 'X'; } } public TokenTypes Type { get { return TokenTypes.AlphaNumeric; } } private string myValidChars = "0123456789abcdefABCDEF"; public string ValidChars { get { return myValidChars; } } }
Can you help me with this plz?
regards,
Tobias
Hi, I've below xaml code for the RadLegend. The path data is causing the runtime error as could not find the assembly file. Could you please advise?
<telerik:RadLegend x:Name="legends" Items="{Binding LegendItems, ElementName=lineChart}"
FontFamily="Segoe UI"
Margin="2 52 30 20">
<telerik:RadLegend.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox IsChecked="{Binding Presenter.DataContext.IsVisible, Mode=TwoWay}"></CheckBox> <!--Command="{Binding DataContext.UpdateSeriesVisibilityCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}"-->
<Path Fill="{Binding MarkerFill}" Width="15" Height="15">
<Path.Data>
<Binding Path="ActualMarkerGeometry" RelativeSource="{RelativeSource AncestorType=telerik:LegendItemControl}"></Binding>
</Path.Data>
</Path>
<TextBlock Text="{Binding Title}" />
</StackPanel>
</DataTemplate>
</telerik:RadLegend.ItemTemplate>
</telerik:RadLegend>
Hi Telerik!
We've had RibbonView deployed without problem for many years, I believe running Q1 2018.
Now we are getting a strange exception caused by a recursive call / infinite loop:
"System.Windows.Input.MouseDevice.Capture(System.Windows.IInputElement, System.Windows.Input.CaptureMode)",
"Telerik.Windows.Controls.AutoClosePopupWrapper.OnLostMouseCapture(System.Object, System.Windows.Input.MouseEventArgs)",
"System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)",
"System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)",
"System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)",
"System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)",
"System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)",
"System.Windows.Input.InputManager.ProcessStagingArea()",
"System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)",
"System.Windows.Input.MouseDevice.ChangeMouseCapture(System.Windows.IInputElement, System.Windows.Input.IMouseInputProvider, System.Windows.Input.CaptureMode, Int32)"
Any ideas?
Thanks
Pete
We have a WPF MVVM application.. use QueryableCollectionView for filtering items from two collections.
QCV created in VM... and also added FilterDescription to it.
RadGridView used QCV as ItemsSource.
View with RadGridView also used RadDocking and in Loaded handler there restore DockingLayout via call Docking.LoadLayout(fileStream)
We found that this operation affect on clear FilterDescriptions from QCV.
How it possible to avoid it?

<Window x:Class="ButtonsDisappear.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="600" Width="800" WindowState="Maximized"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="35"/> <RowDefinition Height="*"/> <RowDefinition Height="35"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid Grid.Row="2" Grid.Column="0"> <Grid.RowDefinitions> <RowDefinition x:Name="gridRow2" Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition x:Name="gridColumn0" Width="*"/> <ColumnDefinition x:Name="gridColumn1" Width="*"/> </Grid.ColumnDefinitions> <telerik:RadButton Grid.Row="0" Grid.Column="0" x:Name="radButton" Content="Test Button" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{Binding ElementName=gridColumn0, Path=ActualWidth}" Height="{Binding ElementName=gridRow2, Path=ActualHeight}" Click="radButton_Click"/> </Grid> </Grid></Window>
using System.Windows;using Telerik.Windows.Controls;namespace ButtonsDisappear{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void radButton_Click(object sender, RoutedEventArgs e) { RadButton b = (RadButton)sender; } }}
How do I get the selected value when I am using MVVM?
I have tried this:
<telerik:RadColorEditor SelectedColor="{Binding SelectedColor, Mode=TwoWay}" ColorMode="RGB" />
but it doesn't give me anything back.
I am using the "UI for WPF Q1 2016" release, WPF, .NET Framework 4.6.1, Windows 10 and C#.
I am trying to implement drag and drop within a single RadTreeView. The default drag visual has a great structure, but has some problems for me. (The background of the drag item is dark and I can't read the dragged item's name, and the drop tooltip seems to be calling ToString() on my viewmodel, and that is not the text that I want.)
Researching, the page "Customize the TreeViewDragVisual" (https://docs.telerik.com/devtools/wpf/controls/radtreeview/how-to/customize-treeviewdragvisual)
tells me to derive from RadTreeView and to modify the template. But I am using NoXaml binaries and this page indicates that I must set the control template in app.xaml. Therefore it will apply to all RadTreeViews, and this doesn't seem like what I want to do.
Then I find the forum post on modifying the tooltip (https://www.telerik.com/forums/treeview---how-to-modify-the-drag-drop-drag-tooltip-target-part)
which points me at the DragDropManager. The manager has a "Set Drag Visual" topic (https://docs.telerik.com/devtools/wpf/controls/dragdropmanager/how-to/dragdrompmanager-howto-set-drag-visual) which says to handle DragDropManager.AddDragInitializeHandler and create a new drag visual in
the handler. This seems better than modifying app.xaml.
Also DragDropManager has the topic "Customizing the DragVisual" (https://docs.telerik.com/devtools/wpf/controls/dragdropmanager/behaviors/customizingdragvisual) which talks about implementing IDragVisualProvider. But the example is for ListBox and I'm using a RadTreeView.
So I'm all kinds of confused.
First, I need to fix the drag visual. I like the Drop Preview Line, the Drag Preview, and the Drag Tooltip parts. I need to change the Drag Preview and the Drag Tooltip.
Then I need to handle the "drop", which I think is done by attaching my own handler to DragDropManager.Drop event.
Thanks for any help.
-John.