Telerik Forums
UI for WPF Forum
2 answers
355 views

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

 

 


 

Georg
Top achievements
Rank 1
Veteran
 answered on 09 Mar 2021
5 answers
223 views

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

Dilyan Traykov
Telerik team
 answered on 09 Mar 2021
1 answer
449 views

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>

Dilyan Traykov
Telerik team
 answered on 09 Mar 2021
1 answer
132 views

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

Dilyan Traykov
Telerik team
 answered on 09 Mar 2021
3 answers
175 views

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?

Martin Ivanov
Telerik team
 answered on 09 Mar 2021
1 answer
213 views
When this project is loaded in debug mode the RadButton is not visible, however if I Comment out the code for the button during debug, save it, uncomment the code and save again - T
<Window x:Class="ButtonsDisappear.MainWindow"
        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;
        }
    }
}
he button becomes visible...
Matthew
Top achievements
Rank 1
 answered on 08 Mar 2021
1 answer
153 views
Hello, good afternoon with everyone, I have a small query, I am working with RadWindow as parent container, and on this I open several UserControls, in one of these UserControls I have a WPF WebBrowser, but nothing is shown, only a white screen, when I set AllowTransparency = "False" in RadWindow, it shows perfectly, but I lose the transparency of the theme applied to RadWindow (telerik: StyleManager.Theme = "Fluent"), how can I keep the original design of the applied theme and keep the webBrowser working ?
Martin Ivanov
Telerik team
 answered on 08 Mar 2021
1 answer
113 views

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.

Fredrik
Top achievements
Rank 1
Veteran
Iron
 answered on 08 Mar 2021
3 answers
1.0K+ views

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.


Dilyan Traykov
Telerik team
 answered on 05 Mar 2021
1 answer
331 views

Hi,

I have List<Class> Classes, and List<Student> Students in each Class. I would like to show classes in different columns and students in different rows like the table below. Is it possible to do it by binding Classes to ItemsSource of RadGridView and make the items list horizontally?

 

Class 1   Class 2   Class 3   Class 4
Andy       Barry      Cathy      Darren
Eric         Frank     Gary        Helen
Iris          Jason     Kyle         Leon
Mary       Neil        Oscar      Peter

 

Thanks,

David

Dilyan Traykov
Telerik team
 answered on 05 Mar 2021
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?