Telerik Forums
UI for WPF Forum
1 answer
129 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
338 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
1 answer
198 views

Hi,

I'm trying to create a vertical tree in the RadDiagram with two wings.

Both wings will consist of multiple items. I've looked at your example and it seems to me that it's randomized which items get displayed above and under.

 

One solution I had in mind was to make two trees. One with TreeUp and the other with TreeDown. Somehow combine the roots of both trees together, but I still haven't figured out how to do this / or if this is even possible.

 

Is there a solution to this?

Any help would be appreciated. Thanks

Vladimir Stoyanov
Telerik team
 answered on 05 Mar 2021
1 answer
194 views

I'm using RadCartesianChart to display LineSeries. (How to attach the sample project?)

I'm implementing drag point for certain LineSeries, but always get null value. (See ConvertPointToData_Null.png)

Could anyone help on this?

--> Null data exception

--> Enable drag capability for specific line series only

--> Enable hide/show line series (like add checkboxes to the legend?)

 

Thanks.

Martin Ivanov
Telerik team
 answered on 04 Mar 2021
5 answers
232 views

Hi,

 

I need to bind the increasesmall and decreasesmal to 2 different smallchange.

Is it possible?if not there is a way that the increasesmall/decreasesmall will increase/decrease with 2 different stepvalue.

Thank you.

Dilyan Traykov
Telerik team
 answered on 04 Mar 2021
3 answers
297 views

Hi,

I am using the following code for progressbar, but when I'm resizing it it clips the progressbar when I reduce the size, but when I'm increasing the size it stretches fine according to the window size but on reducing the size it does not resize itself according to the parent reduced size but instead clips itself.

Please let me know what I am doing wrong in the code, I have to use these colors in my progressbar.

 

Thanks,

Tayyaba Naz

<telerik:RadProgressBar VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="30" Value="10" Minimum="1" Maximum="10" >
            <telerik:RadProgressBar.Foreground>
                <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                    <GradientStop Color="Yellow" Offset="0.3"/>
                    <GradientStop Color="Green" Offset="0.3"/>
                    <GradientStop Color="Green" Offset="0.6"/>
                    <GradientStop Color="Red" Offset="0.6"/>
                    <GradientStop Color="Red" Offset="0.8"/>
                    <GradientStop Color="Blue" Offset="0.8"/>
                    <GradientStop Color="Blue" Offset="0.9"/>
                    <!--<GradientStop Color="Blue" Offset="1"/>-->
                </LinearGradientBrush>
            </telerik:RadProgressBar.Foreground>
        </telerik:RadProgressBar>
Dilyan Traykov
Telerik team
 answered on 04 Mar 2021
2 answers
190 views
Hi,

I am having problems with memory leaks because of the TableStylesGallery from the ribbon. Every time I open an window with a Ribbon and Rad Rich Document the memory consumption keeps growing. If I comment the TableStylesGallery code the memory leak goes away. The problem is that I need to have the table styles in the ribbon and can't remove them. Any idea on how to fix this problem?

I have also attached a sample program that reproduces the leak. Just press the Create Copy button and then close the window multiple times and see how the memory consumption increases. (The project is in an archive I don't know if it will let me upload it)
Ivan Ivanov
Telerik team
 answered on 03 Mar 2021
3 answers
217 views
Hello, i downloading demo of software and start a new emptyu project in order to start to test.
The first feature i like of telerik is apparently can prevent muse promotion n touch event.

I create this code, but not work:

amespace TelerikWpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Telerik.Windows.Input.Touch.TouchManager.IsEnabled = true;
            Telerik.Windows.Input.Touch.TouchManager.IsTouchEnabled = true;
            Telerik.Windows.Input.Touch.TouchManager.SetShouldSuspendMousePromotion(this, true);
        }


    }
}


I run this empty app, and mouse promotion wont stop.
Why?
What I doing wrong?

Martin Ivanov
Telerik team
 answered on 03 Mar 2021
4 answers
259 views

I bound RadTileList's Tile Item with Number type field. and assigned ContentTemplateSelector. Idea is I want to load different Templates based on bound Content.

ContentTemplateSelector is working fine, and I am getting required result. Only minor issue I found that Content value (number) appears at bottom before Template loads i.e. before animation I can see Coent value which is (1,2,3,4).

 

I noticed the same issue in WPF demo NASDAQ tile. For reference I am attaching screenshot and yellow highlighted actual content value. Is there any way to hide actual Content value. 

 

Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 03 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
InlineAIAssistant
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?