Telerik Forums
UI for WPF Forum
7 answers
467 views
Hi,

Could you tell me how to stop the Carousel paging when I am holding down the left mouse button and moving my mouse cursor over the bottom of the control please?

Thanks,

Adam Smith
Elena
Telerik team
 answered on 05 Sep 2018
2 answers
233 views
Hi,

i have o problem whit the conversion of the content of a RadGridView in a RadDocument.

Inside of the RadGridView i have 5 columns with different width.
But the columns inside the RadDocument have all  the same width.

My source code worked correctly whith the Telerik-Controls version 2014.3.1202.45.
The columns inside the RadDocument inherit the widths from the columns inside the RadGridView.

But after the update to the version 2018.1.220.45 it does not work correctly anymore.
The columns inside the RadDocument have all the same width.

Please, can you help me to find a solution?


Best Regards,
Vincent Dinculescu


Here my source code:

XAML of  the RadGrisView:

    . . . . . .
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn x:Name="vg_letztaend" Header="Datum"
Width="120"
DataMemberBinding="{Binding VgLetztaend}"
IsReadOnly="True"
                                                        TabStopMode="Skip"
IsFilterable="False"
IsSortable="True" />
                    <telerik:GridViewDataColumn x:Name="vg_betreff" Header="Betreff"
 Width="270"
DataMemberBinding="{Binding VgBetreff}"
IsReadOnly="True"  
                                                        TabStopMode="Stop"
IsFilterable="False"
IsSortable="True"
TextWrapping="Wrap" />
                    <telerik:GridViewDataColumn x:Name="vg_text" Header="Text"
Width="300"
DataMemberBinding="{Binding VgText}"
IsReadOnly="True"  
                                                        TabStopMode="Stop"  
TextWrapping="Wrap"  
IsFilterable="False"
IsSortable="True" />
                    <telerik:GridViewDataColumn x:Name="bearbeiterName" Header="Bearbeiter"
Width="140"
DataMemberBinding="{Binding BearbeiterName}"
IsReadOnly="True"
                                                        TabStopMode="Skip"
IsFilterable="False"
IsSortable="True" />
                    <telerik:GridViewDataColumn x:Name="vg_bearbeiter" Header="Kennung"
Width="80"
DataMemberBinding="{Binding VgBearbeiter}"
IsReadOnly="True"
                                                        TabStopMode="Skip"
 IsFilterable="False"
IsSortable="True" />
                </telerik:RadGridView.Columns>
    . . . . . .


Source code for the conversion from a RadGridView in a RadDocument:

        public static void PrintPreview(this RadGridView grid)
        {
            Window owner = grid.GetVisualParent<Window>();
            var rtb = CreateRadRichTextBox(grid);
            PrintCommand = new DelegateCommand<object[]>(PrintData, CanExecutePrintCommand);
            ExitCommand = new DelegateCommand<object>(Exit, CanExecuteExitCommand);
            var window = CreatePreviewWindow(rtb, owner, settings);
            window.ShowDialog();
        }

        private static RadRichTextBox CreateRadRichTextBox(RadGridView grid)
        {
            return new RadRichTextBox
            {
                IsReadOnly = true,
                LayoutMode = DocumentLayoutMode.Paged,
                IsSelectionEnabled = false,
                IsSpellCheckingEnabled = false,
                Document = CreateDocument(grid),
                Padding = new Thickness(15, 10, 10, 10),
                DocumentInheritsDefaultStyleSettings = true,
                FontFamily = new FontFamily("Arial"),
                FontSize = 12,
            };
        }

        private static RadDocument CreateDocument(RadGridView grid)
        {
            RadDocument document;

            using (var stream = new MemoryStream())
            {
                grid.Export(stream,
                new GridViewExportOptions
                {
                    Format = ExportFormat.Html,
                    ShowColumnFooters = grid.ShowColumnFooters,
                    ShowColumnHeaders = grid.ShowColumnHeaders,
                    ShowGroupFooters = grid.ShowGroupFooters
                });


                stream.Position = 0;

                HtmlFormatProvider provider = new HtmlFormatProvider();
                provider.ImportSettings = new HtmlImportSettings();
                provider.ImportSettings.UseDefaultStylesheetForFontProperties = false;

                document = provider.Import(stream);
                document.SectionDefaultPageMargin = new Telerik.Windows.Documents.Layout.Padding(30);
                document.SectionDefaultPageOrientation = PageOrientation.Landscape;

            }

            return document;
        }





Vincent
Top achievements
Rank 1
 answered on 05 Sep 2018
1 answer
130 views
Good day, I have this autocompletebox on my context menu, but after searching, I couldn't to get any SelectedItem, any idea to do it ?
Jerry
Top achievements
Rank 1
 answered on 05 Sep 2018
1 answer
265 views

How to change the Tooltip width in appointment and make text not wrapping?

Thanks,

-Jacky

 

Vladimir Stoyanov
Telerik team
 answered on 04 Sep 2018
2 answers
99 views

Hello Telerik,

I am getting following exception message: "the calling thread cannot access this object because a different thread owns it".

I have RadDesktopAlertManager inside a separate thread and this error shows up only when DesktopAlert closes itself.

Any idea how to solve it?

Best regards

kourosh

Martin Ivanov
Telerik team
 answered on 04 Sep 2018
7 answers
751 views

My diagram shape have  DropShadowEffect  which is setted by style 

<Style x:Key="SquidShapeStyle"
           TargetType="telerik:RadDiagramShape">     
        <Setter Property="IsResizingEnabled"
                Value="True" />
        <Setter Property="IsManipulationAdornerVisible"
                Value="True" />
  <Setter Property="Focusable"
                Value="True" />
        <Setter Property="MinHeight"
                Value="60" />
        <Setter Property="MinWidth"
                Value="60" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />   
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect Color="#595757"
                                  Opacity="0.6"></DropShadowEffect>
            </Setter.Value>
        </Setter>
    </Style>

When operate as follows

1 select several shapes 2 Zoom in the selection bound , 3 unselect the shapes,

sometimes some shape's  DropShadowEffect  is not display,it seems the DropShadowEffect  is covered by the shape

what is the reason for this? thanks

 

 

 

 

 

 

Martin Ivanov
Telerik team
 answered on 03 Sep 2018
1 answer
93 views

I have following code 

when I clicked something form combobox and have error and return value to old value in that case the selected item in combobox is the last selected 

01.public class MyClass
02.{
03.    public int ForeignId
04.    {
05.        get
06.        {
07.            return MyObject.ForeignId;
08.        }
09.         
10.        set
11.        {
12.            int oldValue = MyObject.ForeignId;
13.             
14.            try
15.            {
16.                MyObject.No = Helper.Help(value)
17.            }
18.            catch
19.            {
20.                MyObject.ForeignId = oldValue;
21.            }
22.             
23.            OnPropertyChanged(() => ForeignId);
24.        }
25.    }
26.     
27.    public MyObject MyObject{ getset; }
28.}

 

<telerik:RadComboBox ItemsSource="{Binding ItemList}" DisplayMemberPath="Name" SelectedValuePath="ForeignId"
                     SelectedValue="{Binding ForeignId, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged}" />

     

Vladimir Stoyanov
Telerik team
 answered on 03 Sep 2018
1 answer
744 views

i want to change spacing between every letter ,like /expand in rtf format ,i can't find way to change that.

so as winform richtexteditor

please support it

 

Tanya
Telerik team
 answered on 03 Sep 2018
4 answers
320 views

I have a customized cell template.

<telerik:GridViewDataColumn Header="Contact" DataMemberBinding="{Binding CustAccountsLocationContact.FirstName}">
    <telerik:GridViewDataColumn.CellTemplate>
         <DataTemplate>
               <TextBox Text="{Binding SomeText, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />
         </DataTemplate>
   </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

 

Now in Model class SomeText property there is a [required] attribute. Similar this, I created the error template as

<ControlTemplate x:Key="errorTemplate">
    <DockPanel>
        <Border BorderBrush="Red" BorderThickness="1">
            <AdornedElementPlaceholder x:Name="controlWithError"/>
        </Border>
        <TextBlock Foreground="Red" FontSize="20" FontFamily="Segoe UI" Margin="3,0,0,0"  MouseDown="Exclamation_MouseDown"  Tag="{Binding AdornedElement.(Validation.Errors)[0].ErrorContent, ElementName=controlWithError}">!</TextBlock>
    </DockPanel>
</ControlTemplate>

 

However I can not see the error template if validation failed. By the answer on stackoverflow, it seems need  to wrap some template with <AdornerDecorator>

Is it the solution to my case? If so, how to wrap it around telerik control?

Thank you.

Martin
Telerik team
 answered on 03 Sep 2018
1 answer
98 views

Hello,

In the SaveFileDialog, when the user selects "This PC" on the folders tree, the files list doesn't change.

On the windows save file dialog, the list of devices and drives is displayed.

Petar Mladenov
Telerik team
 answered on 03 Sep 2018
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?