Telerik Forums
UI for WPF Forum
2 answers
284 views

I've followed the 'getting started' documention for the chartview. 

I've created a new WPF .NET Core project. I've then added the following references:

- Telerik.Windows.Controls

- Telerik.Windows.Controls.Chart

- Telerik.Windows.Data

Then I've added the following xaml to the main window xaml file:

<telerik:RadCartesianChart>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
        </telerik:RadCartesianChart>

 

Nothing shows at all - I've was expecting something/anything before going on to binding a source of data.

What am i missing?

 

I'm using VS 2019 and the latest public version of the .NET Core wpf components.

 

Thank you

Rob
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 12 Nov 2019
1 answer
190 views

The RadComboBox seems to require the user to have the cursor over the item text to be able to select the item. This is not the case for the standard ComboBox. Is it possible to change this without creating a custom ControlTemplate?

It is not bad when the items are longer strings. But we have a combo box with individual characters, and you have to click directly on the character to select the item. For whatever reason, if the items in the combo box are integers, selection works as expected.

See the attached animated gif.

Todd
Top achievements
Rank 1
 answered on 11 Nov 2019
8 answers
262 views
In Excel, if you select a row and then drag down past the bottom of what is visible, it scrolls automatically for you. But the RadSpreadsheet does not do this. Is there an option I am missing or an easy workaround?
Peshito
Telerik team
 answered on 11 Nov 2019
2 answers
575 views

Hi All,

I am opening RadWindow with ShowDialog() from viewmodel. I am not able to detect close 'X' button event. I want to prompt user before closing. 

My code looks like:

AssetViewModel.cs

var AssetWindow = new RadWindow
            {
                Header = "Asset Information",
                Owner = Application.Current.MainWindow,                
                WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner,
                Content = new UserControl()
            };          
AssetWindow.ShowDialog();

What is the best approach to detect close event, prompt user and proceed with user selected option i.e Yes/No

 Any help would be appreciated,

Regards,

Prashant Kirpan

 

 

 

Prashant
Top achievements
Rank 1
 answered on 10 Nov 2019
1 answer
267 views

Hi All,

I am using RadTabControl and validation is working only if tab is selected. i.e. updating UI only for selected tab and not others.

I have a RadTabControl control with three RadTabItem. Every tabitem contains usercontrol with own view model.

For all user controls, i have used  IDataErrorInfo for validation. From main control, manually i am triggering validation using notifyproperty change i.e.  RaisePropertyChanged(string.Empty).

This is working fine only if tab is selected. validation is executing properly on other tabs but UI is not updating. 

Control Structure:

MainVM.cs

      - TabControl1VM = new TabControl1ViewModel();

      - TabControl2.VM = new TabControl2ViewModel();

 

MainControl.xaml

  <telerik:RadTabControl  >
            <telerik:RadTabItem  Header="Location" DataContext="{Binding TabControl1VM}" >
                <telerik:RadTabItem.Content >                    
                        <local:TabControl1></local:TabControl1>                    
                </telerik:RadTabItem.Content>
            </telerik:RadTabItem>

            <telerik:RadTabItem Header="Asset Type" DataContext="{Binding TabControl2VM}">
                <telerik:RadTabItem.Content>
                    <local:TabControl2></local:TabControl2>
                </telerik:RadTabItem.Content>
            </telerik:RadTabItem>

 

Any help would be appreciated,

Regards,

Prashant
           

 

 

 

 

Petar Mladenov
Telerik team
 answered on 08 Nov 2019
15 answers
1.2K+ views
Hi,

I'm looking for a way to bind a List of key / value objects to the propertygrid. Consider the following snippets of code:

public void PopulatePropertyGrid()
{
    List<MyKeyValueClass> propertyList = new List<MyKeyValueClass>();
    propertyList.Add(new MyKeyValueClass(){ Key="property1", Value="value1" });
    propertyList.Add(new MyKeyValueClass(){ Key="property2", Value="value2" });
    propertyList.Add(new MyKeyValueClass(){ Key="property3", Value="value3" });
    //How do I bind this List to a RadPropertyGrid, so I get 3 properties with filled in values?
}


public class MyKeyValueClass
{
    public string Key {get;set;}
    public string Value {get;set;}
}



I tried something like this:
XAML:
<telerik:RadPropertyGrid x:Name="radPropertyGrid" AutoGeneratePropertyDefinitions="false" />


.cs:
radPropertyGrid.PropertyDefinitions.Clear();
foreach (MyKeyValueClass mkvc in propertyList)
{
    radPropertyGrid.PropertyDefinitions.Add(new PropertyDefinition()
    {
        DisplayName = mkvc.Key,
        Binding = new Binding("Value")
    });
}
radPropertyGrid.Item = propertyList;




This sets the displaynames accordingly, but won't show / bind the values 
Is this possible?

Stan

-Edit: code blocks formatted
Dilyan Traykov
Telerik team
 answered on 08 Nov 2019
7 answers
356 views
I am currently trying to Drag Drop Custom Control from List box to RadDiagram.

I am able to Drag the Custom Control (Shell) but not able to Create a Shape in RadDiagram.

Code:

Shell (Custom Control)

 public class Shell : Telerik.Windows.Controls.Diagrams.RadDiagramShapeBase
    {
        static Shell()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(Shell), new FrameworkPropertyMetadata(typeof(Shell)));
        }
    }

Style
<Style TargetType="{x:Type local:Shell}">
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Height" Value="100"/>
        <Setter Property="Width" Value="100"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:Shell}">
                    <Grid Background="{TemplateBinding Background}">
                        <Ellipse Stroke="{TemplateBinding BorderBrush}"/>
                        <Ellipse  Margin="13" Stroke="Black" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Drag And Drop Code

Telerik.Windows.DragDrop.DragDropManager.AddDragInitializeHandler(listBox, OnDragInitialize);  (ListBox)
Telerik.Windows.DragDrop.DragDropManager.AddDropHandler(radDiagram, OnDropShape);(RadDiagram)

 private void OnDropShape(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
        {
            e.Handled = true;
            Shell shape = new Shell();
            var rawdata= (e.Data as DataObject).GetData(typeof(Shell));
            
           
            {
                Shell droppedShape = rawdata as Shell;
               
                this.radDiagram.AddShape(droppedShape);
           
            }
            
        }

        private void OnDragInitialize(object sender,Telerik.Windows.DragDrop.DragInitializeEventArgs e)
        {
            e.AllowedEffects = DragDropEffects.All;
           Shell draggedshape = (e.OriginalSource as ListBoxItem).Content as Shell;
           e.Data = draggedshape;
            
        }
 I am able to get the dragged Shell but i don`t know how to convert the Shell object to RadDiagramShape.

Any help is appreciated!!!


 







Thomas
Top achievements
Rank 1
 answered on 08 Nov 2019
5 answers
418 views

Hi,

 

I'm trying to fill my RadTileView on an event Window_Loaded.

The form updates ok in terms of code, but visualualy it remains empty and i have no idea why:

private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MyRadtileView.Items.Clear();
            MyRadtileView.Items.Add(new RadTileViewItem()
            {
                Header = "test"
            });
 
            MyRadtileView.UpdateLayout();
        }

 

Result:

 

 

Can anyone help me?

Martin Ivanov
Telerik team
 answered on 08 Nov 2019
1 answer
122 views

Hi,

I would like to customise the animation for the opening and navigate event/state of the radial menu. How can I do it? Thank you! 

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Nov 2019
2 answers
244 views

I have an existing WPF application which uses Microsoft.Windows.controls.Datagrid. I want to add the RadDataPager to do the pagination, how can I do it? 

Here's my sample code. It displays the data but it doesn't do the pagination. All data is displayed in a single page.

<dg:DataGrid Name="dgRegistryDetails" FontSize="14" DockPanel.Dock="Bottom" Foreground="#FF07315B"

                         ItemsSource="{Binding}"   CanUserSortColumns="true"
IsReadOnly="True"    AutoGenerateColumns="False" >

 

<telerik:RadDataPager VerticalAlignment="Bottom" DisplayMode="FirstLastPreviousNextNumeric" Source="{Binding Items, ElementName=dgRegistryDetails}"  IsTotalItemCountFixed="True" x:Name="RadPager" PageSize="10" />

Niraja
Top achievements
Rank 1
 answered on 08 Nov 2019
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
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?