Telerik Forums
UI for WPF Forum
6 answers
662 views
I'm using the RadNumericUpDown in an application that requires several numeric inputs, about 20 on a single screen.
I like the UpDown ability (being able to click an arrow up and down), however I also need the user to be able to just enter in some numbers.  Well I've run into an issue, and I'm wondring if it's expected behavior or a bug.

if I highlight the text in the RadNumericUpDown box, and begin to type, lets say I type "200".  The first number gets intered ("2") but after that the cursor moves the the very far left, and the next number ("0") is entered to the left.  So what actually appears in the box is "002".  It appears to me as though you have to think in reverse to enter a number.  this seems counter intuitive.  Is this normal behavior or am i just missing a setting.  Here's the code I'm using

        <Style x:Key="Numbers" TargetType="{x:Type Tel:RadNumericUpDown}"
            <Setter Property="Width" Value="100"/> 
            <Setter Property="Margin" Value="10"/> 
            <Setter Property="Minimum" Value="0"/> 
            <Setter Property="FontSize" Value="12"/> 
        </Style> 
 
                    <Tel:RadNumericUpDown Grid.Row="0" Grid.Column="1" Style="{StaticResource Numbers}" 
                                      ValueFormat="Numeric" IsEditable="True"  
                                      Minimum="0" Maximum="100000"  
                                      Value="{Binding Path=MaxPumpOutRate.DisplayValue}"></Tel:RadNumericUpDown> 
 
 

in this example "MaxPumpOutRate" is my model object, and it has a property of type double named "DisplayValue"

Thanks for any help
Dinko | Tech Support Engineer
Telerik team
 answered on 30 Jun 2017
3 answers
148 views

Hi all

 

I've a Strange error... 

The pdfviewer don't show anything but if i print the document it exists !

 

The code work normaly before i don't understand.....

this is the XAML code

<Window x:Class="TestPdfViewer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:UC="clr-namespace:Angdm.Framework.UI.UserControls;assembly=Angdm.Framework.UI"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:local="clr-namespace:TestPdfViewer"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid >
        <telerik:RadPdfViewer x:Name="pdfviewer"/>
        <!--<UC:UCPdfViewer x:Name="pdfviewer" BorderBrush="Red"/>-->
    </Grid>
</Window>

 

and the window loaded

 

   private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            using (FileStream fs = new FileStream("c:\\toto.pdf", FileMode.Open, FileAccess.Read))
            {
                byte[] byteread = new byte[fs.Length];
                int numBytesToRead = (int)fs.Length;
                int numBytesRead = 0;
                while (numBytesToRead > 0)
                {
                    int n = fs.Read(byteread, numBytesRead, numBytesToRead);

                    if (n == 0)
                        break;
                    numBytesRead += n;
                    numBytesToRead -= n;
                }
                numBytesToRead = byteread.Length;
               
                MemoryStream m = new MemoryStream(byteread);
                FormatProviderSettings settings = new FormatProviderSettings(ReadingMode.AllAtOnce);
                PdfFormatProvider provider = new PdfFormatProvider(m, settings);
                RadFixedDocument mdoc_data = provider.Import();
                this.pdfviewer.ClearDocument();
                this.pdfviewer.Document = mdoc_data;


            }
        }

Tanya
Telerik team
 answered on 30 Jun 2017
2 answers
261 views

Hi,

We're using RadDiagram in our application and are trying to use the connector tool to connect two shapes. The shapes have the default connector position ('Auto'), leaving an attachment in the centre of the shape, and we have gliding connectors enabled.

How does the connector attachment behaviour work in RadDiagram? Presumably there's some maximum distance from the target connector that the mouse must be before a connector's IsActive is set to true?

We're finding that, to successfully connect the shapes, we must click, drag and then hold directly over the connector to get the connection to attach properly. What we'd like is to be able to drag the connection anywhere on the shape and it automatically attach to the connector, so long as the connection is dropped on the shape.

Regards,

Ben

Ben
Top achievements
Rank 1
 answered on 29 Jun 2017
21 answers
1.5K+ views
Hi!

I recently upgraded to the Q2 version and I noticed a problem with the gridview, sometimes the last row is not completely visible including the row details. In the previous version it didn't happen.
Here's the code of the gridview
<telerik:RadGridView ItemsSource="{Binding PagedSource,ElementName=flightPager}" SelectionMode="Single" IsReadOnly="True"
                                         ScrollMode="RealTime" ScrollViewer.CanContentScroll="True" AutoGenerateColumns="False" 
                                         RowDetailsVisibilityMode="VisibleWhenSelected"
                                         HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Auto" x:Name="GridItinerary"
                                         ScrollViewer.VerticalScrollBarVisibility="Auto"  MaxHeight="600">

Here are two images that show the problem:
row details chopped

last row chopped

Thanks in advance.
Stefan
Telerik team
 answered on 29 Jun 2017
1 answer
243 views

I'm using a RadTileList to display a set of tiles from a collection stored in a viewmodel via the RadTileList's ItemSource and ItemTemplate properties. Additionally, I'm allowing multi-tile selection via SelectionMode="Extended".

In my Tile's ItemTemplate, I've defined 3 buttons that access functionality specific to the containing tile. 

I've noticed that clicking directly on any of the buttons contained in a tile toggles the selected state of the containing tile. I'd prefer for a click directly on a contained button to not change the Tile's selected state in any way. So far though, I haven't found any satisfactory way of accomplishing this.

Thanks for you input.

Dilyan Traykov
Telerik team
 answered on 29 Jun 2017
6 answers
189 views

Hello!

 

My application has a RadTabControl where each tab contains a RadDiagram with a GraphSource-Binding to a view model (TabViewModel).

At the moment I need to reference the RadDiagram in the TabViewModel for loading and saving reasons, because I found no way to save/load a graphsource to/from filesystem.

Having a reference to RadDiagram in my view model is not very MVVM like, make problems in our architecture and is not what we want.

In the end I want to have a single reference to a custom graph source in may TabViewModel which can be loaded by something like graphsource.Load(filepath);

The .Load on the graphsource should populate the graphsource with items and links from the selected file.

The same should be possible for the .Save method.

How could I achieve that?

Thanks.

Frank
Top achievements
Rank 1
 answered on 29 Jun 2017
6 answers
258 views

In MVVM, how to scroll to the previously selected GanttTask when I update whole ObservableCollection gantt tasks?

Thanks,

-Jacky

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Jun 2017
2 answers
206 views

Hi to all,

I would avoid that user click single item of group.

Sequence to reproduce behaviour:

  1. Group more items
  2. Unselect group
  3. Click on group and group id selected
  4. Click again on single item (of group) and selected item is only item that I clicked.

I would that step no. 4 did not have any effect.

To highlight selected items, I have write code into SelectionChanged event, where I change background and foreground of selected item.

01.private void topRadDiagram_SelectionChanged(object sender, SelectionChangedEventArgs e)
02.{
03.    //Deselezione degli oggetti
04.    foreach (var item in e.RemovedItems)
05.    {
06.        if (item is RadDiagramShape deselectedItem)
07.        {
08.            deselectedItem.Background = ColorHelper.IMBALLO;
09.            deselectedItem.Foreground = ColorHelper.IMBALLO_TITLE;
10. 
11.            //Aggiorna il 3D
12.            var macchina = (ModelloCommerciale)deselectedItem.Tag;
13.            var macchina3D = macchina.Oggetto3D;
14.            macchina3D.Material = new DiffuseMaterial(ColorHelper.IMBALLO_TRASPARENTE);
15.            macchina3D.BackMaterial = new DiffuseMaterial(ColorHelper.IMBALLO_TRASPARENTE);
16.        }
17.    }
18. 
19.    //Selezione degli oggetti
20.    foreach (var item in e.AddedItems)
21.    {
22.        if (item is RadDiagramShape selectedItem)
23.        {
24.            selectedItem.Background = ColorHelper.IMBALLO_SELEZIONATO;
25.            selectedItem.Foreground = ColorHelper.IMBALLO_TITLE_SELEZIONATO;
26. 
27.            //Aggiorna il 3D
28.            var macchina = (ModelloCommerciale)selectedItem.Tag;
29.            var macchina3D = macchina.Oggetto3D;
30.            macchina3D.Material = new DiffuseMaterial(ColorHelper.IMBALLO_SELEZIONATO);
31.            macchina3D.BackMaterial = new DiffuseMaterial(ColorHelper.IMBALLO_SELEZIONATO);
32. 
33.            //Gesione trasparenza, è necessario per poter vedere trasparenti gli altri oggetti 3D
34.            //bisogna portare da index = 0 gli oggetti selezionati
35. 
36.            //Rimuovo l'oggetto 3D attuale
37.            this.oggettiModel3DGroup.Children.Remove(macchina3D);
38.            //Reinserisco l'oggetto 3D con index = 0
39.            this.oggettiModel3DGroup.Children.Insert(0, macchina3D);
40.        }
41.    }
Dario Concilio
Top achievements
Rank 2
 answered on 29 Jun 2017
3 answers
296 views

Hi, 

I'm working with a RadTreeview binded to an ObservableCollection.

All is fine, until I add a new item in my collection, a new row is created, but the left arrow (to expand) doesn't appear. 

I have to expand with a double click to let it appear. After that all is fine.

Can someone help me ? 

 

Thanks, 

Benoit.

01.<telerik:RadTreeView ItemsSource="{Binding Directories}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" Grid.Row="1" Background="White">
02.            <telerik:RadTreeView.ItemContainerStyle>
03.                <Style TargetType="telerik:RadTreeViewItem">
04.                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
05.                </Style>
06.            </telerik:RadTreeView.ItemContainerStyle>
07.            <telerik:RadTreeView.ItemTemplate>
08.                <HierarchicalDataTemplate ItemsSource="{Binding FilesList}">
09.                    <Grid HorizontalAlignment="Stretch">
10.                        <Grid.ColumnDefinitions>
11.                            <ColumnDefinition Width="*"></ColumnDefinition>
12.                            <ColumnDefinition Width="Auto"></ColumnDefinition>
13.                        </Grid.ColumnDefinitions>
14.                        <TextBlock Grid.Column="0" Text="{Binding Name}" VerticalAlignment="Center"/>
15.                        <Button Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Export">
16.                    </Grid>
17.                </HierarchicalDataTemplate>
18.            </telerik:RadTreeView.ItemTemplate>
19.        </telerik:RadTreeView>
Martin Ivanov
Telerik team
 answered on 28 Jun 2017
1 answer
152 views

I am allowing the user to pan & zoom on the graph, for example through the following:

ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;

At some point, I set the ScrollMode back to ScrollMode.None and want to reset the ranges of the X & Y axes. I want the ranges to be calculated in the fashion they were when the data were originally drawn.

How can I get the ChartView to recalculate the axis ranges?

Please note that I may add data to the chart before triggering the recalc so just remembering range values before pan/zoom and setting them afterwards won't be sufficient.

Martin Ivanov
Telerik team
 answered on 28 Jun 2017
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?