Telerik Forums
UI for WPF Forum
1 answer
147 views

I have a dynamically generated document in a RadRichTextBox. When I print this document, the quality (graphics) is very bad.

1.PrintSettings printSettings = new PrintSettings();
2.printSettings.DocumentName = _protocol.Title + " - Protokoll";
3.printSettings.PrintScaling = PrintScaling.ShrinkToPageSize;
4.printSettings.PrintMode = PrintMode.Native;
5.this.documentViewer.Print(printSettings);


If I export the document as pdf and print the PDF document, then the print quality is fine.

How can I improve the print quality of the RadRichTextBox?


Martin
Telerik team
 answered on 14 Nov 2018
2 answers
258 views

Dear All,

I am new to Chat control. I am practicing RadChat in Chat application, such that I have list of contacts on Left side, which bounded to List of users where

public class User: Entity
{
        public ObservableCollection<MessageBase> Messages { get => messages; set { messages = value; RaisePropertyChange(); } }
}

I have bounded RadChat DataSource as SelectedUser.Messages property, where SelectedUser is public property in my viewmodel, which contains selected item object.

As I assume that RadChat need to updated Messages as datasource is changed, but instead of refreshing messages, it appends new messages to old one.

My requirement is to Clear all messages in Chat UI, as I have selected new Messages object as datasource.

 

Here I want to clarify that data in Messages are correct according to my need. I feel it is some issue in RadChat or I need further steps to acheive my target.

<telerik:RadChat Grid.Row="2" Margin="5 0 0 0" Name="ctrlChat"                                     CurrentAuthor="{Binding CurrentAuther,UpdateSourceTrigger=PropertyChanged}"
DataSource="{Binding SelectedUser.Messages, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
   <telerik:EventToCommandBehavior.EventBindings>
    <telerik:EventBinding EventName="SendMessage"
                         Command="{Binding SendMessageCommand}" PassEventArgsToCommand="True" />
     </telerik:EventToCommandBehavior.EventBindings> 
    </telerik:RadChat>

 

 

Stefan
Telerik team
 answered on 14 Nov 2018
3 answers
189 views

When maximizing dockable windows on a second monitor they get cut-off. See attachment. This only happens, when the second monitor has a higher resolution, than the main monitor. Maximizing on main monitor or my third monitor which is smaller it works fine.

 

You already had a similar bug, which was obviously only fixed for the main monitor resolution:

https://www.telerik.com/forums/visual-studio-example---floating-document-is-not-maximized

 

My Telerik Version: 2018.1.220.45

 

Please get this fixed.

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Nov 2018
5 answers
91 views

Good morning
I have a problem that I can not solve despite having read many threads about this topic.
I have a RadGridView with binding to table where are listed a series of processing steps coming from an external microprocessor.
the running process is always on the first line.

Faced with a change in the status of some microprocessor values, which occur with a few milliseconds, refresh the values of the only cells that interest me with these instructions (for reasons of display speed):

   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaDone = qtaDone;
   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaPartialDone = qtaPartialDone;
   ((WorkPhaseInProgress) RadGridViewWorkPhaseInProgressOnDashBoard.Items [0]). QtaDoneForHour = qtaForHourNow;
   RadGridViewWorkPhaseInProgressOnDashBoard.Items.Refresh ();

where

RadGridViewWorkPhaseInProgressOnDashBoard is the name of the RadGridView

WorkPhaseInProgress class of single item

and everything works perfectly.

my question is:
how can I change the backgroud color for a few seconds to the only cells that interest me?

I can run everything in a separate thread, but my problem is how to change freely (according to my logic related to the microprocessor) the change of back color.
I hope I explained myself
thank you in advance

Vladimir Stoyanov
Telerik team
 answered on 14 Nov 2018
1 answer
105 views

The default behaviour for the StepLineSeries is that the centre of the step is over the point, is there a way to change the position of the step up/down so it corresponds with change in the horizontal axis

e.g. Imagine I have a StepLineSeries displaying the amount of money in my piggy bank on the vertical axis, and the date on a DateTimeContinuous horizontal axis, with the following amounts on dates:

1st Jan = £0

2nd Jan = £10

5th Jan = £3

Currently the first step up happens in between the horizontal axis markers for 1st and 2nd Jan, instead of on the axis marker for 2nd Jan, which is when I actually changed the value. Is there a way to adjust this behaviour?

 

Vladimir Stoyanov
Telerik team
 answered on 14 Nov 2018
1 answer
144 views

I am using RadTreeView with  IsTriStateMode="True" and IsOptionElementsEnabled="True" options. i am having an issue on aligning the selection of TreeViewItem and the checkbox state. i tried binding IsChecked and IsSelected properties, but did not work as expected.  

I prefer doing in XAML. Any suggestions?

Martin Ivanov
Telerik team
 answered on 14 Nov 2018
1 answer
763 views

Hi,

Is it possible to change the AccentColor in XAML?

I want to do something like this, but in a global style.xaml:

FluentPalette.Palette.AccentColor = (Color)ColorConverter.ConvertFromString("#FF0078D7");
FluentPalette.Palette.AccentFocusedColor = (Color)ColorConverter.ConvertFromString("#FF4CB0FF");
FluentPalette.Palette.AccentMouseOverColor = (Color)ColorConverter.ConvertFromString("#FF008EFF");
FluentPalette.Palette.AccentPressedColor = (Color)ColorConverter.ConvertFromString("#FF0063B1");

Best regards,

Moritz

Vladimir Stoyanov
Telerik team
 answered on 14 Nov 2018
2 answers
175 views

I'm building an app where the user can switch the appearance of the UI controls a runtime.

I do this in codebehind like so:

StyleManager.ApplicationTheme = new MaterialTheme();
MaterialPalette.Palette.FontSize = 12;
MaterialPalette.Palette.MainColor = (Color)ColorConverter.ConvertFromString("#FFFC0EF1");
MaterialPalette.Palette.FontFamily = new FontFamily("Calibri");

But besides the radcontrols, there are a lot of MS controls (mostly Label), who's color, font and size i also have to switch.

And (to my surprise) there is no "RadLabel" or "RadTextBlock".

So how can I accomplish this with the regular controls? Can I make them "listen" to the StyleManager.ApplicationTheme ?

Tom
Top achievements
Rank 1
 answered on 13 Nov 2018
2 answers
281 views

I have the following (simplified) xaml:

<telerik:RadCartesianChart x:Name="chart">
   <telerik:RadCartesianChart.HorizontalAxis >
      <telerik:CategoricalAxis  />
   </telerik:RadCartesianChart.HorizontalAxis>

   <telerik:RadCartesianChart.VerticalAxis>
      <telerik:LinearAxis />
   </telerik:RadCartesianChart.VerticalAxis>
                              
   <telerik:RadCartesianChart.Series>
      <telerik:LineSeries Stroke="Blue"  ItemsSource="<Binding to a double array>"
      </telerik:LineSeries>
   </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

By default the x axis starts from "1" (See picture). How to have the x axis starting at "0" ?

Thanks

 

 

Stéphane
Top achievements
Rank 1
Iron
 answered on 13 Nov 2018
7 answers
502 views
here is the setup

1. using wpf controls version 2013.3.1316.45. 
2. Windows8 theme. 
3. using  MVVM
4. I have a radGrid with a data template inside cell template.  There is a radButton.
5. there is 1 interaction trigger to capture double click

The button will fire if clicked with mouse.  The button will only highlight (not fire) if I use touch screen.  how come?

code snippet:

<telerik:RadGridView
Grid.Row="0"
Grid.Column="0"
ItemsSource="{Binding SolicitationSearchResults}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type HeaderedContentControl}, AncestorLevel=1}, Path=ActualWidth}"
AutoGenerateColumns="False"
BorderThickness="1"
CanUserDeleteRows="False"
CanUserFreezeColumns="True"
CanUserInsertRows="False"
CanUserReorderColumns="False"
GridLinesVisibility="Vertical"
FrozenColumnCount="2"
IsReadOnly="True"
RowDetailsVisibilityMode="Visible"
RowIndicatorVisibility="Collapsed"
SelectedItem="{Binding Path=SelectedSolicitationSearchResult}"
ShowGroupPanel="False">
<i:Interaction.Triggers>
<!--Used to capture a GridView row double-click, which will ultimately -->
<!--be used to fire the Edit method.-->
<i:EventTrigger
EventName="RowActivated">
<cmd:EventToCommand
Command="{Binding ItemEditCommand, Mode=OneTime}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<telerik:RadGridView.Columns>
<!--Edit-->
<telerik:GridViewColumn
Header=""
MaxWidth="50"
MinWidth="50"
Width="50">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<telerik:RadButton
Command="{Binding EditSolicitationCommand}"
Content="view"
IsEnabled="{Binding CanEditSolicitation}"
Margin="0 0 2 0" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!--Solicitation id-->
<telerik:GridViewColumn
Header="Id"
IsFilterable="False"
MinWidth="70"
SortMemberPath="SolicitationId"
Width="70">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<TextBlock
Text="{Binding SolicitationId}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding SolicitationId}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!--Organization Name-->
<telerik:GridViewColumn
Header="Customer"
IsFilterable="False"
MinWidth="160"
SortMemberPath="OrganizationName"
Width="260">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<TextBlock
Text="{Binding OrganizationName}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding OrganizationName}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!--Solicitation Name-->
<telerik:GridViewColumn
Header="Solicitation Name"
IsFilterable="False"
MinWidth="160"
SortMemberPath="SolicitationName"
Width="260">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<TextBlock
Text="{Binding SolicitationName}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding SolicitationName}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!--Solicitation Number-->
<telerik:GridViewColumn
Header="Solicitation Number"
IsFilterable="False"
MinWidth="160"
SortMemberPath="SolicitationNumber"
Width="260">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<TextBlock
Text="{Binding SolicitationNumber}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding SolicitationNumber}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!--Status-->
<telerik:GridViewColumn
Header="Status"
IsFilterable="False"
MinWidth="75"
SortMemberPath="SolicitationStatusName"
Width="75">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate
DataType="solicitation:SolicitationSearchResultItemViewModel">
<TextBlock
Text="{Binding SolicitationStatusName}"
TextTrimming="CharacterEllipsis" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Vladimir Stoyanov
Telerik team
 answered on 13 Nov 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?