Telerik Forums
UI for WPF Forum
2 answers
721 views

I have a DateTimePicker with InputMode="DatePicker" and TodayButtonVisibility="True".

If I set the SelectableDateEnd property to DateTime.Today (for a date of birth field for example), I can select today's date in the calendar but the Today button is shown disabled. It seems the time of day is taken into account because if I set SelectableDateEnd to DateTime.Now.AddMinutes(5), the Today button remains enabled until 5 minutes have elapsed. I don't know if this is intentional, but it certainly seems inconsistent. 

Claire
Top achievements
Rank 1
 answered on 30 May 2018
2 answers
162 views

I have a radgridview combined with a raddatapager. The data is loaded on demand.

 

The problem i have now is if i have more then 1 page and i click on the column header for sorting i get a threading exception.

How can i fix/bypass the error?

Vladimir Stoyanov
Telerik team
 answered on 30 May 2018
1 answer
311 views

Hi,

I want to set background color of mu autocompletebox as attached file correctback.png but after focusing on autocompletebox it changes background color to default one. So can you please tell me how I can stop changing background color of autocompletebox on set focus to remain same as on lost focus.

Vladimir Stoyanov
Telerik team
 answered on 30 May 2018
6 answers
951 views

A couple of years ago I've created a custom GridViewCell Template that allowed me to set a custom border inside a cell.
All I had to do was change the BorderBrush and BorderThickness properties of the GridViewCell's style.

But since I've updated to a newer version of the control, this has stopped working. Now the left border is missing.
In the past I've had trouble with the bottom border but setting bottom margin to 1 solved that.
However changing the left margin doesn't fix the visibility of the left border.

This is the original custom GridViewCemm Template:

<Style TargetType="telerik:GridViewCell" x:Key="DefaultCellStyle">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:GridViewCell">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}">
                            <ContentPresenter  Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ToolTip="{TemplateBinding ToolTip}" VerticalAlignment="Center" Margin="3,0"/>
                    </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="telerik:StyleManager.Theme" Value="Windows8" />
    <Setter Property="Margin" Value="0,0,0,1" />
</Style>

 

An example of how I used this:

<telerik:GridViewDataColumn  Header="Example" DataMemberBinding="{Binding MyBinding}" Width="100">
    <telerik:GridViewDataColumn.CellStyle>
        <Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource DefaultCellStyle}">
            <Setter Property="BorderBrush" Value="Blue"/>
            <Setter Property="BorderThickness" Value="2"/>
        </Style>
    </telerik:GridViewDataColumn.CellStyle>
</telerik:GridViewDataColumn>

 

My previous version of the the control was: 2016.3.1024.45 Here the cell had a perfect border of thickness 2 all-round.
Current version: 2018.1.220.45 Here the left border is missing, the other borders are working fine.

I've tried several things but simply can't get it to work any more.

Sia
Telerik team
 answered on 30 May 2018
2 answers
208 views

hello, I m ashrul

please help me, i cant binding RadRichTextBox and RadListView in my viewmodel, i m using data TxtDataProvider,
that i want is when i type in radrichtextbox and so do RadListView items, please help me guys.

Ashrul
Top achievements
Rank 1
 answered on 30 May 2018
0 answers
417 views

Hi, I'm attempting to use the following example to read in my XML:

https://docs.telerik.com/devtools/wpf/controls/radtreeview/populating-with-data/data-binding-to-xml

 

I am finding that when I convert my items to an ObservableCollection, no results are returned.

 

My XML is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<DocDef Filename="X">
  <DocVars Selected="yes">
    <DocVar Name="JobNumber" Value="0000" Selected="yes"/>
    <DocVar Name="ProjectID" Value="0000" Selected="yes"/>
  </DocVars>
  <DocContent Name="Requirements" Selected="False">
    <DocContent Name="Meeting" Selected="True" />
    <DocContent Name="Quality" Selected="True" />
    <DocContent Name="OHS" Selected="False">
      <DocContent Name="Another thing" Selected="False"/>
    </DocContent>
  </DocContent>
  <DocContent Name="Footer"/>
</DocDef>

 

And my associated XML serialization:

    public class GenericNode
    {
        [XmlAttribute("Name")]
        public String Name { get; set; }

        [XmlAttribute("Selected")]
        public String Selected { get; set; }
    }

    [XmlRoot(ElementName = "DocDef")]
    public class DocDef : GenericNode
    {
        [XmlArray("DocVars")]
        [XmlArrayItem("DocVar", Type = typeof(DocVar))]
        public List<GenericNode> DocVarItems { get; set; }

        [XmlElement("DocContent")]
        public List<DocContentValue> DocContentItems { get; set; }
    }
    
    public class DocVar : GenericNode { }

    public class DocContentValue : GenericNode
    {
        [XmlElement("DocContent")]
        public List<DocContentValue> DocContentItems { get; set; }

    }

 

My issue arises when attempting to extend DocDef as an ObservableCollection<GenericNode> and adding the "AddRange" function:

[XmlRoot(ElementName = "DocDef")]

public class DocDef : ObservableCollection<GenericNode>

{

    public void AddRange( IEnumerable<GenericNode> range )

     {

        foreach (GenericNode node in range)

        {

            this.Add( node );

        }

    }

    ...

If I follow through the rest of the example, AddRange does not add any elements:

 

public class RadTreeViewXmlDataSource : DocDef
    {
        private string source;
        public string Source
        {
            get
            {
                return this.source;
            }
            set
            {
                this.source = value;
                AddRange( RetrieveData( Application.GetResourceStream( new Uri( value, UriKind.Relative ) ).Stream ) );
            }
        }
        private DocDef RetrieveData( Stream xmlStream )
        {
            XmlSerializer serializer = new XmlSerializer( typeof( DocDef ) );
            StreamReader reader = new StreamReader( xmlStream );
            DocDef list = ( DocDef )serializer.Deserialize( reader );
            return list;
        }
    }

 

Any help would be very much appreciated!

 

 

 

Blair
Top achievements
Rank 1
 asked on 29 May 2018
8 answers
784 views

Background:

I have a RadRickTextBox with the following initializiton and I have set AutoInsertHyperlinks="True" in XAML.

private void loaded(object sender, RoutedEventArgs e)
{
    string data = "This is first line\n\n" + "\tUrl: http://www.google.com\n";
    this.radRichTextBox.Insert(data);
}

When I run the code google.com is not "hyperlinked". However, if I move cursor to end of hyperlink and press ENTER, hyperlink is recognized.

Question:

How can I force radRichTextBox to recognize hyperlinks when I insert a string? I have tried UpdateEditorLayout etc but no luck.

 

 

 

Tanya
Telerik team
 answered on 29 May 2018
1 answer
144 views

Hello,

We are evaluating Telerik controls for one of our requirements, where we need to use Tile view control. Each tile contains different controls like Datagrid / charts etc..

Our first requirement is, we want to adjust tiles in a such a way that, in the first row have one large tile, in the second row there would be 4 small tiles and in the third row would he two medium size tiles. For more details on how that should look, please refer attached screenshot.

We found a link: https://github.com/telerik/xaml-sdk/tree/master/TileView/RestoredTilesToSpanMultipleRowsAndColumns 

which can help us to arrange the tiles the way we want. Now we also want those tiles to be resizable and here I am facing difficulties to achieve this. Basically, we are trying to achieve behavior near to this: https://strml.github.io/react-grid-layout/examples/0-showcase.html

Could you please help me out to achieve this requirement. 

Looking forward to hearing you soon.

 

Thanks,

Parthiv

Vladimir Stoyanov
Telerik team
 answered on 29 May 2018
1 answer
768 views

I have a LayoutControl which contains LayoutControlExpanderGroup-Controls.

The LayoutControl's vertical space is set to a certain height but the content overflows that. As a result, a scrollbar is displayed - which is the desired behavior.

The problem is that when the mouse pointer is over the content of a LayoutControlExpanderGroup control, scrolling with the mouse wheel does not work anymore.

When the mouse pointer is over the header of a LayoutControlExpanderGroup, it works though.

I guess the Scrollviewer in the LayoutControlExpanderGroup control "steals" the mouse wheel event? Is there any way to fix that behavior?

Martin Ivanov
Telerik team
 answered on 29 May 2018
10 answers
1.2K+ views
Hello, I have got RadWindow created in xaml.
When I try to create this Rad window in code

                var mainWindow = new MainWindow(); // IT'S RADWINDOW
                Application.Current.MainWindow = mainWindow;
                Close();
                Application.Current.MainWindow.Show();

I have an error as:
Cannot implicitly convert type 'SomeProjectName.SomeFolder.MainWindow' to 'System.Windows.Window'

How to solve this problem?
Jason
Top achievements
Rank 1
 answered on 28 May 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?