Telerik Forums
UI for WPF Forum
1 answer
103 views
Right now, my trackball information appears directly over the mouse point.  It obscures the trackball line and the point on the plot about which info is being shown.  Like this:





What I would like is some sort of "smart" placement that puts the tip on one side or the other -- or even above, based on how much room is available.  Here's a crude example I hacked up merely by hard-coding the margin to be 100 pixels offset

            <tk:RadCartesianChart.TrackBallInfoStyle> 
                <Style TargetType="{x:Type tk:TrackBallInfoControl}"> 
                    <Setter Property="Margin" Value="100 0 0 0"/>
                </Style> 
            </tk:RadCartesianChart.TrackBallInfoStyle> 
The result is better but obviously does nothing to account for the actual font size (which could make 100 pixels not enough or too much) or location of the mouse on the control.  If I'm on the far right side of my chart, I want this info tip to move to the left so I can still read all of it.



As you can see, I've customized the TrackBallInfoTemplate quite a bit.   Maybe this option already existed and I broke it/neglected to set it in my customizations?  I cannot see any properties on the control that might let me set it.

Does anything like this exist?  Or do I need a really complicated converter...?
Martin Ivanov
Telerik team
 answered on 16 Aug 2022
0 answers
141 views

how can I specify MultipleSelectionBoxTemplate which i can access properties of selected items ?

i have an employee class 

    public class Employee {
    public string Firstname {get;set;}
    public string Lastname {get;set;}
    }



I am using Telerik radCombobox in my wpf application to display list of employee 

              <telerik:RadComboBox x:Name="radComboBox"
                                     Width="200" 
                                     AllowMultipleSelection="True" 
                                     ItemsSource="{Binding Path=EmployeeList}"  
                                     >

                    <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Path=Lastname}" />
                        </DataTemplate>
                    </telerik:RadComboBox.ItemTemplate>

note: this code simplified , i have to use ItemTemplate  because i set textblock style based on some condition 


this works fine for item template  but when i select an item the display text in combobox show  full name of Employee class (namespace + class name ) not the Lastname
i tried 

             <telerik:RadComboBox.MultipleSelectionBoxTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Path=Lastname}" />
                        </DataTemplate>
                    </telerik:RadComboBox.MultipleSelectionBoxTemplate>


i get no result , the combobox displayvalue of selected item is always empty.

i tried another solution 

                    <telerik:RadComboBox.MultipleSelectionBoxTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Path=SelectedItems,Converter={StaticResource SelectionToCustomStringCoverter}}" />
                        </DataTemplate>
                    </telerik:RadComboBox.MultipleSelectionBoxTemplate>

this neither work , the converter always execute at first selection 

this is really crazy spending 4 hours to figure out a simple thing , 
so my question is how can i specify MultipleSelectionBoxTemplate which i can access properties of selected items .



  
ARASH
Top achievements
Rank 1
 asked on 16 Aug 2022
1 answer
129 views

Hello, 

Using the DiagramDesignToolBox_WPF project diagram control (from Telerik's github) samples, I created a basic diagram. See attached.

Once the diagram is loaded, is it possible to associate commands such as click, be able to update the diagram object's background color, be able to update the diagram object's text, etc.?

Thanks,

Mark

One last question:

My Telerik subscription provides me with X support tickets per year but I can't find where to create a new support ticket. I see my past tickets that I've created but no where can I start a new one. How can I start a 'priority' question that is associated with my paid Telerik subscription?

Dilyan Traykov
Telerik team
 answered on 16 Aug 2022
1 answer
246 views
It would be good too see if it's either a tab or many spaces that are used in the code.
Stenly
Telerik team
 answered on 15 Aug 2022
0 answers
338 views

I have cells highlighted by changing cell' foreground color.

Now i need to collect those highlighted cells to select cells programmatically. I can browse through values but need to read back cell style:

List<GridViewCellInfo> highlightedCells = new List<GridViewCellInfo>();
foreach (var item in this.gridView.Items)
{
     foreach (var column in this.gridView.Columns.OfType<GridViewBoundColumnBase>())
     {
          var cell = column.GetValueForItem(item); // it is actual cell value
// looking for something like: 
// if (cell.Foreground == Brushes.Cyan)
//       highlightedCells.Add(cell)
     }
}
Thank you,
Gennady
Top achievements
Rank 2
Iron
Iron
 asked on 12 Aug 2022
1 answer
502 views

Hi

I am having an issue binding the IsSelected property of a RadListboxItem. Specifically I am attempting to follow the pattern provided in this blog post Accessing WPF ListBox SelectedItems using MVVM (markwithall.com)

The key part toward the bottom of the post is this which binds the IsSelected property of a ListBoxItem. I have tested it and it works just fine.

<ListBox ItemsSource="{Binding Items}" SelectionMode="Extended">
    <ListBox.ItemContainerStyle>
        <Style TargetType="ListBoxItem">
            <Setter Property="IsSelected" Value="{Binding IsSelected}" />
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>

However when I try to use a RadListbox and setup the ItemContainerStyle like this

<telerik:RadListBox.ItemContainerStyle>
	<Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
		<Setter Property="IsSelected" Value="{Binding IsSelected}" />
	</Style>
</telerik:RadListBox.ItemContainerStyle>
The bound value does not update, is this by design or a bug?
Ross
Top achievements
Rank 2
Iron
 answered on 12 Aug 2022
0 answers
248 views

Hello,

I have an issue concerning GridViewDataColumn. Currently, my data type is Enum. If I sort it in my RadGridView (click on the header of this column) the view is empty after my click, and every data disappear. With other fields it's working fine (string, int, etc..)

Here's how I create my Column:

<telerik:GridViewDataColumn                         
    Header="Type" UniqueName="MyType"
    DataMemberBinding="{Binding Type}"
    IsSortable="True" IsFilterable="False" IsResizable="True"
    TextAlignment="Left" HeaderTextAlignment="Center" />

It doesn't look possible to sort Enum in this field. Someone has a solution or can help me to make a custom sort for this column?
If you need something more, feel free to ask ;)

Justin
Top achievements
Rank 1
 asked on 11 Aug 2022
1 answer
101 views

Hello, 

I need to create a scale, showing the Major tick at the beginning/at the end of the scale.

In order to do this, I've set ShowLastLabel to false. The data on the scale changes every 200 m/s.  The last label sometimes blinks, even though the property ShowLastLabel is set to false.

If I change EndTickOffset, instead of changing ShowLastLabel, then I do not see the Major tick at the end of the scale.

See the attached example.

 <telerik:RadVerticalLinearGauge 
             FontSize="16"
             Background="Green"
             HorizontalAlignment="Left"
             Width="3"
             Margin="30,94,0,95"
            >
            <telerik:VerticalLinearScale
                    Max="{Binding Max,FallbackValue=20}"
                    Min="{Binding Min,FallbackValue=0}"
                    Background="Green"
                    LabelLocation="Inside"
                    FontSize="16"
                    StartTickOffset="{Binding TickOffset,FallbackValue=0}"
                    EndTickOffset="{Binding TickOffset,FallbackValue=0}"
                 ShowFirstLabel="False"
                    ShowLastLabel="False"
                    MajorTickStep="10"
                    IsInteractive="True"
                    MinorTickBackground="Red"
                    MiddleTicks="2"
                    MiddleTickBackground="Green"
                    MiddleTickLocation="Outside"
                    LabelOffset="16"
                    MiddleTickRelativeWidth="5"
                    MiddleTickRelativeHeight="0.015*"
                    MajorTickRelativeWidth="20"
                    MajorTickRelativeHeight="0.015"
                    EndWidth="0.03"
                    StartWidth="0.03"
                    MinorTicks="1"
                    >
            </telerik:VerticalLinearScale>
        </telerik:RadVerticalLinearGauge>

 

Timer timer= new Timer(200);
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }

 

 private void Method(double value)
        {
            Val = value.ToString();
            Min = value - 10;
            Max = value + 10;
            double startValue = Math.Round(Min / 10) * 10;
            TickOffset = startValue - Min;


        }
Stenly
Telerik team
 answered on 11 Aug 2022
1 answer
297 views

Hi, I am trying to display some glyphs in my WPF application using the RadGlyph control.

Unfortunately some of them are not displayed and I do not understand why.

I am usig the 2021 R3 version and .Net Framework 4.7.2.

I am attaching a sample where this issue can be easily reproduced.

Thanks for the help.

Masha
Telerik team
 answered on 11 Aug 2022
1 answer
205 views

Hi,

I use RadGridView.ExportToWorkbook on a grid with over 600 000 rows: the operation take much than 5' to end. Can I speed up it?

Thank you

Luigi

Martin Ivanov
Telerik team
 answered on 05 Aug 2022
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?