Telerik Forums
UI for WPF Forum
5 answers
321 views

Hello.

 

I found something unknown while using the hierarchical menu.

Click the hierarchical menu and click the ESC or menu to hide the hierarchical menu.

I made it short as a gif, but I hope it helps you understand.

Attach the source. What is the problem.

Xaml

<Grid>
        <Grid.Resources>
            <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" />
            <Style x:Key="BaseNavigationViewItemStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource RadNavigationViewItemStyle}">
                <Setter Property="DisplayMemberPath" Value="Title" />
                <Setter Property="Icon" Value="{Binding Glyph}" />
                <Setter Property="IconTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" />
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
 
            <Style x:Key="NavigationSubItemStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource BaseNavigationViewItemStyle}">
                <Setter Property="IconVisibility" Value="Collapsed" />
            </Style>
        </Grid.Resources>
 
        <telerik:RadNavigationView Grid.Row="1"
                                   CanKeyboardNavigationSelectItems ="True"
                                   CompactPaneWidth="60" 
                                   AutoChangeDisplayMode="False"
                                   DisplayMode="Expanded"
                                   DisplayMemberPath="Title"
                                   PaneHeader    ="{Binding Header, Mode=OneTime}"
                                   ItemsSource   ="{Binding Menu1}"
                                   SelectedItem  ="{Binding MenuItem1,  Mode=TwoWay}"
                                   >
            <telerik:RadNavigationView.ItemContainerStyle>
                <Style TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource BaseNavigationViewItemStyle}">
                    <Setter Property="ItemsSource" Value="{Binding SubItems}" />
                    <Setter Property="ItemContainerStyle" Value="{StaticResource NavigationSubItemStyle}" />
                </Style>
            </telerik:RadNavigationView.ItemContainerStyle>
 
 
            <telerik:RadNavigationView.Content>
                <ContentControl Content="{Binding ViewContent, Mode=TwoWay}"/>
            </telerik:RadNavigationView.Content>
 
        </telerik:RadNavigationView>
 
    </Grid>

 

ViewModel

private void Data()
        {
            var multiBatchView = new MultiBatchView();
            Menu1.Add(new navi
            {
                Glyph = "",
                Title = "Multi File Check",
                TypeUserControl = multiBatchView,
            });
 
            Menu1.Add(new navi
            {
                Title = "Settings",
                Glyph = "",
                TypeUserControl = null,
                SubItems = new ObservableCollection<navi>
                {
                    new navi
                    {
                        Title           = "Test",
                        TypeUserControl = null,
                    },
                    new navi
                    {
                        Title           = "Overlap",
                        TypeUserControl = optionOverlapView,
                    },
                    new navi
                    {
                        Title           = "Connection",
                        TypeUserControl = optionConnectionView
                    },
                    new navi
                    {
                        Title           = "Quality",
                        TypeUserControl = optionQualityView
                    },
                    new navi
                    {
                        Title           =  "Export/Import",
                        TypeUserControl = optionExportImportView
                    },
                }
            });
 
 
            MenuItem1 = Menu1.FirstOrDefault();
        }

 

Model

public class navi
{
    public string Glyph { get; set; }
 
    public string Title { get; set; }
 
    public UserControl TypeUserControl { get; set; }
 
    public ObservableCollection<navi> SubItems { get; set; }
}

 

 

Thanks.

 

Martin Ivanov
Telerik team
 answered on 06 Jan 2021
7 answers
772 views

Hi,

Below is my code snippet for RadComboBox that I am using:

<telerik:RadComboBox ItemsSource="{Binding xyz}"
                                                     IsEnabled="False"
                                                     IsEditable="False"
                                                     HorizontalAlignment="Stretch"
                                                     SelectedIndex="1" 
                                                     Width="Auto">

When I apply the below style to change foreground color when disabled, it is not working:

<telerik:RadComboBox.TextBoxStyle>
                                                        <Style TargetType="TextBox">
                                                            <Style.Triggers>
                                                                <Trigger Property="IsEnabled" Value="False">
                                                                    <Setter Property="Foreground" Value="Gray" />
                                                                </Trigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </telerik:RadComboBox.TextBoxStyle>

 

This trigger only works when I set IsEditable-"True" and IsFilteringEnabled="True"

 

Is there any way that I can change the font color even when IsEditable-"False"?

 

Thanks,

Aanchal

Martin Ivanov
Telerik team
 answered on 05 Jan 2021
8 answers
334 views

In order to make the Slider handles "active" I have to click on a selection Thumb (start or end) then the handles become active and I can user them to increase/decrease incrementally.

Is this "by design"?  If so, is there a way to prevent this default behavior and always have the Handles "active" (clickable)?

Cheers, Rob.

Martin Ivanov
Telerik team
 answered on 05 Jan 2021
2 answers
115 views

I've been trying to use the ImageEditor's Hue and Saturation to accomplish the same task as Adobe's Color Channel Mixer but the operations are color channel specific and I was getting nowhere with it as I could potentially have Luminosity values above 1 which would cause issues with Saturation calculations.

Does anyone know if there is a .NET control or color management library that can be purchased or free that could accomplish the task of increasing/decrease individual color channels on an image?  I really only need the image as a "preview", and then use then save the R G B for use in another application.  RGB values are decimal but 0-100% but can be overdriven just like Adobe's Color Channel Mixer up to 500%  (adobe only goes up to 200%).

I've seen some sample code all C++ and "unsafe" code so wasn't too helpful ... either a .NET library or .NET control ... can anyone point me in a direction? 

Cheers, Rob.

 

 

Martin Ivanov
Telerik team
 answered on 05 Jan 2021
1 answer
266 views

I am trying to customize Insert hyperlink dialog. My goal is to apply hyperlink (navigationUri) from predefined list i.e. link to users available in system.

I am using WPF 5.0. I am not sure should I follow MEF approach or create usercontrol and implement functionality.

I found one old thread

Can I customize the default "Insert Hyperlink" dialog window. But I am facing following error

Cannot resolve dependency to assembly 'Telerik.Windows.Documents.Core, Version=2020.3.1019.40

 

Can you please guide me how to achieve this task.  

Dimitar
Telerik team
 answered on 04 Jan 2021
4 answers
472 views
Hi,

I have some RadListbox inside a ScrollViewer and I would like to be able to scroll with the mouse wheel anywhere inside the scrollviewer.
I'm aware that the RadListBox has a ScrollViewer in his template that capture the MouseWheelEvent so I changed the template by the following.

<Style x:Key="UnscrollableRadListBoxStyle" TargetType="telerik:RadListBox" BasedOn="{StaticResource RadListBoxStyle}">
        <Setter Property="telerik:ScrollingSettingsBehavior.IsEnabled" Value="False"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadListBox">
                    <Grid>
                        <Border Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Margin="0"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border.InputBindings>
                                <KeyBinding Command="telerik:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                            </Border.InputBindings>
                            <ItemsPresenter/>
                        </Border>
                        <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Now, the scroll works great, I can scroll with the mouse wheel everywhere. The problem is that when I drop an item inside one of the RadListBox, the DropVisualPlaceHolder appear at wrong place.

Do you have any idea of what I've done wrong ?

Thank you,

Etienne
Dilyan Traykov
Telerik team
 answered on 04 Jan 2021
6 answers
114 views

Hi All,

Any Idea to dig More information on RadCartesianChart control. I have attached a sample graph(sampleBarGraphs.jpeg) snap for reference. As you can see in the snap it is a bar graph which different Activities like planned-131,completed-45 etc. So when I click on Planned Activity in the bar I need to dig more information on it  like a pop up which displayed some rad list items the count of these list is the Planned activity count in the bar graph.

Any samples solutions or documentation for reference to implement the sample graph using telerik controls/behavior's.

Thanks in Advance.

 

Kishorekumar
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
1 answer
1.4K+ views

Hello. 
We have a need to execute some command when the window is fully loaded. In order to do that we want to be able to bind event ContentRendered to the command in view model.

What would be the best way to achieve this? As I understood there are three approaches:

- resolving view model from the condebehind and invoking the command

- interactivity library (additional dependancy)

- a combination of attached property and attached behavior

 

What is a recommended way to bind to the window event in MVVM style? Is there a code sample somewhere to take a look at?

 

Thank you.

Martin Ivanov
Telerik team
 answered on 30 Dec 2020
1 answer
141 views

Hi All,

Is there any possible for changing the content of ChartTrackBallBehavior. I have attached a sample image(sample.jpg).I want to modify content of the track ball Behaviour.

Thanks in Advance!

Martin Ivanov
Telerik team
 answered on 30 Dec 2020
3 answers
352 views
I have a quickly updated interface with a lot of UI elements. When trying to drag and drop RadPane, users encounter difficulties, on a slow computer it can take 30 seconds or more. I recorded a small video to make it clear what it was about. In my opinion, when dragging, it is necessary to disable the redrawing of elements inside the container, but how to do this?
I've tried set DragDropMode = DockingDragDropMode.Deferred, it's very fast, but when moving the cursor outside the main window, the application crashes.
Can you advise anything?

https://youtu.be/yD69Nj1B_Bc
Martin Ivanov
Telerik team
 answered on 30 Dec 2020
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?