Telerik Forums
UI for WPF Forum
0 answers
54 views

Hello, I use the chart with binding for the data and the label.



// Model
public class StatisticRowItem
{
public double ValueDouble { get; set; }
public string Value { get; set; }
public string Name { get; set; }
}
// ViewModel public class ViewModel { public ObservableCollection<StatisticRowItem> RowItemList { get; set; } }

If only the values are bound, the calculation of the percentage values is correct.



<telerik:RadPieChart Grid.Row="1" Palette="{StaticResource customPalette}">
    <telerik:RadPieChart.Series>
        <telerik:DoughnutSeries
            InnerRadiusFactor="0.35"
            ItemsSource="{Binding RowItemList}"
            RadiusFactor="0.50">
            <telerik:DoughnutSeries.ValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="ValueDouble" />
            </telerik:DoughnutSeries.ValueBinding>
            <telerik:DoughnutSeries.LabelConnectorsSettings>
                <telerik:ChartSeriesLabelConnectorsSettings />
            </telerik:DoughnutSeries.LabelConnectorsSettings>
        </telerik:DoughnutSeries>
    </telerik:RadPieChart.Series>
</telerik:RadPieChart>

However, if the value and the label are linked, the calculation is incorrect.


<telerik:RadPieChart Grid.Row="1" Palette="{StaticResource customPalette}">
    <telerik:RadPieChart.Series>
        <telerik:DoughnutSeries
            InnerRadiusFactor="0.35"
            ItemsSource="{Binding RowItemList}"
            RadiusFactor="0.50">
            <telerik:DoughnutSeries.ValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="ValueDouble" />
            </telerik:DoughnutSeries.ValueBinding>
            <telerik:DoughnutSeries.LabelDefinitions>
                <telerik:ChartSeriesLabelDefinition Margin="-15,0,0,0">
                    <telerik:ChartSeriesLabelDefinition.Template>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock
                                    Foreground="{DynamicResource Brushes.Text.Dark}"
                                    Text="{Binding DataItem.Name}"
                                    Style="{StaticResource ControlBase.FontStyle.ButtonText}" />
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    Foreground="{DynamicResource Brushes.Text.Dark}"
                                    Style="{StaticResource ControlBase.FontStyle.ButtonText}"
                                    Text="{Binding Value}" />
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    Foreground="{DynamicResource Brushes.Text.Dark}"
                                    Style="{StaticResource ControlBase.FontStyle.ButtonText}"
                                    Text="{Binding Percent}" />
                            </StackPanel>
                        </DataTemplate>
                    </telerik:ChartSeriesLabelDefinition.Template>
                </telerik:ChartSeriesLabelDefinition>
            </telerik:DoughnutSeries.LabelDefinitions>
            <telerik:DoughnutSeries.LabelConnectorsSettings>
                <telerik:ChartSeriesLabelConnectorsSettings />
            </telerik:DoughnutSeries.LabelConnectorsSettings>
        </telerik:DoughnutSeries>
    </telerik:RadPieChart.Series>
</telerik:RadPieChart>

 

The Telerik version 2024.1.130.45 of the WPF controls is used.

Gerhard
Top achievements
Rank 1
Iron
Iron
 asked on 17 Dec 2024
1 answer
49 views

Hi,

I have migrated a .NET 4.8 app to .NET 8.0. In the app I define some colors for the MarterialPalette in App.xaml.cs via

StyleManager.ApplicationTheme = new MaterialTheme();

MaterialPalette.Palette.PrimaryNormalColor = Colors.Red;

Long story short, when I use a Telerik control it ignores the changes done at the palette. 

I tried to create a small project to comprehend the problem, but unfortunately I was not able reproduce it on a simple basis.

So, my question is: Are there any konwn problems with the theming to take over changes that should appear globally?

 

Thanks in advance.

ffunke
Top achievements
Rank 2
Iron
 answered on 13 Dec 2024
1 answer
38 views
Update other column when editing another column
Martin Ivanov
Telerik team
 answered on 13 Dec 2024
1 answer
56 views

I am using a RadCartesianChart3D in a WPF application, where the label along the y-axis on the horiziontal plane denotes a "Flow direction" displayed using an Arrow symbol.

When/if the user rotates the chart around the vertical z-axis, so that the chart is seen from the backside, the values of the Y-axsis are reversed, which in my case translated to the "flow direction" should be swapped, as in: I need to change the arrow symbol in the y-axis label from "Pointing Right" to "Pointing Left" (or the opposite).

I notice, that the RadCartesianChart3D is actually already "flipping" the text label as the chart is rotated.

Is there any way I can intercept this behaviour, eg. as a ChartRotated or LabelPositionUpdated event, as the user rotates the chart, so that I can change the Label text as needed?

Two images attached to illustrate what I try to accomplish

/Thanx

Missing User
 answered on 12 Dec 2024
1 answer
63 views

Hi,

Does anyone know how I can set the text manually in a RadPropertyGrid and a ComboBox? Or also the selectedIndex? I want to manually set ONLY this one element.


               <telerik:RadPropertyGrid AutoGeneratePropertyDefinitions="False"
                                     x:Name="PropertyBenutzer"  
                                     LabelColumnWidth="150" 
                                     MinHeight="50" 
                                     FontFamily="Tahoma" 
                                     FontWeight="Bold" 
                                     FontSize="12" 
                                     DescriptionPanelVisibility="Visible"
                                     CanUserResizeDescriptionPanel="True"
                                     telerik:StyleManager.Theme="Crystal"
                                     NestedPropertiesVisibility="Visible" 
                                     RenderMode="Flat"
                                     IsGrouped="True"
                                     Item="{Binding ElementName=MyPropertyGrid1}" 
                                     Canvas.Left="568" 
                                     >
...
                        <telerik:PropertyDefinition DisplayName="Anrede" OrderIndex="1" GroupName="Benutzer">
                            <telerik:PropertyDefinition.EditorTemplate>
                                <DataTemplate>
                                    <Border>
                                        <telerik:RadComboBox x:Name="ComboBoxAnrede" 
                                                         FontFamily="Tahoma" 
                                                         Width="156" 
                                                         HorizontalAlignment="Left" 
                                                         HorizontalContentAlignment="Center" 
                                                         SelectedItem="{Binding Anrede, Mode=TwoWay}"
                                                         ItemsSource="{Binding AnredeListe}"
                                                         DisplayMemberPath="Anrede"
                                                         IsEditable="False"
                                                         IsEnabled="true"
                                                         IsReadOnly="False"
                                                         MinWidth="30"
                                                         SelectedIndex="0" 
                                                         CanAutocompleteSelectItems="True" 
                                                         CanKeyboardNavigationSelectItems="True"
                                                         >
                                        </telerik:RadComboBox>
                                    </Border>
                                </DataTemplate>
                            </telerik:PropertyDefinition.EditorTemplate>
                        </telerik:PropertyDefinition>

 

 

Stenly
Telerik team
 answered on 09 Dec 2024
0 answers
55 views

I would like to drag text outside of a WPF RadRichTextBox into a different App.

It seems that dragging any text just outside of this control is not possible, not even within the same app.
IMHO the problem is, that text can be moved within this control, and this feature cannot be deactivated.

Thanks a lot in advance for any hints.

Edit: Just checked with standard RichTextBox (FlowControl) no problems out of the box. I can drag text internal and as soon as mousepointer went outside, everything is fine and works there.  Try this with RadRichTextBox and the Prompt goes crazy inside of your control.

 

 




Marcus
Top achievements
Rank 2
 updated question on 06 Dec 2024
1 answer
58 views

Hi Everyone,

Is there any way to put searchbox outside of radgrid? 

For example:

<stackpanel>

<searchpanel ...../>

</stackpanel>

<RadGridView ..... />

Thank you

Cris

Missing User
 answered on 03 Dec 2024
1 answer
104 views
Is it possible to get the mouse coordinates while in a handler for this event? It seems like Mouse.GetPosition isn't returning valid information.
Martin Ivanov
Telerik team
 answered on 02 Dec 2024
1 answer
85 views

I use nuget.telerik for my CI/CD.

There is actually a bug in WPF controls (Touch Manager) which is fixed in preview version Telerik UI for WPF 2024.4.1126

But this version is not available throught nuget.telerik.

How can I use it in my CI/CD?

Stenly
Telerik team
 answered on 27 Nov 2024
1 answer
149 views

Hello,

i'm using a RadButton with a RadBadge to open an dialog with new  messages.

Now i'm wondering how to  hide the RadBadge when there are no new messages...

In my viewmodel i have a property (bool) that indicates, if the badge should be visible or not...

 

Here's the XAML - its part of a datatemplate for a RadWindow:

<telerik:RadButton x:Name="manButton"  Grid.Column="7" Margin="10,6" Command="{Binding ShowManCommand}" Focusable="False">
    <telerik:RadButton.Content>
        <Image Source="{iconPacks:MaterialImage CommentTextMultipleOutline, Brush=White}" Margin="4" />
    </telerik:RadButton.Content>
    <telerik:RadBadge.Badge>
        <telerik:RadBadge BadgeType="ContentOnly"  AnchorPosition="1,1" Position="1.1,0.4" 
                          Geometry="{telerik:Geometry Type=Oval}" Background="Red" 
                          FontSize="12" Height="16" Width="28"
                          Content="{Binding ManMessageCount}" 
                          Visibility="{Binding IsManBadgeVisible, Converter={converter:BoolToVisibilityConverter}}"/>
    </telerik:RadBadge.Badge>
</telerik:RadButton>

 

Is there a possibility to hide/collapse the RadBadge?  It seems that the visibility property isn't working...

Stenly
Telerik team
 answered on 27 Nov 2024
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?