Telerik Forums
UI for WPF Forum
3 answers
169 views
We are looking for a way to manually resize the submenu for items that have a very large collection of menu items.  Sometimes, these lists are long enough that the submenu ends up taking up the entirety of the vertical space on screen, including the taskbar.  We'd like to limit the height of the submenus to the size of the current workspace, effectively allowing the panel to scroll more through the content and display less at a time.

A solution in xaml is not sufficient, as these submenus are dynamically populated in code.  We already have code set up to determine what we'd like to set the height of the submenu's panel to, but despite trying many ways of getting ahold of the correct components in code, we have been unable to successfully modify the submenu panel's height.

Anybody know of a good solution for this?
Vladimir Stoyanov
Telerik team
 answered on 10 Mar 2021
4 answers
235 views

I'm trying to build a worksheet header section with will be roughly six row.

Where cell A1 will have a fontsize of 20 and in green.

Cell D1 will be a date and time as a string.

Cell A2 will have some data, A3 blank, A4 some string, A5 some string.

Row 7 have the column header.

Not clear on how this work. My test code failed. Not understanding how Telerik walks through Cell's rows and column. Can you help with what documentation to read and samples to use?

herb
Top achievements
Rank 1
Veteran
Iron
 answered on 10 Mar 2021
1 answer
172 views

Hi,

we have a MVVM Scenario, where changes in the Raddiagram need to be reflected in the underlying viewmodel.

For shapes and connections that is easy, because we can implement IObservableGraphSource and contruct the necessary objects. ConnectionPoints however seem tricky. While moving a point triggers a ConnectionManipulationEvent, adding or deleting points via CTRL+Click apparently do not trigger this event?

I do realize that, even though it only exposes IList, ConnectionPoints is actually an ObeservableCollection and with this knowledge I can hack my way around this, but then adding a new Point causes this collection to reset and add all points one by one again, which is also not really what I want to do in my Viewmodel.

Is there an easier way to reflect these changes (adding/removing ConnectionPoints) back into the viewmodel properly, without having to create a custom ConnectionManipulationTool wihich notifies on such changes?

Thanks in advance!

Regards

Martin Ivanov
Telerik team
 answered on 10 Mar 2021
2 answers
424 views

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?

 

Joe
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 09 Mar 2021
2 answers
327 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
191 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
419 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
108 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
161 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
173 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
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?