Telerik Forums
UI for WPF Forum
4 answers
759 views

Hi,

 

1) I need to place the HorizontalAxis Label above the chart. Is that possible?

2) I am trying to change the alignment of both Axis's titles: the HorizontalAxis Title to "left" and the VerticalAxis Title to "bottom" (near Chart's origin). How can I do that?

 

Could you show me a code example?

 

Thank you.

Martin Ivanov
Telerik team
 answered on 17 Dec 2020
1 answer
110 views

Hi,

I'm working with ChartView3D and Telerik UI for a project. I am using the XAML tags for the graph. I can build and compile the graph. During runtime, when I change the view angles of the graph and rotate, zoom it frequently the axes gets updated with the graph by a small delay. Sometime the axes get stuck. I have attached the screenshot for reference.

The code below is used to create the 3D graph,

 

<telerik:RadCartesianChart3D x:Name="E3DChart" Visibility="Collapsed">
                                            <telerik:RadCartesianChart3D.XAxis>
                                                <telerik:CategoricalAxis3D Title="Position">
                                                    <telerik:CategoricalAxis3D.TitleTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Text="{Binding}" Foreground="White" Padding="3" FontSize="20" />
                                                        </DataTemplate>
                                                    </telerik:CategoricalAxis3D.TitleTemplate>
                                                    <telerik:CategoricalAxis3D.LabelStyle>
                                                        <Style TargetType="TextBlock">
                                                            <Setter Property="Foreground" Value="#FFD4D4D4" />
                                                        </Style>
                                                    </telerik:CategoricalAxis3D.LabelStyle>
                                                </telerik:CategoricalAxis3D>
                                            </telerik:RadCartesianChart3D.XAxis>
                                            <telerik:RadCartesianChart3D.YAxis>
                                                <telerik:CategoricalAxis3D Title="Tube">
                                                    <telerik:CategoricalAxis3D.TitleTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Text="{Binding}" Foreground="White" Padding="3" FontSize="20"/>
                                                        </DataTemplate>
                                                    </telerik:CategoricalAxis3D.TitleTemplate>
                                                    <telerik:CategoricalAxis3D.LabelStyle>
                                                        <Style TargetType="TextBlock">
                                                            <Setter Property="Foreground" Value="#FFD4D4D4" />
                                                        </Style>
                                                    </telerik:CategoricalAxis3D.LabelStyle>
                                                </telerik:CategoricalAxis3D>
                                            </telerik:RadCartesianChart3D.YAxis>
                                            <telerik:RadCartesianChart3D.ZAxis>
                                                <telerik:LinearAxis3D Title="Count">
                                                    <telerik:LinearAxis3D.TitleTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Text="{Binding}" Foreground="White" Padding="3" FontSize="20"/>
                                                        </DataTemplate>
                                                    </telerik:LinearAxis3D.TitleTemplate>
                                                    <telerik:LinearAxis3D.LabelStyle>
                                                        <Style TargetType="TextBlock">
                                                            <Setter Property="Foreground" Value="#FFD4D4D4" />
                                                        </Style>
                                                    </telerik:LinearAxis3D.LabelStyle>
                                                </telerik:LinearAxis3D>
                                            </telerik:RadCartesianChart3D.ZAxis>
                                            <telerik:RadCartesianChart3D.Behaviors>
                                                <telerik:Chart3DCameraBehavior Distance="2500"
                                               FirstAngle="225"
                                               SecondAngle="85"/>
                                                <telerik:Chart3DTooltipBehavior ShowDuration="10000"/>
                                            </telerik:RadCartesianChart3D.Behaviors>
                                            <telerik:RadCartesianChart3D.Grid>
                                                <telerik:CartesianChart3DGrid GridLineThickness="3"/>
                                            </telerik:RadCartesianChart3D.Grid>
                                        </telerik:RadCartesianChart3D>

Martin Ivanov
Telerik team
 answered on 17 Dec 2020
3 answers
184 views

Hi,

I have a list of workers, whom all needs to have an amount paid by way of their hours times a value.

I have a WorkerModel class:

public class WorkerModel
{
    public string Name { get; set; }
 
    public int HoursWorking { get; set; }
}

Then I have a CompanyModel that contains the workers:

public class CompanyModel
{
    private ObservableCollection<WorkerModel> _workers = new ObservableCollection<WorkerModel>();
 
    public ObservableCollection<WorkerModel> Workers
    {
        get { return _workers ; }
        set { _workers = value; }
    }
}

And then I have a ViewModel that allows me to bind to the view:

public class MainViewModel : ViewModelBase
{
    private readonly CompanyModel _company;
 
    public MainViewModel()
    {
        _company= new CompanyModel();
             
    }
 
    public ObservableCollection<CompanyModel > Workers
    {
        get { return _company.Workers; }
    }
 
    public decimal PayoutPerHour
    {
        get { return 71M; }
    }
 
 
}

Lastly my view looks like this:

 

<telerik:RadGridView ShowGroupPanel="False"
                             HorizontalAlignment="Left"
                             telerik:StyleManager.Theme="Summer"
                             AutoGenerateColumns="False"
                             GroupRenderMode="Flat"
                             NewRowPosition="Bottom"
                             ItemsSource="{Binding Workers}"
                             Grid.Column="0">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Name}" Width="230"></telerik:GridViewDataColumn>
                <telerik:GridViewExpressionColumn Header="Payout" Width="100" Expression="HoursWorking * PayoutPerHour"></telerik:GridViewExpressionColumn></telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

 

My goal is to have the HoursWorking from the WorkerModel, multiply with the PayoutPerHour thats in the ViewModel. I have in this example made the PayoutPerHour a static value, which it is not in my full example. I need the Expressioncolumn to update whenever either of those two properties are updated. But I can't tell the viewmodel what the WorkerModel is doing, since they are in a collection in the CompanyModel.

Any clever way to do this?

Martin Ivanov
Telerik team
 answered on 16 Dec 2020
1 answer
121 views

Hi there, 

I am using RadMaskedNumericInput to prevent users to input alphabet characters in my numeric input field. But if users enter more than 16 digits, the exponent symbol will appear. Is there any way to remove the exponent symbol. 

Best regard.

Viet

Vladimir Stoyanov
Telerik team
 answered on 16 Dec 2020
3 answers
125 views
I would like to know if there is a way to bind the columns to a enum value, and when I drag/drop the tiles between the columns, the correct enum assigned to that column is attributed to the object.
Dinko | Tech Support Engineer
Telerik team
 answered on 16 Dec 2020
1 answer
788 views

windows 10 WPF .Net Core 3.1 Telerik 2020 R3 Sp1:

<Window x:Class="DemoAll.Modules.Telerik.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
                <telerik:RadButton x:Name="btTest" Content="test" Height="60" Width="120"></telerik:RadButton>
        </Grid>
</Window>

error:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorCS0234The type or namespace name 'Windows' does not exist in the namespace 'XXXXX' (are you missing an assembly reference?)

 

==========================================================================

no  x:Name="btTest"

        <Grid>
                <telerik:RadButton  Content="test" Height="60" Width="120"></telerik:RadButton>
        </Grid>

is ok!!!

Martin Ivanov
Telerik team
 answered on 15 Dec 2020
1 answer
293 views

add x:Name="xxxx" show error "" error CS0234: The type or namespace name 'Windows' does not exist in the namespace '' (are you missing an assembly reference?)

 

source:https://share.dmca.gripe/EUqiplofuPzhN3Kv.rar


Martin Ivanov
Telerik team
 answered on 15 Dec 2020
5 answers
328 views

I have the following WPF code

<telerik:RadBusyIndicator x:Name="ThumbnailLoadingIndicator" BusyContent="Loading clip..." IsIndeterminate="True" IsTabStop="False">
   <!-- Some content -->
</telerik:RadBusyIndicator>

 

and as you can see on the attached screenshot it is not rendered properly (i.e. the spinning circles are cut on top and bottom). I have tried to use various sizes and alignment but none of them are working so I guess there is an extra property I need to tweak (or there is a bug).

FYI I am using the fluent theme.

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Dec 2020
2 answers
227 views

Reading the article here, it seems to indicate that setting of the font via control reference will not change the font on an imported document. 

https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/frequently-asked-questions

 

Dim appPathAndFile As String = System.AppDomain.CurrentDomain.BaseDirectory & "\TreeScapesLog.txt"
Dim docProvider As New TxtFormatProvider
Using input As Stream = File.OpenRead(appPathAndFile)
    Dim docLogFile As RadDocument = docProvider.Import(input)
    rtbLogFile.Document = docLogFile
End Using

 

What that article suggests is the TxtFormatProvider strips the content of all formatting ... but it seems to assign a very large default font size.  How do I go about changing that font size when using TxtFormatProvider.Import ... I couldn't find any examples?

Cheers, Rob.

 

Dimitar
Telerik team
 answered on 14 Dec 2020
3 answers
220 views

Hello

I have upgraded my version from 2019 R3 to 2020 R3 and have found that the GridView layouts saved in the old version will not longer load in the new version.

 

Here is my existing code:

string layout; // loaded from file
PersistenceManager manager = new PersistenceManager();
 byte[] byteArray = Encoding.ASCII.GetBytes(layout);
MemoryStream stream = new MemoryStream(byteArray);
manager.Load(this.RadGridView, stream);

 

When trying to load the layout it fails with:

Exception thrown: 'System.NullReferenceException' in Telerik.Windows.PersistenceFramework.dll Object reference not set to an instance of an object.

 

If have tried enabling AllowCrossVersion, but this then fails with:

Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dll

 

The only way I can get it to work is by following the recommendation in this post Here, it then loads as expected and without any errors:

PersistenceManager manager = new PersistenceManager();
 byte[] byteArray = Encoding.ASCII.GetBytes(this.layout.Replace("Version=2019.3.1023.45", "Version=2020.3.1020.45"));
MemoryStream stream = new MemoryStream(byteArray);
manager.Load(this.RadGridView, stream);

 

This isn't a satisfactory fix in the long run. Could you please advise how I should be handling this?

 

Thanks

Dave

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Dec 2020
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?