Telerik Forums
UI for WPF Forum
8 answers
486 views

I am using "UI for WPF Q1 2016".

I am creating a RadDocument and I set the font to Calibri prior to adding anything:

         var doc = new RadDocument();
         // can't do real formatting without setting Paged
         doc.LayoutMode = DocumentLayoutMode.Paged;
         doc.Style.SpanProperties.FontSize = Unit.PointToDip(BodyFontSizePts);
         doc.Style.SpanProperties.FontFamily = new System.Windows.Media.FontFamily("Calibri");
Windows.Media.FontFamily("Calibri");

 

When I save as docx and open in Word, all is good.

When I open a modal dialog based on the RadRichTextBox, the ribbon bar says "Verdana".

When I save my multi-page document as PDF, the first page is obviously Verdana and the second page is obviously Calibri.

All I want is Calibri consistently throughout the document.

Thanks.

-John.

 

Reilly
Top achievements
Rank 1
Veteran
 answered on 13 Nov 2020
1 answer
245 views

Hello,

We have a gridview filled with production steps. These production steps can be reordered. For this we have implemented a behavior like the "Reorder Rows" behavior in your examples.These productions steps have a status field, that describe the step needs to be done or is done. the production steps will have to be processed from top to bottom 

The steps with status done do not need to be dragged and dropped, and the steps with status not done should never be dropped before a step with status done.

Is there a way to disable drag and drop for specific rows or cancel drop on specific rows?

Best regards and thanks for your help

Martin Ivanov
Telerik team
 answered on 13 Nov 2020
3 answers
635 views

Hi,

Is there any way to display the new NotifyIcon in an application that doesn't have any window?

I tried putting it in app.xaml like this:

<ResourceDictionary>
            <telerik:RadNotifyIcon x:Key="NotifyIcon"
                                   x:Name="NotifyIcon"         
                                   ShowTrayIcon="True"         
                                   TooltipContent="Test"         
                                   TrayIconSource="/TestNotifyIcon;component/SDK icon.ico"         
                                   GuidItem="020fea20-de2d-411f-87dd-111cd1e4f7fb">
            </telerik:RadNotifyIcon>
        </ResourceDictionary>

 

And then in App.xaml.cs:

public partial class App : Application
    {
        private RadNotifyIcon _taskbarIcon;
 
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
 
            _taskbarIcon = (RadNotifyIcon)FindResource("NotifyIcon");
        }
 
        protected override void OnExit(ExitEventArgs e)
        {
            if (_taskbarIcon != null)
                _taskbarIcon.Dispose();
 
            base.OnExit(e);
        }
    }

 

But the icon does not display...

We are currently using Hardcodet.NotifyIcon.Wpf package for this, and with that component this kind of code works, but we would like to use the Telerik component instead!

Regards
Andreas

Martin Ivanov
Telerik team
 answered on 13 Nov 2020
1 answer
198 views

Hi, I am new in telerik and (front-end). For my app I want to create dynamic Rad Cartisian chart ,fill it with scatter data points dynamically such that each data point should have predefined color. and store that dynamic created chart in tileview.

Problem is in assigning colors to each point. I would be very grateful if you can guide me in code.

  public RadTileViewItem CreateScatterPlotTile()
        {
            var chart = new Telerik.Windows.Controls.RadCartesianChart();
            var verticalaxis = new Telerik.Windows.Controls.ChartView.LinearAxis();
            var horizentalaxis = new Telerik.Windows.Controls.ChartView.LinearAxis();
            verticalaxis.Visibility = System.Windows.Visibility.Hidden;
            horizentalaxis.Visibility = System.Windows.Visibility.Hidden;

            chart.VerticalAxis = verticalaxis;

            chart.HorizontalAxis = horizentalaxis;

            ScatterPointSeries scatterSeries = new ScatterPointSeries();
            for (int i = 0; i < 100; i++)
            {
                ScatterDataPoint point = new ScatterDataPoint();
                point.XValue = xvaluelist[i];
                point.YValue = yvaluelist[i];
                scatterSeries.DataPoints.Add(point);
            }        
            chart.Series.Add(scatterSeries);
            var tile = new RadTileViewItem();
            tile.Content = chart;

            return tile;
        }  

 

Similarly I have color value list, How can I add colors from my list to each point.

Martin Ivanov
Telerik team
 answered on 12 Nov 2020
4 answers
244 views

How do I get StyleRules to work with a  DataTable as ItemSource of the GridView? 

 

I have some sample code that has two grid views with the same StyleRules but one uses DataTable and the other uses a list of object 'item'. The list of objects respects the StyleRules but the grid with the DataTable does not and I'm not sure why?

 

DataTable dt = new DataTable();
dt.Columns.Add("ID", typeof(int));
dt.Columns.Add("Value", typeof(int));
 
var dr = dt.NewRow();
dr["ID"] = 1;
dr["Value"] = 0;
dt.Rows.Add(dr);
 
dr = dt.NewRow();
dr["ID"] = 2;
dr["Value"] = 1;
dt.Rows.Add(dr);
 
dr = dt.NewRow();
dr["ID"] = 3;
dr["Value"] = 2;
dt.Rows.Add(dr);
  
RadGridView1.ItemsSource = dt;
 
 
List<Item> items = new List<Item>(){ new Item(1,0), new Item(2, 1) , new Item(3, 2) };
RadGridView2.ItemsSource = items;

 

<Grid>
<Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
</Grid.RowDefinitions>
 
<TextBlock Grid.Row="1" FontSize="16" Margin="0,0,0,5" Text="Data Table Item Source"/>
<telerik:RadGridView Grid.Row="2" x:Name="RadGridView1" AutoGenerateColumns="False" ShowGroupPanel="False" >
    <telerik:RadGridView.RowStyleSelector>
        <telerik:ConditionalStyleSelector>
            <telerik:StyleRule Condition="Value > 1">
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="Red"/>
                </Style>
            </telerik:StyleRule>
            <telerik:StyleRule Condition="Value = 1">
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="Green"/>
                </Style>
            </telerik:StyleRule>
        </telerik:ConditionalStyleSelector>
    </telerik:RadGridView.RowStyleSelector>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Value}" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>
 
 
<TextBlock Grid.Row="3" FontSize="16" Margin="0,10,0,5" Text="List Object Item Source"/>
<telerik:RadGridView Grid.Row="4" x:Name="RadGridView2" AutoGenerateColumns="False" ShowGroupPanel="False"  >
    <telerik:RadGridView.RowStyleSelector>
        <telerik:ConditionalStyleSelector>
            <telerik:StyleRule Condition="Value > 1">
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="Red"/>
                </Style>
            </telerik:StyleRule>
            <telerik:StyleRule Condition="Value = 1">
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="Green"/>
                </Style>
            </telerik:StyleRule>
        </telerik:ConditionalStyleSelector>
    </telerik:RadGridView.RowStyleSelector>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Value}" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>
 
</Grid>
Richard
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 12 Nov 2020
8 answers
327 views

Hello,

I'm importing simple HTML and the bullets are showing up as all disc types. They should be square, disc, then circle. Is this a bug or do I need to do something else to make this display correctly? Loading the html into Chrome or IE will show the correct display.

Thanks,

Scott

 

HtmlFormatProvider htmlFormatProvider = new HtmlFormatProvider();

string htmlString = "<!DOCTYPE html><html><head></head><body><ul><li type='square'>This is a square</li><li type='disc'>This is a disc</li><li type='circle'>This is a circle</li></ul></body></html>";         

radRichTextBox.Document = htmlFormatProvider.Import(htmlString);​

Tanya
Telerik team
 answered on 11 Nov 2020
1 answer
443 views

Hello,

I'm trying to replace mahapps with telerik in an existing C# mvvm application. In the shell of this application is a mahapps Flyout control. This control is triggered by the region manager.

This Flyout control flies in from the left (like the navigationview is flying in from the right) showing a detail CustomControl. Basically a window containing details of a selected line in a datagrid. 

I'm trying to replace this Flyout control with a Telerik control, but without any luck.

The mahapps XAML code looks like:

<controls:MetroWindow.Flyouts>
        <controls:FlyoutsControl>
            <controls:Flyout Header="{Binding Header}" Position="Right" Width="550" IsOpen="{Binding IsOpen}"
                             IsPinned="{Binding IsPinned}">
                <ContentControl prism:RegionManager.RegionName="{x:Static framework:RegionNames.DetailRegion}" />
            </controls:Flyout>
        </controls:FlyoutsControl>
    </controls:MetroWindow.Flyouts>

Any ideas on how to replace this mahapps Flyout control with a Telerik control? Any suggestions on how to establish the same functionality.

Thanks!

Jochem

 

Martin Ivanov
Telerik team
 answered on 11 Nov 2020
3 answers
319 views

Im facing an issue with styling of  HTML bullets and numbered list. I want to achieve following output. Bullets and number size gets increase and i don't want that

My Output is :

<ol><li value=\"1\" style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 0px;text-indent: 0px;line-height: 1.15;font-family: 'Verdana';font-size: 16px;color: #000000;\"><span style=\"font-family: 'Segoe UI';font-size: 13.33px;color: #000000;\">Procedure to Clean Oil tank</span></li></ol>

Expected output : 

 <ol><li value=\"2\"><span style=\"font-family: 'Segoe UI';font-size: 13.33px;color: #000000;\">Procedure to Clean Oil tank</span></li></ol>

 

Please help

Dimitar
Telerik team
 answered on 11 Nov 2020
2 answers
135 views

We have a Menu that uses the RadRadialMenu in a WPF Desktop Application. Currently when we try to add more that 8 menu items, we lose one of the menus. It seems that the menu can only take 8 "pie pieces" per menu level. We were wondering if with a little customization, you could add 9, 10, or more. I believe that this might have been discussed in a previous post somewhere, however just thought I would start a new thread to see if anyone has come across this and has a solution. 

 

 

Martin Ivanov
Telerik team
 answered on 11 Nov 2020
4 answers
147 views
Hi Telerik.

I use my own MyGantTaskCollection as a custom collection class for storing MyGanttTask (also custom, based on GanttTask).
MyGanttTask.Children is also a MyGanttTakCollection.

I noticed that the GanttView always uses the base.Children collection for displaying children. That is why I set up a sync between both collections. Basically: this.Children.CollectionChanged += ....   // sync added and/or removed with base.Children.
This solves the issue for my children to show up in the GanttChart.

The problem I'm facing now is that when the user drags/drops in the gantt chart from/to a child collection, there is no way for me to monitor this changement and sync the changements made in base.children to this.children as base.children is not observable..

Could you provide a solution for this? Ideally the solution would solve the first issue; the fact that GanttView does not accept a custom childcollection..
Jayesh
Top achievements
Rank 1
Veteran
 answered on 11 Nov 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?