Telerik Forums
UI for WPF Forum
2 answers
149 views
Hi, I have just started with using your components and I am very impressed with them.
The scheduleview in particular matches and upcoming project well.

I have one question now.
I have added some in xaml and found this to be working for<Canvas x:Name="canvas" MouseDown="Canvas_MouseDown" MouseUp="Canvas_MouseUp" MouseMove="Canvas_MouseMove">
<
telerik:RadScheduleView HorizontalAlignment="Left" Margin="12,12,0,0" Name="radScheduleView1" VerticalAlignment="Top" Height="469" Width="208" MouseRightButtonDown="rect1_MouseLeftButtonDown" NavigationHeaderVisibility="Collapsed" MinAppointmentHeight="100" VerticalScrollBarVisibility="Hidden" MinTimeRulerExtent="2800" MaxTimeRulerExtent="2800">

<telerik:RadScheduleView.ViewDefinitions>

<telerik:DayViewDefinition MinorTickLength="30min" MajorTickLength="1h"/>

</telerik:RadScheduleView.ViewDefinitions>

<telerik:RadScheduleView.RenderTransform>

<TranslateTransform></TranslateTransform>

</telerik:RadScheduleView.RenderTransform>

<telerik:RadScheduleView.DragDropBehavior>

<local:ScheduleViewDragDropBehavior/>

</telerik:RadScheduleView.DragDropBehavior>

</telerik:RadScheduleView>
</Canvas>

Besides normal config and drag'n drop I have added MouseRightButtonDown and RenderTransform as I am moving it arround on a canvas.

Now I would like to be able to add more schedulers at runtime and load them up with the same config. But I am having problem doing so.
Using this code I can create one
this.x = new Telerik.Windows.Controls.RadScheduleView(); this.x.Height = 469;
this.x.Width = 533;
this.x.CurrentDate = DateTime.Today;
var appointments3 = new ObservableCollection<Appointment>();
this.x.AppointmentsSource = appointments3;
RadScheduleViewCommands.SetDayViewMode.Execute(null, this.x);

canvas.Children.Add(

 

this.x);


I am using RadScheduleViewCommands to set dayview, but it is not working. So what I am doing wrong here?

Any help will be appreciated.

Secondly the bonus question.
Ideally I would like to instantiate new schedulers based on xaml template, I tried following a few example I could find on other web resources but non of them really worked well for me. Main problem here was that I could not set the drag'n drop behavior. But of cause that could be done after creating if needed.
If you happen to have any examples of this that would also be appreciated.

Best regards
Lasse
Lasse
Top achievements
Rank 1
 answered on 24 Oct 2012
5 answers
571 views
Hello,

I have noticed two separate issues when loading html documents into the WPF RadRichTextBox

The first issue is that loading a document with capitalized <STYLE> tags will not render at all, even if there are no styles specified.

The second issue is that the CSS style for "a:link, span.MsoHyperlink" that Microsoft Outlook adds to emails is being applied to the body tag of the resulting document.  This causes all text within the RadRichTextBox to be underlined, not just hyperlinks.

I have created a sample application to reproduce these issues.

<Window x:Class="RadRichTextBoxTestApp.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        SizeToContent="WidthAndHeight">
    <Window.Resources>
      <Style TargetType="{x:Type telerik:RadRichTextBox}">
        <Style.Setters>
          <Setter Property="Height" Value="100" />
          <Setter Property="Width" Value="300" />
        </Style.Setters>
      </Style>
    </Window.Resources>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box0}" Html="{Binding DocumentWithCapitalizedStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="0" x:Name="box0" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box1}" Html="{Binding DocumentWithLowerCaseStyleTags}" />
      <telerik:RadRichTextBox Grid.Row="1" x:Name="box1" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box2}" Html="{Binding DocumentWithMsoHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="2" x:Name="box2" Margin="10"/>
      <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=box3}" Html="{Binding DocumentWithInlineHyperlinkStyles}" />
      <telerik:RadRichTextBox Grid.Row="3" x:Name="box3" Margin="10"/>
    </Grid>
</Window>

using System.Windows;
 
namespace RadRichTextBoxTestApp
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            DataContext = new MainWindowViewModel();
            InitializeComponent();
        }
    }
 
    public class MainWindowViewModel
    {
        public string DocumentWithCapitalizedStyleTags
        {
            get { return "<html><head><STYLE></STYLE></head><body>HELLO WORLD!</body></html>"; }
        }
 
        public string DocumentWithLowerCaseStyleTags
        {
            get { return DocumentWithCapitalizedStyleTags.Replace("<STYLE", "<style").Replace("</STYLE","</style"); }
        }
 
        public string DocumentWithMsoHyperlinkStyles
        {
            get
            {
                return
@"
<html><head><style>
a:link, span.MsoHyperlink
    {mso-style-priority:99; color:blue; text-decoration:underline;}
</style></head><body>HELLO WORLD! <a href=""http://telerik.com"">Telerik</a></body></html>
";
            }
        }
 
        public string DocumentWithInlineHyperlinkStyles
        {
            get { return DocumentWithMsoHyperlinkStyles.Replace(", span.MsoHyperlink", ""); }
        }
    }
}

Boby
Telerik team
 answered on 24 Oct 2012
1 answer
188 views
Hello,

we currently have the following problem:

There is a table named ST_Classification and one named ST_Address, which have the following relationship:
ST_classification.PK_classification -> ST_Address.FK_classification

In a WPF-Application there is a DataFormComboBoxField which is populated with data from the ST_Classification table.
The moment the value is set to a new one an exception is thrown:
System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException was unhandled by user code
Message=Operation is not valid due to the current state of the object.


This is code in the xxx.designer.cs where the exception is thrown:
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FK_classification", DbType="BigInt", UpdateCheck=UpdateCheck.Never)]
        public System.Nullable<long> FK_classification
        {
            get
            {
                return this._FK_classification;
            }
            set
            {
                if ((this._FK_classification != value))
                {
                    if (this._ST_classification.HasLoadedOrAssignedValue)
                    {
                        throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
                    }
                    this.OnFK_classificationChanging(value);
                    this.SendPropertyChanging(); // <--- Exception is thrown!
                    this._FK_classification = value;
                    this.SendPropertyChanged("FK_classification");
                    this.OnFK_classificationChanged();
                }
            }
        }


This is the XAML-code for the DataFormComboBoxField:
<telerik:RadDataForm x:Name="RDF_ST_Addresse" ItemsSource="{Binding Items, ElementName=RG_ST_Partner}"
 AutoGenerateFields="False"
 EditEnding="RDF_ST_Addresse_EditEnding"
EditEnded="RDF_ST_Addresse_EditEnded"
DeletingItem="RDF_ST_Addresse_DeletingItem"
ValidatingItem="RDF_ST_Addresse_ValidatingItem"
AddingNewItem="RDF_ST_Addresse_AddingNewItem"
AddedNewItem="RDF_ST_Addresse_AddedNewItem" >
.
.
.
<telerik:DataFormComboBoxField DataMemberBinding="{Binding FK_classification, Mode=TwoWay}"  Name="DFCMB_classification"
Label="Klassifikation" IsReadOnly="False"
SelectedValuePath="PK_classification"
DisplayMemberPath="classification" Initialized="DFCMB_classification_Initialized" />

Here is the codeBehind for DataFormComboBoxField:
private void DFCMB_classification_Initialized(object sender, EventArgs e)
            {
                ((DataFormComboBoxField)sender).ItemsSource = from p in goDCAddach.ST_classifications orderby p.classification     select p ;
            }

 Thanks for any help in advance.

Greetings
Gerrit

Ivan Ivanov
Telerik team
 answered on 24 Oct 2012
2 answers
230 views
Hello Telerik team,

i followed some of the topics in this forum regarding the localization of the radComponents. But i didn´t find a solution how to change the language at runtime without having to reload all components. Is there any solution how to achieve this ?
Thanks in advance
Vladi
Telerik team
 answered on 24 Oct 2012
5 answers
1.1K+ views
Hi,

Is there a way to set a document width to A4? or any standard paper width for that matter (A1, A2, A3, A4... etc).

Thanks,

Rob
Petya
Telerik team
 answered on 23 Oct 2012
2 answers
220 views
Trying to get a RadDataPager with a RadGridView to update the list of items when the underlying bound collection changes. I have RadDataPager.Source bound to a property in the viewmodel, and RadGridView bound to PagedSource of the pager. The collection doesn't actually implement any events for changing, so what I'm doing is replacing the value of the bound property with a new collection. I have verified it is a new instance, and that INotifyPropertyChanged is being raised. However the gridview isn't updating until I move to another page, and then move back. I'd expect the datapager to detect the underlying collection has changed, and instruct the gridview that the current page's contents have changed. It doesn't.

What might I be missing?
Almond
Top achievements
Rank 1
 answered on 23 Oct 2012
1 answer
62 views

I have many windows. I want to change in the Mainwindow from a window (window3). Make a label visible in

MainWindow on a button click in window3.

I don't want to create an instance of MainWindow, because that doesn't keep changes in the parent Mainwindow.

How can I do it, kindly?

Thanks in advanced.

Asmaa
Top achievements
Rank 1
 answered on 23 Oct 2012
1 answer
98 views
Hello,

I updated my project to Q3 yesterday. When I published it today (via ClickOnce) I got the following while installing:

Exception occurred loading manifest from file Telerik.Windows.Controls.Input.dll: the manifest may not be valid or the file could not be opened.

Are there any new dependencies in Q3? I just installed it and used update functionality in your VS extension.

Best Regards,
Peter Schmidt
Dimitrina
Telerik team
 answered on 23 Oct 2012
0 answers
154 views
How can we bind EF EntityValidationErrors so the corresponding grid cells shows the errors?

Ex: When DbContext.SaveChanges() throws a DbEntityValidationException with ValidationErrors:
The CustomerId field is required.
The Currency field is required.


Peter
Top achievements
Rank 1
 asked on 23 Oct 2012
2 answers
746 views
Hi!
there are several occasions that the controls do not behave instantly, depending also on the performance capabilities of the current machine and the complexity of the UI.

I see this for instance when expanding/collapsing rows in the RadTreeListView, or expanding/collapsing the RadExpander. Another example is when my user clicks on a grid row and the grid has to switch the display to the editing template of the corresponding column. The same when the user expands a pane in the RadDocking control.

By default these controls do not switch the cursor to the wait cursor, so if these operations take a second to complete, there is no indication that they even have started. So the user tends to click again and again, resulting in strange behavior depending on the occasion.

I'm interesting in just replacing the Arrow cursor with the WaitCursor and not something more complex like using the RadBusyIndicator.

Any solution?
Nick
Telerik team
 answered on 23 Oct 2012
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?